修改

parent 096b87bf
......@@ -826,23 +826,8 @@ public class InnerController implements IBaseController {
*/
@RequestMapping("/uuid/findByPhones")
public JsonResult getUuidsByPhones(@RequestParam("userPhones") String userPhones) {
if (StringUtils.isBlank(userPhones)) {
return JsonResult.buildErrorStateResult("传入用户手机号不可为空", null);
}
List<String> phones = JSONObject.parseObject(userPhones, new TypeReference<List<String>>() {
});
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(phones)) {
if (!(phones.size() > 500)) {
List<User> users = userService.findByPhones(phones);
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(users)) {
return JsonResult.buildSuccessResult(null, users.stream().collect(Collectors.toMap(User::getPhoneNo, User::getUuid)));
} else {
return JsonResult.buildSuccessResult(null, null);
}
}
return JsonResult.buildErrorStateResult("uuid单次批量查询不可超过500个手机号", null);
}
return JsonResult.buildErrorStateResult("uuid批量传入用户手机号不可为空", null);
return JsonResult.buildErrorStateResult("主库不提供查询", null);
}
/**
* 重置密码接口,供内部人员使用(例如绝影)
......
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