feat: 用户企业名称

This commit is contained in:
pengsz 2025-12-09 10:55:46 +08:00
parent 0a834d2744
commit b399e7f0b4
5 changed files with 15 additions and 7 deletions

View File

@ -123,7 +123,7 @@ public class UserController {
@PreAuthorize("hasAuthority('admin:user:info')")
@ApiOperation(value = "详情")
@RequestMapping(value = "/info", method = RequestMethod.GET)
public CommonResult<UserCenterResponse> info(@RequestParam(value = "id") Integer id) {
public CommonResult<UserResponse> info(@RequestParam(value = "id") Integer id) {
return CommonResult.success(userService.getByUid(id));
}

View File

@ -83,6 +83,10 @@ public class UserCreateRequest implements Serializable {
// @ApiModelProperty(value = "等级")
// private Integer level;
@ApiModelProperty("用户公司名称")
private String companyName;
@ApiModelProperty(value = "用户分组id")
private String groupId;

View File

@ -82,6 +82,10 @@ public class UserUpdateRequest implements Serializable {
@ApiModelProperty(value = "用户标签id")
private String tagId;
@ApiModelProperty("用户公司名称")
private String companyName;
// @ApiModelProperty(value = "是否为推广员")
// @NotNull(message = "是否为推广员不能为空")
// private Boolean isPromoter;

View File

@ -272,7 +272,7 @@ public interface UserService extends IService<User> {
* @param uid id
* @return 用户信息
*/
UserCenterResponse getByUid(Integer uid);
UserResponse getByUid(Integer uid);
/**
* 根据手机号查询用户

View File

@ -1650,14 +1650,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
* @return 用户信息
*/
@Override
public UserCenterResponse getByUid(Integer uid) {
public UserResponse getByUid(Integer uid) {
LambdaQueryWrapper<User> lqw = new LambdaQueryWrapper<>();
lqw.eq(User::getUid, uid);
User user = userMapper.selectOne(lqw);
UserCenterResponse userCenterResponse = new UserCenterResponse();
BeanUtils.copyProperties(user,userCenterResponse);
userCenterResponse.setTenantName(tenantService.getInfo(user.getTenantId()).getTenantName());
return userCenterResponse;
UserResponse userResponse = new UserResponse();
BeanUtils.copyProperties(user,userResponse);
userResponse.setTenantName(tenantService.getInfo(user.getTenantId()).getTenantName());
return userResponse;
}
@Override