Commit 417c61bc authored by iamhujiebin's avatar iamhujiebin

fix

parent dec0f08d
......@@ -74,7 +74,7 @@ func BatchGetVips(userIds []uint64) (map[uint64]*int64, error) {
end = len(userIds)
}
tmp := make([]UserVip, 0)
err := mysql.Db.Where("user_id IN ?", userIds).Find(&tmp).Error
err := mysql.Db.Where("user_id IN ?", userIds[start:end]).Find(&tmp).Error
if err != nil {
return nil, err
}
......
......@@ -17,7 +17,7 @@ func TestGetUserMap(t *testing.T) {
func TestGetUserVipMap(t *testing.T) {
var userIds []uint64
for i := 0; i < 15000; i++ {
for i := 0; i < 1500; i++ {
userIds = append(userIds, 7642)
}
res, err := user_m.BatchGetVips(userIds)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment