Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
21f3e553ba
@ -1,6 +1,7 @@
|
||||
package com.yzt.common.request;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yzt.common.constants.RegularConstants;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -38,6 +39,9 @@ public class SystemAdminAddRequest implements Serializable {
|
||||
@Length(max = 32, message = "密码长度不能超过32个字符")
|
||||
private String pwd;
|
||||
|
||||
@ApiModelProperty("租户tenantId")
|
||||
private Long tenantId;
|
||||
|
||||
@ApiModelProperty(value = "后台管理员姓名", required = true)
|
||||
@NotNull(message = "管理姓名不能为空")
|
||||
@Length(max = 16, message = "姓名长度不能超过16个字符")
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.yzt.common.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -20,6 +21,9 @@ public class SystemAdminRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
|
||||
@ApiModelProperty("租户tenantId")
|
||||
private Long tenantId;
|
||||
@ApiModelProperty(value = "后台管理员姓名")
|
||||
private String realName;
|
||||
|
||||
|
||||
@ -59,4 +59,5 @@ public class SystemAdminUpdateRequest implements Serializable {
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
@Pattern(regexp = RegularConstants.PHONE_TWO, message = "请填写正确的手机号")
|
||||
private String phone;
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.yzt.common.response;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ -19,6 +20,12 @@ public class SystemAdminResponse implements Serializable {
|
||||
|
||||
private String account;
|
||||
|
||||
@ApiModelProperty("租户名称")
|
||||
private String tenantName;
|
||||
|
||||
@ApiModelProperty("租户tenantId")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long tenantId;
|
||||
// private String pwd;
|
||||
|
||||
private String realName;
|
||||
|
||||
@ -21,6 +21,7 @@ import com.yzt.common.utils.ValidateFormUtil;
|
||||
import com.yzt.service.mapper.SystemAdminMapper;
|
||||
import com.yzt.service.service.SystemAdminService;
|
||||
import com.yzt.service.service.SystemRoleService;
|
||||
import com.yzt.service.service.TenantService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -45,6 +46,8 @@ public class SystemAdminServiceImpl extends ServiceImpl<SystemAdminMapper, Syste
|
||||
@Autowired
|
||||
private SystemRoleService systemRoleService;
|
||||
|
||||
@Autowired
|
||||
private TenantService tenantService;
|
||||
/**
|
||||
* 后台管理员列表
|
||||
* @param request 请求参数
|
||||
@ -87,6 +90,7 @@ public class SystemAdminServiceImpl extends ServiceImpl<SystemAdminMapper, Syste
|
||||
}
|
||||
}
|
||||
sar.setRoleNames(StringUtils.join(roleNames,","));
|
||||
sar.setTenantName(tenantService.getInfo(admin.getTenantId()).getTenantName());
|
||||
systemAdminResponses.add(sar);
|
||||
}
|
||||
return systemAdminResponses;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user