fix: return kyc status in user
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
package org.wfc.user.domain;
|
package org.wfc.user.api.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import org.wfc.common.core.web.domain.BaseEntity;
|
||||||
import org.wfc.common.mybatis.domain.BaseData;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -14,37 +12,27 @@ import lombok.NoArgsConstructor;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Builder
|
@Builder
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName("u_kyc")
|
|
||||||
@Schema(name = "UKyc", description = "User portal: u_kyc table")
|
public class UKyc extends BaseEntity {
|
||||||
public class UKyc extends BaseData {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Schema(description = "KYC ID")
|
|
||||||
private Long kycId;
|
private Long kycId;
|
||||||
|
|
||||||
@Schema(description = "User ID")
|
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
@Schema(description = "Real Name")
|
|
||||||
private String realName;
|
private String realName;
|
||||||
|
|
||||||
@Schema(description = "Birth Date")
|
|
||||||
private String birthDate;
|
private String birthDate;
|
||||||
|
|
||||||
@Schema(description = "Identify Type")
|
|
||||||
private Integer idType;
|
private Integer idType;
|
||||||
|
|
||||||
@Schema(description = "Identify File")
|
|
||||||
private String idFile;
|
private String idFile;
|
||||||
|
|
||||||
@Schema(description = "Identify Picture")
|
|
||||||
private String identifyPicture;
|
private String identifyPicture;
|
||||||
|
|
||||||
@Schema(description = "Status")
|
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Schema(description = "Description")
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
// @Schema(description = "Create Time")
|
// @Schema(description = "Create Time")
|
||||||
@@ -101,6 +101,10 @@ public class UUser extends BaseEntity
|
|||||||
/** 角色ID */
|
/** 角色ID */
|
||||||
private Long roleId;
|
private Long roleId;
|
||||||
|
|
||||||
|
/** User KYC Info */
|
||||||
|
@Excel(name = "KYC Status",readConverterExp = "1=VERIFIED,2=UNVERIFIED,3=PENDING,4=REJECTED", type = Type.EXPORT)
|
||||||
|
private String kycStatus;
|
||||||
|
|
||||||
public UUser()
|
public UUser()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -332,6 +336,15 @@ public class UUser extends BaseEntity
|
|||||||
{
|
{
|
||||||
this.roleId = roleId;
|
this.roleId = roleId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getKycStatus() {
|
||||||
|
return kycStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKycStatus(String kycStatus) {
|
||||||
|
this.kycStatus = kycStatus;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
@@ -354,6 +367,7 @@ public class UUser extends BaseEntity
|
|||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("dept", getDept())
|
.append("dept", getDept())
|
||||||
|
.append("kycStatus", getKycStatus())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,12 +13,14 @@ import org.wfc.common.core.web.domain.AjaxResult;
|
|||||||
import org.wfc.common.core.web.page.TableDataInfo;
|
import org.wfc.common.core.web.page.TableDataInfo;
|
||||||
import org.wfc.common.log.annotation.Log;
|
import org.wfc.common.log.annotation.Log;
|
||||||
import org.wfc.common.log.enums.BusinessType;
|
import org.wfc.common.log.enums.BusinessType;
|
||||||
import org.wfc.user.domain.UKyc;
|
import org.wfc.user.api.domain.UKyc;
|
||||||
import org.wfc.user.domain.constant.KycStatusEnum;
|
import org.wfc.user.domain.constant.KycStatusEnum;
|
||||||
import org.wfc.user.domain.vo.UKycUserVo;
|
import org.wfc.user.domain.vo.UKycUserVo;
|
||||||
import org.wfc.user.service.IUKycService;
|
import org.wfc.user.service.IUKycService;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -42,6 +44,13 @@ public class UKycController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @RequiresPermissions("Utem:kyc:query")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list() {
|
||||||
|
List<UKycUserVo> kyc = uKycService.selectKycByUserId();
|
||||||
|
return AjaxResult.success(kyc);
|
||||||
|
}
|
||||||
|
|
||||||
// @RequiresPermissions("Utem:kyc:add")
|
// @RequiresPermissions("Utem:kyc:add")
|
||||||
// @Log(title = "User Management", businessType = BusinessType.INSERT)
|
// @Log(title = "User Management", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/verify")
|
@PostMapping("/verify")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package org.wfc.user.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.wfc.user.domain.UKyc;
|
import org.wfc.user.api.domain.UKyc;
|
||||||
import org.wfc.user.domain.vo.UKycUserVo;
|
import org.wfc.user.domain.vo.UKycUserVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public interface UUserMapper
|
|||||||
* @param UUser 用户信息
|
* @param UUser 用户信息
|
||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
public List<UUser> selectUserList(UUser UUser);
|
public List<UUser> selectUserList(UUser user);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询已配用户角色列表
|
* 根据条件分页查询已配用户角色列表
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package org.wfc.user.service;
|
package org.wfc.user.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.wfc.user.domain.UKyc;
|
import org.wfc.user.api.domain.UKyc;
|
||||||
import org.wfc.user.domain.vo.UKycUserVo;
|
import org.wfc.user.domain.vo.UKycUserVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.wfc.common.core.domain.LoginUser;
|
|||||||
import org.wfc.common.core.utils.MessageUtils;
|
import org.wfc.common.core.utils.MessageUtils;
|
||||||
import org.wfc.common.security.utils.SecurityUtils;
|
import org.wfc.common.security.utils.SecurityUtils;
|
||||||
import org.wfc.user.api.domain.UUser;
|
import org.wfc.user.api.domain.UUser;
|
||||||
import org.wfc.user.domain.UKyc;
|
import org.wfc.user.api.domain.UKyc;
|
||||||
import org.wfc.user.domain.vo.UKycUserVo;
|
import org.wfc.user.domain.vo.UKycUserVo;
|
||||||
import org.wfc.user.mapper.UKycMapper;
|
import org.wfc.user.mapper.UKycMapper;
|
||||||
import org.wfc.user.service.IUKycService;
|
import org.wfc.user.service.IUKycService;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="fullName" column="full_name" />
|
<result property="fullName" column="full_name" />
|
||||||
<result property="age" column="age" />
|
<result property="age" column="age" />
|
||||||
<result property="address" column="address" />
|
<result property="address" column="address" />
|
||||||
|
<result property="kycStatus" column="kyc_status" />
|
||||||
<association property="dept" javaType="UDept" resultMap="deptResult" />
|
<association property="dept" javaType="UDept" resultMap="deptResult" />
|
||||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
@@ -49,19 +50,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="status" column="role_status" />
|
<result property="status" column="role_status" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="UKycResult" type="UKyc">
|
||||||
|
<id property="kycId" column="kyc_id" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="realName" column="real_name" />
|
||||||
|
<result property="birthDate" column="birth_date" />
|
||||||
|
<result property="idType" column="id_type" />
|
||||||
|
<result property="idFile" column="id_file" />
|
||||||
|
<result property="identifyPicture" column="identify_picture" />
|
||||||
|
<result property="status" column="kyc_status" />
|
||||||
|
<result property="description" column="description" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectUserVo">
|
<sql id="selectUserVo">
|
||||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.full_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.age, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.full_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.age, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
|
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
|
||||||
|
k.status as kyc_status
|
||||||
from u_user u
|
from u_user u
|
||||||
left join u_dept d on u.dept_id = d.dept_id
|
left join u_dept d on u.dept_id = d.dept_id
|
||||||
left join u_user_role ur on u.user_id = ur.user_id
|
left join u_user_role ur on u.user_id = ur.user_id
|
||||||
left join u_role r on r.role_id = ur.role_id
|
left join u_role r on r.role_id = ur.role_id
|
||||||
|
left join u_kyc k on u.user_id = k.user_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectUserList" parameterType="UUser" resultMap="UUserResult">
|
<select id="selectUserList" parameterType="UUser" resultMap="UUserResult">
|
||||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.full_name, u.email, u.avatar, u.phonenumber, u.sex, u.age, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from u_user u
|
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.full_name, u.email, u.avatar, u.phonenumber, u.sex, u.age, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||||
|
d.dept_name, d.leader,
|
||||||
|
k.status as kyc_status
|
||||||
|
from u_user u
|
||||||
left join u_dept d on u.dept_id = d.dept_id
|
left join u_dept d on u.dept_id = d.dept_id
|
||||||
|
left join u_kyc k on u.user_id = k.user_id
|
||||||
where u.del_flag = '0'
|
where u.del_flag = '0'
|
||||||
<if test="userId != null and userId != 0">
|
<if test="userId != null and userId != 0">
|
||||||
AND u.user_id = #{userId}
|
AND u.user_id = #{userId}
|
||||||
|
|||||||
Reference in New Issue
Block a user