From c53800f292a5350012e9bfba0a900800c1092e11 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 26 Jul 2019 10:49:52 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=8F=98=E6=9B=B4=E5=BF=AB=E9=80=92?= =?UTF-8?q?=E9=97=A8=E5=BA=97=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 56 +---------------------------------- 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index e508cadf2..15ebdccca 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1231,7 +1231,7 @@ func UpdateOrCreateCourierStores(ctx *jxcontext.Context, storeID int, isForceUpd } func formalizeStore4Courier(storeDetail *dao.StoreDetail2) *dao.StoreDetail2 { - storeDetail.Name = storeDetail.Name + "-" + storeDetail.VendorStoreID + storeDetail.Name = fmt.Sprintf("%s-%s-%s", model.ShopChineseNames[model.VendorIDJD], storeDetail.CityName, storeDetail.Name) if storeDetail.PayeeName == "" { storeDetail.PayeeName = "店主" } @@ -1521,60 +1521,6 @@ func SendAlarmVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, p } } - ////// - // curSnapshotMap := make(map[string]*model.VendorStoreSnapshot) - // curSnapshotGroupMap := make(map[int][]*model.VendorStoreSnapshot) - // for _, v := range curSnapshotList { - // curSnapshotMap[v.GenMapKey()] = v - // curSnapshotGroupMap[v.StoreID] = append(curSnapshotGroupMap[v.StoreID], v) - // } - - // storeDetailMap := make(map[int]*dao.StoreDetail) - // userMap := make(map[string]map[int]int) - // alarmMapHandler := func(alarmMap map[int]map[int]*model.VendorStoreSnapshot, v *model.VendorStoreSnapshot) { - // if alarmMap[v.StoreID] == nil { - // alarmMap[v.StoreID] = make(map[int]*model.VendorStoreSnapshot) - // if storeDetailMap[v.StoreID] == nil { - // storeDetail, _ := dao.GetStoreDetail(db, v.StoreID, v.VendorID) - // if storeDetail != nil { - // storeDetailMap[v.StoreID] = storeDetail - // for _, mobile := range []string{storeDetail.Tel1, storeDetail.MarketManPhone, storeDetail.OperatorPhone} { - // if mobile != "" { - // if userMap[mobile] == nil { - // userMap[mobile] = make(map[int]int) - // } - // userMap[mobile][v.StoreID] = 1 - // } - // } - // } - // } - // } - // alarmMap[v.StoreID][v.VendorID] = v - // } - - // alarmMap := make(map[int]map[int]*model.VendorStoreSnapshot) - // for _, v := range prevSnapshotList { - // curSnapshot := curSnapshotMap[v.GenMapKey()] - // if (curSnapshot == nil) || ((v.Status == model.StoreStatusOpened && curSnapshot.Status != model.StoreStatusOpened) || - // curSnapshot.CompareOperationTime(v) < 0) { - // alarmMapHandler(alarmMap, v) - // } - // } - // alarmMap4StatusNotSame := make(map[int]map[int]*model.VendorStoreSnapshot) - // for _, list := range curSnapshotGroupMap { - // if isVendorStoresStatusNotOk(list) { - // for _, v := range list { - // alarmMapHandler(alarmMap4StatusNotSame, v) - // } - // } - // } - - // var mobileList []string - // for mobile := range userMap { - // if mobile != "" && !shouldSkipMobile4SendStoreStatusInfo(mobile) { - // mobileList = append(mobileList, mobile) - // } - // } if len(mobileList) > 0 { const fixTitle = "门店状态变化" title := fmt.Sprintf("%s:%s-->%s", fixTitle, utils.Time2Str(prevSnapshotList[0].SnapshotAt), utils.Time2Str(curSnapshotList[0].SnapshotAt))