diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index f1f80ccf0..098c9350d 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -13,6 +13,8 @@ import ( "time" "unicode/utf8" + "git.rosy.net.cn/jx-callback/globals/refutil" + "github.com/360EntSecGroup-Skylar/excelize" "git.rosy.net.cn/baseapi" @@ -695,6 +697,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa return 0, err } var outStore *model.Store + var beforStore = *store if payload["autoEnableAt"] != nil { payload["autoEnableAt"] = utils.Time2Date(utils.Str2Time(utils.Interface2String(payload["autoEnableAt"]))) } @@ -872,6 +875,10 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa // } globals.SugarLogger.Debugf("UpdateStore track:%s, storeID:%d, valid:%s", ctx.GetTrackInfo(), storeID, utils.Format4Output(valid, true)) if len(valid) > 0 { + if globals.IsAddEvent { + mapBefore := refutil.FindMapAndStructMixed(valid, beforStore) + err = AddEventDetail(db, ctx, model.OperateUpdate, storeID, model.ThingTypeStore, storeID, BuildDiffData(mapBefore), BuildDiffData(valid)) + } dao.Begin(db) defer func() { dao.Rollback(db)