diff --git a/src/main/java/com/gxwebsoft/common/system/controller/UserRoleController.java b/src/main/java/com/gxwebsoft/common/system/controller/UserRoleController.java index 9385ece..0c14ecb 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/UserRoleController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/UserRoleController.java @@ -7,7 +7,6 @@ import com.gxwebsoft.common.system.entity.UserRole; import com.gxwebsoft.common.system.param.UserRoleParam; import com.gxwebsoft.common.core.web.ApiResult; import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.common.core.web.PageParam; import com.gxwebsoft.common.core.web.BatchParam; import com.gxwebsoft.common.core.annotation.OperationLog; import io.swagger.annotations.Api; diff --git a/src/main/java/com/gxwebsoft/common/system/controller/UserVerifyController.java b/src/main/java/com/gxwebsoft/common/system/controller/UserVerifyController.java index ec1fc15..1bb0d68 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/UserVerifyController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/UserVerifyController.java @@ -5,7 +5,9 @@ import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.gxwebsoft.common.core.web.BaseController; +import com.gxwebsoft.common.system.entity.Organization; import com.gxwebsoft.common.system.entity.User; +import com.gxwebsoft.common.system.service.OrganizationService; import com.gxwebsoft.common.system.service.UserService; import com.gxwebsoft.common.system.service.UserVerifyService; import com.gxwebsoft.common.system.entity.UserVerify; @@ -38,6 +40,8 @@ public class UserVerifyController extends BaseController { private UserVerifyService userVerifyService; @Resource private UserService userService; + @Resource + private OrganizationService organizationService; @PreAuthorize("hasAuthority('sys:userVerify:list')") @ApiOperation("分页查询实名认证") @@ -75,7 +79,12 @@ public class UserVerifyController extends BaseController { wrapper.eq(UserVerify::getStatus, param.getStatus()); } wrapper.last("limit 1"); - return success(userVerifyService.getOne(wrapper)); + final UserVerify one = userVerifyService.getOne(wrapper); + if(one.getOrganizationId() > 0){ + final Organization organization = organizationService.getById(one.getOrganizationId()); + one.setOrganizationName(organization.getOrganizationName()); + } + return success(one); } @ApiOperation("提交实名认证") diff --git a/src/main/java/com/gxwebsoft/common/system/entity/UserVerify.java b/src/main/java/com/gxwebsoft/common/system/entity/UserVerify.java index f6cccc2..b0277ed 100644 --- a/src/main/java/com/gxwebsoft/common/system/entity/UserVerify.java +++ b/src/main/java/com/gxwebsoft/common/system/entity/UserVerify.java @@ -1,17 +1,15 @@ package com.gxwebsoft.common.system.entity; import com.baomidou.mybatisplus.annotation.*; - -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.io.Serializable; -import java.util.Date; - import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.Date; + /** * 实名认证 * @@ -68,6 +66,13 @@ public class UserVerify implements Serializable { @ApiModelProperty(value = "机构ID") private Integer organizationId; + @ApiModelProperty(value = "机构ID") + @TableField(exist = false) + private String organizationName; + + @ApiModelProperty(value = "用户角色ID") + private Integer userRoleId; + @ApiModelProperty(value = "备注") private String comments; diff --git a/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserVerifyMapper.xml b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserVerifyMapper.xml index e555436..379cce3 100644 --- a/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserVerifyMapper.xml +++ b/src/main/java/com/gxwebsoft/common/system/mapper/xml/UserVerifyMapper.xml @@ -4,9 +4,10 @@ - SELECT a.*, b.phone + SELECT a.*, b.phone, c.organization_name FROM sys_user_verify a LEFT JOIN sys_user b ON a.user_id = b.user_id + LEFT JOIN sys_organization c ON a.organization_id = c.organization_id AND a.id = #{param.id}