From ee0bc23493db099be15e9d551495c94c8bfc94b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 28 Dec 2020 17:30:02 +0800 Subject: [PATCH] a --- business/jxstore/act/act.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index 8bfca5791..d2fa1d696 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -885,11 +885,13 @@ func DeleteActStoreSkuBind(ctx *jxcontext.Context, db *dao.DaoDB, actID int, act if isNeedCancelAct { act := &model.Act{} act.ID = actID - if _, err = dao.UpdateEntityLogically(db, act, - map[string]interface{}{ - model.FieldStatus: model.ActStatusCanceled, - }, ctx.GetUserName(), nil); err != nil { - return 0, err + if err == nil { + if _, err = dao.UpdateEntityLogically(db, act, + map[string]interface{}{ + model.FieldStatus: model.ActStatusCanceled, + }, ctx.GetUserName(), nil); err != nil { + return 0, err + } } } dao.Commit(db)