From 90ec474f199d02aee1dc1bbb5f86c040f1b4e2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 29 Mar 2021 10:28:20 +0800 Subject: [PATCH] aa --- business/jxstore/cms/store.go | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 0640d343c..82487f168 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -4098,13 +4098,33 @@ func RefreshStoreBind(ctx *jxcontext.Context) (err error) { func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { store := batchItemList[0].(*model.Store) var ( - userIDmap1 = make(map[string]string) - userIDmap2 = make(map[string]string) - userIDs []string + userIDmap1 = make(map[string]string) + userIDmap2 = make(map[string]string) + mobileList, userIDs []string ) - userList := getAllUsers4Store(ctx, db, store) - for _, v := range userList { - userIDmap1[v.UserID] = v.UserID + // userList := getAllUsers4Store(ctx, db, store) + if store.Tel1 != "" { + mobileList = append(mobileList, store.Tel1) + } + if store.Tel2 != "" { + mobileList = append(mobileList, store.Tel2) + } + if store.MarketManPhone != "" { + mobileList = append(mobileList, store.MarketManPhone) + } + if store.OperatorPhone != "" { + mobileList = append(mobileList, store.OperatorPhone) + } + if store.OperatorPhone2 != "" { + mobileList = append(mobileList, store.OperatorPhone2) + } + if store.OperatorPhone3 != "" { + mobileList = append(mobileList, store.OperatorPhone3) + } + for _, v := range mobileList { + if user, err := dao.GetUserByID(db, "mobile", v); err == nil && user != nil { + userIDmap1[user.UserID] = user.UserID + } } nowUserIDs, _ := GetRoleUserList(ctx, autils.NewRole(authz.StoreRoleBoss, store.ID)) for _, v := range nowUserIDs {