From 05ebeeb77caf71d39bd30ae7d924c5c53e6b389a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 17 Jan 2020 14:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97=E7=9B=B8=E5=85=B3=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 7 +++++++ 1 file changed, 7 insertions(+) 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)