2
0

feat: support kyc on user and system module

This commit is contained in:
zhangsz
2025-01-10 11:03:34 +08:00
parent 832b5a86a8
commit 55e7c22469
19 changed files with 405 additions and 40 deletions

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.wfc.system.mapper.UKycMapper">
<select id="selectKycByUserId" resultType="org.wfc.system.domain.vo.UKycUserVo">
SELECT
k.kyc_id,
k.user_id,
u.user_name,
k.birth_date,
k.id_type,
k.id_file,
k.identify_picture,
k.`status`,
<!-- u.`kyc_status` as user_kyc_status, -->
k.create_time,
k.update_time
FROM
u_kyc k
LEFT JOIN u_user u ON u.user_id = k.user_id
WHERE
u.del_flag = 0
AND k.del_flag = 0
<if test="item.userId != null and item.userId != ''">
AND k.user_id = #{item.userId}
</if>
<if test="item.userName != null and item.userName != ''">
AND u.user_name like concat('%', #{item.userName}, '%')
</if>
<if test="item.userName != null and item.userName != ''">
AND u.user_name like concat('%', #{item.userName}, '%')
</if>
<if test="item.status != null and item.status != ''">
AND k.`status` = #{item.status}
</if>
<if test="item.createTimeStart != null and item.createTimeStart != ''">
AND k.create_time &gt;= #{item.createTimeStart}
</if>
<if test="item.createTimeEnd != null and item.createTimeEnd != ''">
AND k.create_time &lt;= #{item.createTimeEnd}
</if>
ORDER BY
k.create_time DESC
</select>
<update id="updateKycByUserId" parameterType="UKyc">
UPDATE u_kyc
<set>
<if test="status != null and status != 0">status = #{status},</if>
<if test="description != null and description != ''">description = #{description},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
WHERE user_id = #{userId}
</update>
</mapper>