From e0a1393eee6dfac9468c897bafd74516b7f8f6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 17 Mar 2021 17:14:57 +0800 Subject: [PATCH] aa --- business/jxstore/report/report.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/business/jxstore/report/report.go b/business/jxstore/report/report.go index 944ac7e90..8ebefd2d3 100644 --- a/business/jxstore/report/report.go +++ b/business/jxstore/report/report.go @@ -448,10 +448,7 @@ func RefreshStoreManageState(ctx *jxcontext.Context) { } storeDetail, _ := dao.GetStoreDetail(db, storeMap.StoreID, vendorID, storeMap.VendorOrgCode) storeManage := buildStoreManageState(ctx, db, storeMap, storeDetail, messageFlag) - if storeManageStates, err := dao.GetStoreManageStateSimple(db, []int{storeDetail.ID}, nil, vendorID); err == nil && len(storeManageStates) > 0 { - storeManage.ID = storeManageStates[0].ID - dao.CreateEntity(db, storeManage) - } + dao.CreateEntity(db, storeManage) return retVal, err }, createList) tasksch.HandleTask(task3, task, true).Run() @@ -464,7 +461,10 @@ func RefreshStoreManageState(ctx *jxcontext.Context) { } storeDetail, _ := dao.GetStoreDetail(db, storeMap.StoreID, vendorID, storeMap.VendorOrgCode) storeManage := buildStoreManageState(ctx, db, storeMap, storeDetail, messageFlag) - dao.UpdateEntity(db, storeManage) + if storeManageStates, err := dao.GetStoreManageStateSimple(db, []int{storeDetail.ID}, nil, vendorID); err == nil && len(storeManageStates) > 0 { + storeManage.ID = storeManageStates[0].ID + dao.UpdateEntity(db, storeManage) + } return retVal, err }, updateList) tasksch.HandleTask(task4, task, true).Run()