2
0

fix: update kyc user module

This commit is contained in:
zhangsz
2025-01-15 14:33:51 +08:00
parent 2deaac0c5b
commit 6eaf2bf471
14 changed files with 189 additions and 17 deletions

View File

@@ -46,6 +46,7 @@ spring:
mybatis-plus:
# 搜索指定包别名
type-aliases-package: org.wfc.user
config-location: classpath:mybatis-config.xml
# 配置mapper的扫描找到所有的mapper.xml映射文件
mapper-locations: classpath:mapper/**/*.xml
global-config:
@@ -62,7 +63,7 @@ swagger:
# Omada 配置
omada:
omada-url: 'https://192.168.2.248:8043'
omada-url: 'https://192.168.2.249:8043'
omadac-id: 'f3aa6e479b94222581523710cc2c2a9d'
client-id: '5036e77c81a74008821c694a715fe2b8'
client-secret: '29faa06fb7f244b094377b48eb3083a7'

View File

@@ -5,6 +5,7 @@
<resultMap type="UKyc" id="UKycResult">
<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" />
@@ -21,6 +22,7 @@
<insert id="insertUserKyc" parameterType="UKyc" useGeneratedKeys="true" keyProperty="kycId">
INSERT INTO u_kyc(
<if test="userId != null and userId != 0">user_id,</if>
<if test="realName != null and realName != ''">real_name,</if>
<if test="birthDate != null">birth_date,</if>
<if test="idType != null and idType != ''">id_type,</if>
<if test="idFile != null and idFile != ''">id_file,</if>
@@ -31,7 +33,8 @@
create_time
)VALUES(
<if test="userId != null and userId != ''">#{userId},</if>
<if test="birthDate != null">STR_TO_DATE(#{birthDate}, '%Y-%m-%d %H:%i:%s'),</if>
<if test="realName != null and realName != ''">#{realName},</if>
<if test="birthDate != null">STR_TO_DATE(#{birthDate}, '%Y-%m-%d'),</if>
<if test="idType != null and idType != ''">#{idType},</if>
<if test="idFile != null and idFile != ''">#{idFile},</if>
<if test="identifyPicture != null and identifyPicture != ''">#{identifyPicture},</if>
@@ -45,7 +48,8 @@
<update id="updateUserKyc" parameterType="UKyc">
UPDATE u_kyc
<set>
<if test="birthDate != null">birth_date = STR_TO_DATE(#{birthDate}, '%Y-%m-%d %H:%i:%s'),</if>
<if test="realName != null and realName != ''">real_name = #{realName},</if>
<if test="birthDate != null">birth_date = STR_TO_DATE(#{birthDate}, '%Y-%m-%d'),</if>
<if test="idType != null and idType != ''">id_type = #{idType},</if>
<if test="idFile != null and idFile != ''">id_file = #{idFile},</if>
<if test="identifyPicture != null and identifyPicture != ''">identify_picture = #{identifyPicture},</if>
@@ -73,7 +77,7 @@
SELECT
k.kyc_id,
k.user_id,
u.full_name as realName,
u.full_name as real_name,
k.birth_date,
k.id_type,
k.id_file,

View File

@@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, 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,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from u_user u
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectUserList" parameterType="UUser" resultMap="UUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, 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 from u_user u
left join u_dept d on u.dept_id = d.dept_id
where u.del_flag = '0'
<if test="userId != null and userId != 0">
@@ -192,9 +192,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="fullName != null and fullName != ''">full_name = #{fullName},</if>
<if test="email != null ">email = #{email},</if>
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
<if test="sex != null and sex != ''">sex = #{sex},</if>
<if test="age != null and age != 0">age = #{age},</if>
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
<if test="password != null and password != ''">password = #{password},</if>
<if test="status != null and status != ''">status = #{status},</if>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<typeHandlers>
<typeHandler handler="org.wfc.user.typehandler.IdTypeEnumTypeHandler" javaType="org.wfc.user.domain.constant.IdTypeEnum"/>
<typeHandler handler="org.wfc.user.typehandler.KycStatusEnumTypeHandler" javaType="org.wfc.user.domain.constant.KycStatusEnum"/>
</typeHandlers>
</configuration>