实现身份认证查询
This commit is contained in:
+56
@@ -3,7 +3,63 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper">
|
||||
<resultMap type="IdentityAuthentication" id="IdentityAuthenticationResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="identityNo" column="identity_no" />
|
||||
<result property="certificationTime" column="certification_time" />
|
||||
<result property="certificationStatus" column="certification_status" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertIdentityAuthentication" parameterType="IdentityAuthentication" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into identi_authenti(
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="identityNo != null and identityNo != ''">identity_no,</if>
|
||||
<if test="certificationTime != null and certificationTime != ''">certification_time,</if>
|
||||
<if test="certificationStatus != null and certificationStatus != ''">certification_status,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null ">#{userId},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="identityNo != null and identityNo != ''">#{identityNo},</if>
|
||||
<if test="certificationTime != null and certificationTime != ''">#{certificationTime},</if>
|
||||
<if test="certificationStatus != null and certificationStatus != ''">#{certificationStatus},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="selectIdentityAuthentication" parameterType="IdentityAuthentication" resultMap="IdentityAuthenticationResult">
|
||||
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certificationStatus ,i.user_id ,i.user_name
|
||||
from identi_authenti i
|
||||
<where>
|
||||
<if test="userName != null and userName != '' ">
|
||||
AND i.user_name = #{userName}
|
||||
</if>
|
||||
<if test="userId != null ">
|
||||
AND i.user_id = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCountIdentityAuthentication" resultType="Integer">
|
||||
select count(1) from identi_authenti i
|
||||
<where>
|
||||
<if test="userName != null and userName != '' ">
|
||||
AND i.user_name = #{userName}
|
||||
</if>
|
||||
<if test="userId != null ">
|
||||
AND i.user_id = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user