feat: support kyc on user and system module
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertUserKyc" parameterType="UKyc" useGeneratedKeys="true" keyProperty="kycId">
|
||||
insert into u_kyc(
|
||||
INSERT INTO u_kyc(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="birthDate != null">birth_date,</if>
|
||||
<if test="idType != null and idType != ''">id_type,</if>
|
||||
@@ -29,7 +29,7 @@
|
||||
<if test="description != null and description != ''">description,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
)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="idType != null and idType != ''">#{idType},</if>
|
||||
@@ -43,7 +43,7 @@
|
||||
</insert>
|
||||
|
||||
<update id="updateUserKyc" parameterType="UKyc">
|
||||
update u_kyc
|
||||
UPDATE u_kyc
|
||||
<set>
|
||||
<if test="birthDate != null">birth_date = STR_TO_DATE(#{birthDate}, '%Y-%m-%d %H:%i:%s'),</if>
|
||||
<if test="idType != null and idType != ''">id_type = #{idType},</if>
|
||||
@@ -54,11 +54,19 @@
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
WHERE user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<select id="isExistUserKyc" parameterType="Long" resultType="int">
|
||||
select count(1) from u_user where user_id = #{userId} and del_flag = '0'
|
||||
SELECT
|
||||
count(1)
|
||||
FROM
|
||||
u_kyc k
|
||||
LEFT JOIN u_user u ON u.user_id = k.user_id
|
||||
WHERE
|
||||
k.user_id = #{userId}
|
||||
AND k.del_flag = '0'
|
||||
AND u.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectKycByUserId" resultType="org.wfc.user.domain.vo.UKycUserVo">
|
||||
@@ -70,8 +78,8 @@
|
||||
k.id_type,
|
||||
k.id_file,
|
||||
k.identify_picture,
|
||||
k.`status` as kyc_request_status,
|
||||
u.`kyc_status` as user_kyc_status,
|
||||
k.`status`,
|
||||
<!-- u.`kyc_status` as user_kyc_status, -->
|
||||
k.create_time,
|
||||
k.update_time
|
||||
FROM
|
||||
@@ -83,5 +91,4 @@
|
||||
AND k.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user