| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?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="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" />
- <result property="idAddress" column="id_address" />
-
- </resultMap>
-
- <insert id="insertIdentityAuthentication" parameterType="IdentityAuthentication" useGeneratedKeys="true" keyProperty="id">
- insert into identi_authenti(
- <if test="userId != null">user_id,</if>
- <if test="idAddress != null and idAddress != ''">id_address,</if>
- <if test="name != null and name != ''">name,</if>
- <if test="identityNo != null and identityNo != ''">identity_no,</if>
- certification_time,
- <if test="certificationStatus != null">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="idAddress != null and idAddress != ''">#{idAddress},</if>
- <if test="name != null and name != ''">#{name},</if>
- <if test="identityNo != null and identityNo != ''">#{identityNo},</if>
- sysdate(),
- <if test="certificationStatus != null ">#{certificationStatus},</if>
- <if test="userName != null and userName != ''">#{userName},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- sysdate()
- )
- </insert>
- <update id="updateIdentityAuthentication">
- update identi_authenti
- <set>
- <if test="userId != null ">user_id = #{userId},</if>
- <if test="userName != null and userName != ''">user_name = #{userName},</if>
- <if test="identityNo != null and identityNo != ''">identity_no = #{identityNo},</if>
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- update_time = sysdate()
- </set>
- where id = #{id}
- </update>
-
- <select id="selectIdentityAuthentication" parameterType="IdentityAuthentication" resultMap="IdentityAuthenticationResult">
- SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name
- from identi_authenti i
- <where>
- certification_status=0
- <if test="userName != null and userName != '' ">
- AND i.user_name = #{userName}
- </if>
- <if test="userId != null ">
- AND i.user_id = #{userId}
- </if>
- <if test="identityNo != null and identityNo != '' ">
- AND i.identity_no = #{identityNo}
- </if>
- </where>
- limit 1
- </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>
-
-
-
-
-
-
-
-
- </mapper>
|