Commit d10a846c authored by 技术部-任文超's avatar 技术部-任文超

支持按手机号查询用户全量信息

parent 8c6e1a14
......@@ -717,12 +717,14 @@ public class InnerController implements IBaseController {
@LogHttpCaller
@RequestMapping("/user-association/search/userId")
public JsonResult findUserAssociationModelByUserId(Long userId) {
if (Objects.isNull(userId) || userId < 1) {
return JsonResult.buildErrorStateResult("params invalid", null);
public JsonResult findUserAssociationModelByUserId(Long userId, String phoneNo) {
boolean userIdOk = Objects.nonNull(userId) && userId > 0;
boolean phoneNoOk = ValidationUtil.validatePhoneNo(phoneNo);
if (!userIdOk && !phoneNoOk) {
return JsonResult.buildErrorStateResult("params invalid", String.valueOf(userId).concat(":").concat(phoneNo));
}
UserAssociationModel bean = null;
User user = userService.findById(userId);
User user = userIdOk ? userService.findById(userId) : userService.findByPhoneWithCache(phoneNo);
if (!Objects.isNull(user)) {
bean = findUserAssociationModelByUser(user);
}
......
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