aa
This commit is contained in:
@@ -4098,13 +4098,33 @@ func RefreshStoreBind(ctx *jxcontext.Context) (err error) {
|
|||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
store := batchItemList[0].(*model.Store)
|
store := batchItemList[0].(*model.Store)
|
||||||
var (
|
var (
|
||||||
userIDmap1 = make(map[string]string)
|
userIDmap1 = make(map[string]string)
|
||||||
userIDmap2 = make(map[string]string)
|
userIDmap2 = make(map[string]string)
|
||||||
userIDs []string
|
mobileList, userIDs []string
|
||||||
)
|
)
|
||||||
userList := getAllUsers4Store(ctx, db, store)
|
// userList := getAllUsers4Store(ctx, db, store)
|
||||||
for _, v := range userList {
|
if store.Tel1 != "" {
|
||||||
userIDmap1[v.UserID] = v.UserID
|
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))
|
nowUserIDs, _ := GetRoleUserList(ctx, autils.NewRole(authz.StoreRoleBoss, store.ID))
|
||||||
for _, v := range nowUserIDs {
|
for _, v := range nowUserIDs {
|
||||||
|
|||||||
Reference in New Issue
Block a user