diff --git a/business/jxstore/promotion/jd_promotion.go b/business/jxstore/promotion/jd_promotion.go index ce02e7866..2311e696f 100644 --- a/business/jxstore/promotion/jd_promotion.go +++ b/business/jxstore/promotion/jd_promotion.go @@ -339,8 +339,9 @@ func CreateJdPromotion(ctx *jxcontext.Context, isIDJd bool, isAsync bool, params promotion.Status = model.PromotionStatusRemoteFailed } db := dao.GetDB() - dao.WrapUpdateULEntity(promotion, userName) - _, err = dao.UpdateEntity(db, promotion, "Status") + _, err = dao.UpdateEntityLogically(db, promotion, map[string]interface{}{ + "Status": promotion.Status, + }, ctx.GetUserName(), nil) } return nil, err }, 4) @@ -542,7 +543,11 @@ func CancelJdPromotion(ctx *jxcontext.Context, promotionID int) (err error) { if promotionHandler == nil { return errors.New("非法的促销类型") } - err = promotionHandler.CancelPromotion(utils.Str2Int64(promotion.VendorPromotionID), "") + if err = promotionHandler.CancelPromotion(utils.Str2Int64(promotion.VendorPromotionID), ""); err == nil { + _, err = dao.UpdateEntityLogically(db, promotion, map[string]interface{}{ + "Status": model.PromotionStatusCanceled, + }, ctx.GetUserName(), nil) + } return err }