推荐商品自动关注,修改,以及暂时只整4个小城市

This commit is contained in:
苏尹岚
2020-01-13 14:53:40 +08:00
parent ce74fb7128
commit 8c9b4081c8
9 changed files with 62 additions and 24 deletions

View File

@@ -219,7 +219,7 @@ func TryAddStoreBossRole4User(ctx *jxcontext.Context, user *model.User) (err err
if user.Type&model.UserTypeStoreBoss != 0 {
userMobile := user.GetMobile()
if userMobile != "" {
if storeList, err := dao.GetStoreList(dao.GetDB(), nil, []string{userMobile}, ""); err == nil && len(storeList) > 0 {
if storeList, err := dao.GetStoreList(dao.GetDB(), nil, nil, nil, []string{userMobile}, ""); err == nil && len(storeList) > 0 {
roleList := make([]*authz.RoleInfo, len(storeList))
for k, v := range storeList {
roleList[k] = autils.NewStoreBossRole(v.ID)