门店相关操作日志
This commit is contained in:
@@ -13,6 +13,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/jx-callback/globals/refutil"
|
||||||
|
|
||||||
"github.com/360EntSecGroup-Skylar/excelize"
|
"github.com/360EntSecGroup-Skylar/excelize"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi"
|
"git.rosy.net.cn/baseapi"
|
||||||
@@ -695,6 +697,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
|||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
var outStore *model.Store
|
var outStore *model.Store
|
||||||
|
var beforStore = *store
|
||||||
if payload["autoEnableAt"] != nil {
|
if payload["autoEnableAt"] != nil {
|
||||||
payload["autoEnableAt"] = utils.Time2Date(utils.Str2Time(utils.Interface2String(payload["autoEnableAt"])))
|
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))
|
globals.SugarLogger.Debugf("UpdateStore track:%s, storeID:%d, valid:%s", ctx.GetTrackInfo(), storeID, utils.Format4Output(valid, true))
|
||||||
if len(valid) > 0 {
|
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)
|
dao.Begin(db)
|
||||||
defer func() {
|
defer func() {
|
||||||
dao.Rollback(db)
|
dao.Rollback(db)
|
||||||
|
|||||||
Reference in New Issue
Block a user