并行网关未处理完所有并行任务时,没有处理状态,不能发送通知

This commit is contained in:
Admover 2020-12-17 10:50:00 +08:00
parent e8bfdeb7bd
commit bd78e9c7c8
2 changed files with 2 additions and 2 deletions

View File

@ -148,7 +148,7 @@ func ProcessWorkOrder(c *gin.Context) {
params.Tpls, // 工单数据更新 params.Tpls, // 工单数据更新
) )
if err != nil { if err != nil {
app.Error(c, -1, nil, fmt.Sprintf("处理工单失败,%v", err.Error())) app.Error(c, -1, err, fmt.Sprintf("处理工单失败,%v", err.Error()))
return return
} }

View File

@ -876,7 +876,7 @@ func (h *Handle) HandleWorkOrder(
h.tx.Commit() // 提交事务 h.tx.Commit() // 提交事务
// 发送通知 // 发送通知
if len(noticeList) > 0 { if len(noticeList) > 0 && h.updateValue["state"] != nil {
stateList := make([]interface{}, 0) stateList := make([]interface{}, 0)
for _, v := range h.updateValue["state"].([]map[string]interface{}) { for _, v := range h.updateValue["state"].([]map[string]interface{}) {
stateList = append(stateList, v) stateList = append(stateList, v)