From 79585c32c928d9beecbd8ce068980a7b27e5ab58 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 16:53:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97-?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E9=97=A8=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 3 +++ business/model/const.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 098c9350d..558d0acdc 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1044,6 +1044,9 @@ func CreateStore(ctx *jxcontext.Context, storeExt *StoreExt, userName string) (i TryAddStoreBossRole4StoreByMobile(ctx, storeExt.ID, []string{storeExt.Tel1, storeExt.Tel2}) return store.ID, err } + if globals.IsAddEvent { + err = AddEventDetail(db, ctx, model.OperateAdd, store.ID, model.ThingTypeStore, store.ID, "", "") + } return 0, err } diff --git a/business/model/const.go b/business/model/const.go index f3292b7be..7779a883f 100644 --- a/business/model/const.go +++ b/business/model/const.go @@ -123,6 +123,8 @@ var ( "UpdateStoresSkus": "门店商品管理", "UpdateStoresSkusSale": "门店商品可售状态修改", "CopyStoreSkus": "京西门店商品复制到京西", + "UpdateStore": "门店管理-更新门店信息", + "CreateStore": "门店管理-创建门店", } MultiStoresVendorMap = map[int]int{ From bf74915177b48c907f600aef9edfd44a585742da 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 17:07:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?jsondata=E8=B6=85=E9=95=BF=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E5=88=9B=E5=BB=BA=E9=97=A8=E5=BA=97=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 | 6 +++--- business/jxstore/event/event.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 558d0acdc..e9f75de27 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1040,13 +1040,13 @@ func CreateStore(ctx *jxcontext.Context, storeExt *StoreExt, userName string) (i dao.WrapAddIDCULDEntity(store, userName) store.ID = existingID if err = dao.CreateEntity(db, store); err == nil { + if globals.IsAddEvent { + err = AddEventDetail(db, ctx, model.OperateAdd, store.ID, model.ThingTypeStore, store.ID, "", "") + } UpdateOrCreateCourierStores(ctx, store.ID, false, false, false) TryAddStoreBossRole4StoreByMobile(ctx, storeExt.ID, []string{storeExt.Tel1, storeExt.Tel2}) return store.ID, err } - if globals.IsAddEvent { - err = AddEventDetail(db, ctx, model.OperateAdd, store.ID, model.ThingTypeStore, store.ID, "", "") - } return 0, err } diff --git a/business/jxstore/event/event.go b/business/jxstore/event/event.go index e01a2a1ef..a8a6eca58 100644 --- a/business/jxstore/event/event.go +++ b/business/jxstore/event/event.go @@ -46,6 +46,7 @@ func AddOperateEvent(ctx *jxcontext.Context, accessUUID, jsonData string) (err e if accessUUID != "" { accessUUID = accessUUID[0:strings.Index(accessUUID, ",")] } + jsonData = utils.LimitUTF8StringLen(jsonData, 3200) event := &model.OperateEvent{ CreatedAt: time.Now(), LastOperator: ctx.GetUserName(),