refactor: 后台用户更新 租户注册二维码域名获取
This commit is contained in:
parent
a87b5c600e
commit
ba4d22792c
@ -96,7 +96,7 @@ public class UserCenterResponse implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "公司名称")
|
||||
private String tenantName;
|
||||
@ApiModelProperty(value = "租户名称")
|
||||
@ApiModelProperty(value = "租户id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.yzt.common.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -25,6 +26,10 @@ public class UserResponse {
|
||||
@JsonIgnore
|
||||
private String pwd;
|
||||
|
||||
@ApiModelProperty(value = "租户名称")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long tenantId;
|
||||
|
||||
@ApiModelProperty(value = "真实姓名")
|
||||
private String realName;
|
||||
|
||||
|
||||
@ -53,6 +53,9 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, Tenant> impleme
|
||||
@Autowired
|
||||
private SystemAttachmentService systemAttachmentService;
|
||||
|
||||
@Autowired
|
||||
private SystemConfigService systemConfigService;
|
||||
|
||||
@Autowired
|
||||
private QrCodeService qrCodeService;
|
||||
|
||||
@ -68,7 +71,7 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, Tenant> impleme
|
||||
tenant.setCreatedTime(YztDateUtil.nowDateTime());
|
||||
tenant.setCreatedBy(SecurityUtil.getLoginUserVo().getUser().getId());
|
||||
}
|
||||
if(tenant.getRegisterQrCodeUrl().isBlank()){
|
||||
if(ObjectUtil.isNull(tenant.getRegisterQrCodeUrl())){
|
||||
tenant.setRegisterQrCodeUrl(generateRegisterUrl());
|
||||
}
|
||||
tenant.setUpdatedTime(YztDateUtil.nowDateTime());
|
||||
@ -176,7 +179,7 @@ public class TenantServiceImpl extends ServiceImpl<TenantMapper, Tenant> impleme
|
||||
|
||||
@Override
|
||||
public String generateRegisterUrl() {
|
||||
return systemAttachmentService.getCdnUrl()+"/#/pages/register/register?tenantId=" + SecurityUtil.getLoginUserVo().getUser().getTenantId();
|
||||
return systemConfigService.getValueByKey("register_qr_code_url")+"/#/pages/register/register?tenantId=" + SecurityUtil.getLoginUserVo().getUser().getTenantId();
|
||||
}
|
||||
|
||||
private void checkNameExist(TenantSaveRequest req) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user