Merge pull request #121 from admover/dev

修正并行网关未处理完所有并行任务时,暂时不发送通知
This commit is contained in:
lanyulei 2020-12-27 20:39:02 +08:00 committed by GitHub
commit 51da5a7b7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

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