feat: support kyc on user and system module
This commit is contained in:
@@ -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 >= #{item.createTimeStart}
|
||||
</if>
|
||||
<if test="item.createTimeEnd != null and item.createTimeEnd != ''">
|
||||
AND k.create_time <= #{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>
|
||||
Reference in New Issue
Block a user