diff --git a/domain/model/group_m/room.go b/domain/model/group_m/room.go index 24131ac845f9183d24c0a478886d017f65fdae9c..5b7d8a3303daa947ca7365029c3a6a16f76ec154 100644 --- a/domain/model/group_m/room.go +++ b/domain/model/group_m/room.go @@ -279,7 +279,7 @@ func RoomLivingExistsUserId(groupUid string) ([]uint64, error) { if err != nil { return nil, myerr.WrapErr(err) } - mylogrus.MyLog.Infof("group_room_living RoomLivingExistsUserId groupUserIdstrs:%v", groupUserIdstrs) + //mylogrus.MyLog.Infof("group_room_living RoomLivingExistsUserId groupUserIdstrs:%v", groupUserIdstrs) userIds := make([]uint64, 0, len(groupUserIdstrs)) for i, _ := range groupUserIdstrs { tempGroupUid, userId := analysisMemberStr(groupUserIdstrs[i]) diff --git a/domain/model/user_m/user.go b/domain/model/user_m/user.go index dcf65bc2f539449797d20f26b6bf92564de8baf1..40287a18f4fd9947e038dabb84dac945e14caec6 100644 --- a/domain/model/user_m/user.go +++ b/domain/model/user_m/user.go @@ -94,10 +94,7 @@ func GetUserMapByIds(model *domain.Model, userIds []mysql.ID) (map[mysql.ID]User } var rows []User start := 0 - for end <= len(userIds) { - if end > len(userIds) { - end = len(userIds) - } + for start < len(userIds) { tmp, err := GetUsersByIds(model, userIds[start:end]) if err != nil { return result, err @@ -106,7 +103,10 @@ func GetUserMapByIds(model *domain.Model, userIds []mysql.ID) (map[mysql.ID]User } start += 500 end += 500 - model.Log.Infof("GetUserMapByIds start:%v-end:%v", start, end) + if end > len(userIds) { + end = len(userIds) + } + //model.Log.Infof("GetUserMapByIds start:%v-end:%v", start, end) } for _, i := range rows { result[i.ID] = i diff --git a/domain/model/user_m/vip.go b/domain/model/user_m/vip.go index 5d3ed7ac54624ccdbc5ac0d4c4160e8932a5f758..f5643c94e585a03cdb1bd8fb69d6a70d171702a3 100644 --- a/domain/model/user_m/vip.go +++ b/domain/model/user_m/vip.go @@ -2,7 +2,6 @@ package user_m import ( "git.hilo.cn/hilo-common/domain" - "git.hilo.cn/hilo-common/mylogrus" "git.hilo.cn/hilo-common/resource/mysql" "gorm.io/gorm" "gorm.io/gorm/clause" @@ -85,7 +84,7 @@ func BatchGetVips(userIds []uint64) (map[uint64]*int64, error) { } start += 500 end += 500 - mylogrus.MyLog.Infof("BatchGetVips start:%v-end:%v", start, end) + //mylogrus.MyLog.Infof("BatchGetVips start:%v-end:%v", start, end) } for _, i := range userIds {