- AddStoreBossByMoble添加调试
This commit is contained in:
@@ -1744,9 +1744,11 @@ func SyncStoresQualify(ctx *jxcontext.Context, storeIDs []int, isAsync, isContin
|
||||
}
|
||||
|
||||
func AddStoreBossByMoble(ctx *jxcontext.Context, mobile string, storeID int) (num int64, err error) {
|
||||
if mobile != "" {
|
||||
if globals.EnableWXAuth2 {
|
||||
db := dao.GetDB()
|
||||
userList, _, err2 := dao.GetUsers(db, 0, "", nil, "", mobile, 0, 0)
|
||||
globals.SugarLogger.Debugf("AddStoreBossByMoble mobile:%s, userList:%s", mobile, utils.Format4Output(userList, true))
|
||||
if err = err2; err == nil && len(userList) > 0 {
|
||||
if err = AddRoles4User(ctx, userList[0].GetID(), []*authz.RoleInfo{
|
||||
autils.NewRole(authz.StoreRoleBoss, storeID),
|
||||
@@ -1757,5 +1759,6 @@ func AddStoreBossByMoble(ctx *jxcontext.Context, mobile string, storeID int) (nu
|
||||
} else {
|
||||
num, err = BindMobile2Store(ctx, mobile, storeID)
|
||||
}
|
||||
}
|
||||
return num, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user