diff --git a/pkg/service/handle.go b/pkg/service/handle.go index b5e176d3..05603094 100644 --- a/pkg/service/handle.go +++ b/pkg/service/handle.go @@ -779,6 +779,7 @@ func (h *Handle) HandleWorkOrder( Where("user_id = ?", tools.GetUserId(c)). Find(¤tUserInfo).Error if err != nil { + h.tx.Rollback() return } @@ -805,6 +806,7 @@ func (h *Handle) HandleWorkOrder( // 获取流程通知类型列表 err = json.Unmarshal(processInfo.Notice, ¬iceList) if err != nil { + h.tx.Rollback() return } @@ -816,6 +818,7 @@ func (h *Handle) HandleWorkOrder( Pluck("email", &emailCCList).Error if err != nil { err = errors.New("查询邮件抄送人失败") + h.tx.Rollback() return } } @@ -862,6 +865,7 @@ func (h *Handle) HandleWorkOrder( Where("user_id = ?", h.workOrderDetails.Creator). Find(&sendToUserList).Error if err != nil { + h.tx.Rollback() return }