Commit 6c88b341 authored by 董建华's avatar 董建华

限制500条皮查询

parent 587d6bef
...@@ -35,7 +35,7 @@ public class UserController { ...@@ -35,7 +35,7 @@ public class UserController {
user.setEnable(true); user.setEnable(true);
userService.saveUser(user); userService.saveUser(user);
//通知消息中心 //通知消息中心
applicationEventPublisher.publishEvent(new DisableActiveEvent(this,user)); applicationEventPublisher.publishEvent(new DisableActiveEvent(this, user));
return JsonResult.buildSuccessResult(); return JsonResult.buildSuccessResult();
} }
...@@ -50,7 +50,7 @@ public class UserController { ...@@ -50,7 +50,7 @@ public class UserController {
//清理缓存 //清理缓存
userService.saveUser(user); userService.saveUser(user);
//通知消息中心 //通知消息中心
applicationEventPublisher.publishEvent(new DisableActiveEvent(this,user)); applicationEventPublisher.publishEvent(new DisableActiveEvent(this, user));
return JsonResult.buildSuccessResult(); return JsonResult.buildSuccessResult();
} }
...@@ -76,20 +76,24 @@ public class UserController { ...@@ -76,20 +76,24 @@ public class UserController {
//TODO convert to userVO //TODO convert to userVO
return JsonResult.buildSuccessResultGeneric(user); return JsonResult.buildSuccessResultGeneric(user);
} }
/** /**
* 根据uuid或者userids 获取用户信息 * 根据uuid或者userids 获取用户信息
*
* @param params * @param params
* @return * @return
*/ */
@PostMapping("/getByUuidsOrUserIds") @PostMapping("/getByUuidsOrUserIds")
public JsonResult getByUuidsOrUserIds(@RequestBody Map<String,Object> params){ public JsonResult getByUuidsOrUserIds(@RequestBody Map<String, Object> params) {
List<String> vals = (List<String>)params.get("vals"); List<String> vals = (List<String>) params.get("vals");
Integer type = (Integer)params.get("type"); Integer type = (Integer) params.get("type");
if(type== null || (type !=1 && type !=2)){ if (type == null || (type != 1 && type != 2)) {
return JsonResult.buildErrorStateResult("type错误",null); return JsonResult.buildErrorStateResult("type错误", null);
}
if (vals.size() > 500) {
vals = vals.subList(0,500);
} }
return JsonResult.buildSuccessResultGeneric(userService.findByUuidsOrUserIds(vals, type)); return JsonResult.buildSuccessResultGeneric(userService.findByUuidsOrUserIds(vals, type));
} }
} }
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