- 修复SendAlarmVendorSnapshot调用GetUsers时,防止roleUserIDList为空的bug
This commit is contained in:
@@ -1580,10 +1580,10 @@ func SendAlarmVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, p
|
||||
storeDetailMap[storeID] = storeDetail
|
||||
|
||||
var userList []*model.User
|
||||
if roleUserIDList, err := GetRoleUserList(ctx, autils.NewStoreBossRole(storeID)); err == nil {
|
||||
if roleUserIDList, err := GetRoleUserList(ctx, autils.NewStoreBossRole(storeID)); err == nil && len(roleUserIDList) > 0 {
|
||||
userList, _, _ = dao.GetUsers(db, 0, "", roleUserIDList, "", "", 0, -1)
|
||||
}
|
||||
for _, mobile := range []string{storeDetail.Tel1, storeDetail.MarketManPhone, storeDetail.OperatorPhone} {
|
||||
for _, mobile := range []string{storeDetail.Tel1, storeDetail.Tel2, storeDetail.MarketManPhone, storeDetail.OperatorPhone} {
|
||||
if mobile != "" {
|
||||
if user, err2 := dao.GetUserByID(db, "mobile", mobile); err2 == nil {
|
||||
userList = append(userList, user)
|
||||
|
||||
Reference in New Issue
Block a user