Commit 88bede23 authored by Java-刘 彧阳's avatar Java-刘 彧阳

限制批量查询用户的条数,最多500条

parent 32f74a41
...@@ -78,8 +78,12 @@ public class InnerController { ...@@ -78,8 +78,12 @@ public class InnerController {
} }
List<Long> userIds = JSONObject.parseObject(userIdsString, new TypeReference<List<Long>>() { List<Long> userIds = JSONObject.parseObject(userIdsString, new TypeReference<List<Long>>() {
}); });
Map<Long, String> userIdAndPhoneMap = userService.findPhoneByIdsInDb(userIds); if(CollectionUtils.isNotEmpty(userIds) && userIds.size()<=500) {
return JsonResult.buildSuccessResult("", userIdAndPhoneMap); Map<Long, String> userIdAndPhoneMap = userService.findPhoneByIdsInDb(userIds);
return JsonResult.buildSuccessResult("", userIdAndPhoneMap);
}else {
return JsonResult.buildErrorStateResult("批量查询每次最多进行500条用户信息的查询",null);
}
} }
@RequestMapping("/user/save") @RequestMapping("/user/save")
......
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