新增查询用户接口(无需登录)
This commit is contained in:
@@ -69,6 +69,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
"/api/system/user/getUserWithoutLogin",
|
||||
"/api/system/user/batchBackUserId",
|
||||
"/api/system/user/getByPhone/**",
|
||||
"/api/system/user/getByUserId/**",
|
||||
"/api/system/user/getByUnionid/**",
|
||||
"/api/system/user/updateUserOfficeOpenidWithoutLogin",
|
||||
"/api/system/user-referee/getReferee/**",
|
||||
|
||||
@@ -93,6 +93,12 @@ public class UserController extends BaseController {
|
||||
return success(userService.getByPhone(phone));
|
||||
}
|
||||
|
||||
@ApiOperation("根据UserId查询用户(无需登录)")
|
||||
@GetMapping("/getByUserId/{userId}")
|
||||
public ApiResult<User> getByUserId(@PathVariable("userId") String userId) {
|
||||
return success(userService.getAllByUserId(userId));
|
||||
}
|
||||
|
||||
@ApiOperation("根据unionid查询用户")
|
||||
@GetMapping("/getByUnionid/{unionid}")
|
||||
public ApiResult<User> getByUnionid(@PathVariable("unionid") String unionid) {
|
||||
|
||||
@@ -114,6 +114,8 @@ public interface UserService extends IService<User>, UserDetailsService {
|
||||
|
||||
User getAdminByPhone(UserParam param);
|
||||
|
||||
User getAllByUserId(String userId);
|
||||
|
||||
Integer userNumInPark(UserParam param);
|
||||
|
||||
Integer orgNumInPark(UserParam param);
|
||||
|
||||
@@ -296,6 +296,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
return baseMapper.getByUserId(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getAllByUserId(String userId) {
|
||||
return getOne(new LambdaQueryWrapper<User>().eq(User::getUserId, userId).last("limit 1"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量查询用户的角色
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user