|
|
|
<?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.zhonglai.luhui.user.mapper.UserAuthInfoMapper">
|
|
|
|
|
|
|
|
<resultMap type="UserAuthInfo" id="UserAuthInfoResult">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="nameAuthentication" column="name_authentication" />
|
|
|
|
<result property="personalAuthenticationState" column="personal_authentication_state" />
|
|
|
|
<result property="enterpriseAuthenticationState" column="enterprise_authentication_state" />
|
|
|
|
<result property="personalAuthenticationDescribe" column="personal_authentication_describe" />
|
|
|
|
<result property="enterpriseAuthenticationDescribe" column="enterprise_authentication_describe" />
|
|
|
|
<result property="personalAuthenticationTime" column="personal_authentication_time" />
|
|
|
|
<result property="enterpriseAuthenticationTime" column="enterprise_authentication_time" />
|
|
|
|
<result property="identificationCard" column="identification_card" />
|
|
|
|
<result property="businessLicenseNo" column="business_license_no" />
|
|
|
|
<result property="enterpriseName" column="enterprise_name" />
|
|
|
|
<result property="businessLicenseUrl" column="business_license_url" />
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectUserAuthInfoVo">
|
|
|
|
select id, name_authentication, personal_authentication_state, enterprise_authentication_state, personal_authentication_describe, enterprise_authentication_describe, personal_authentication_time, enterprise_authentication_time, identification_card, business_license_no, enterprise_name, business_license_url from user_auth_info
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectUserAuthInfoList" parameterType="UserAuthInfo" resultMap="UserAuthInfoResult">
|
|
|
|
<include refid="selectUserAuthInfoVo"/>
|
|
|
|
<where>
|
|
|
|
<if test="nameAuthentication != null "> and name_authentication = #{nameAuthentication}</if>
|
|
|
|
<if test="personalAuthenticationState != null "> and personal_authentication_state = #{personalAuthenticationState}</if>
|
|
|
|
<if test="enterpriseAuthenticationState != null "> and enterprise_authentication_state = #{enterpriseAuthenticationState}</if>
|
|
|
|
<if test="personalAuthenticationDescribe != null and personalAuthenticationDescribe != ''"> and personal_authentication_describe = #{personalAuthenticationDescribe}</if>
|
|
|
|
<if test="enterpriseAuthenticationDescribe != null and enterpriseAuthenticationDescribe != ''"> and enterprise_authentication_describe = #{enterpriseAuthenticationDescribe}</if>
|
|
|
|
<if test="personalAuthenticationTime != null "> and personal_authentication_time = #{personalAuthenticationTime}</if>
|
|
|
|
<if test="enterpriseAuthenticationTime != null "> and enterprise_authentication_time = #{enterpriseAuthenticationTime}</if>
|
|
|
|
<if test="identificationCard != null and identificationCard != ''"> and identification_card = #{identificationCard}</if>
|
|
|
|
<if test="businessLicenseNo != null and businessLicenseNo != ''"> and business_license_no like concat('%', #{businessLicenseNo}, '%')</if>
|
|
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
|
|
|
|
<if test="businessLicenseUrl != null and businessLicenseUrl != ''"> and business_license_url = #{businessLicenseUrl}</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectUserAuthInfoById" parameterType="Integer" resultMap="UserAuthInfoResult">
|
|
|
|
<include refid="selectUserAuthInfoVo"/>
|
|
|
|
where id = #{id}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertUserAuthInfo" parameterType="UserAuthInfo">
|
|
|
|
insert into user_auth_info
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="id != null">id,</if>
|
|
|
|
<if test="nameAuthentication != null">name_authentication,</if>
|
|
|
|
<if test="personalAuthenticationState != null">personal_authentication_state,</if>
|
|
|
|
<if test="enterpriseAuthenticationState != null">enterprise_authentication_state,</if>
|
|
|
|
<if test="personalAuthenticationDescribe != null">personal_authentication_describe,</if>
|
|
|
|
<if test="enterpriseAuthenticationDescribe != null">enterprise_authentication_describe,</if>
|
|
|
|
<if test="personalAuthenticationTime != null">personal_authentication_time,</if>
|
|
|
|
<if test="enterpriseAuthenticationTime != null">enterprise_authentication_time,</if>
|
|
|
|
<if test="identificationCard != null">identification_card,</if>
|
|
|
|
<if test="businessLicenseNo != null">business_license_no,</if>
|
|
|
|
<if test="enterpriseName != null">enterprise_name,</if>
|
|
|
|
<if test="businessLicenseUrl != null">business_license_url,</if>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="id != null">#{id},</if>
|
|
|
|
<if test="nameAuthentication != null">#{nameAuthentication},</if>
|
|
|
|
<if test="personalAuthenticationState != null">#{personalAuthenticationState},</if>
|
|
|
|
<if test="enterpriseAuthenticationState != null">#{enterpriseAuthenticationState},</if>
|
|
|
|
<if test="personalAuthenticationDescribe != null">#{personalAuthenticationDescribe},</if>
|
|
|
|
<if test="enterpriseAuthenticationDescribe != null">#{enterpriseAuthenticationDescribe},</if>
|
|
|
|
<if test="personalAuthenticationTime != null">#{personalAuthenticationTime},</if>
|
|
|
|
<if test="enterpriseAuthenticationTime != null">#{enterpriseAuthenticationTime},</if>
|
|
|
|
<if test="identificationCard != null">#{identificationCard},</if>
|
|
|
|
<if test="businessLicenseNo != null">#{businessLicenseNo},</if>
|
|
|
|
<if test="enterpriseName != null">#{enterpriseName},</if>
|
|
|
|
<if test="businessLicenseUrl != null">#{businessLicenseUrl},</if>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="updateUserAuthInfo" parameterType="UserAuthInfo">
|
|
|
|
update user_auth_info
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<if test="nameAuthentication != null">name_authentication = #{nameAuthentication},</if>
|
|
|
|
<if test="personalAuthenticationState != null">personal_authentication_state = #{personalAuthenticationState},</if>
|
|
|
|
<if test="enterpriseAuthenticationState != null">enterprise_authentication_state = #{enterpriseAuthenticationState},</if>
|
|
|
|
<if test="personalAuthenticationDescribe != null">personal_authentication_describe = #{personalAuthenticationDescribe},</if>
|
|
|
|
<if test="enterpriseAuthenticationDescribe != null">enterprise_authentication_describe = #{enterpriseAuthenticationDescribe},</if>
|
|
|
|
<if test="personalAuthenticationTime != null">personal_authentication_time = #{personalAuthenticationTime},</if>
|
|
|
|
<if test="enterpriseAuthenticationTime != null">enterprise_authentication_time = #{enterpriseAuthenticationTime},</if>
|
|
|
|
<if test="identificationCard != null">identification_card = #{identificationCard},</if>
|
|
|
|
<if test="businessLicenseNo != null">business_license_no = #{businessLicenseNo},</if>
|
|
|
|
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
|
|
|
|
<if test="businessLicenseUrl != null">business_license_url = #{businessLicenseUrl},</if>
|
|
|
|
</trim>
|
|
|
|
where id = #{id}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<delete id="deleteUserAuthInfoById" parameterType="Integer">
|
|
|
|
delete from user_auth_info where id = #{id}
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
<delete id="deleteUserAuthInfoByIds" parameterType="String">
|
|
|
|
delete from user_auth_info where id in
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|