| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- <?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.goafanti.common.dao.UserIdentityMapper" >
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.UserIdentity" >
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="uid" property="uid" jdbcType="VARCHAR" />
- <result column="username" property="username" jdbcType="VARCHAR" />
- <result column="sex" property="sex" jdbcType="VARCHAR" />
- <result column="date_of_birth_year" property="dateOfBirthYear" jdbcType="VARCHAR" />
- <result column="date_of_birth_month" property="dateOfBirthMonth" jdbcType="VARCHAR" />
- <result column="id_number" property="idNumber" jdbcType="VARCHAR" />
- <result column="positive_id_url" property="positiveIdUrl" jdbcType="VARCHAR" />
- <result column="opposite_id_url" property="oppositeIdUrl" jdbcType="VARCHAR" />
- <result column="aft_username" property="aftUsername" jdbcType="VARCHAR" />
- <result column="province" property="province" jdbcType="VARCHAR" />
- <result column="city" property="city" jdbcType="VARCHAR" />
- <result column="area" property="area" jdbcType="VARCHAR" />
- <result column="contact_mobile" property="contactMobile" jdbcType="VARCHAR" />
- <result column="bank_name" property="bankName" jdbcType="VARCHAR" />
- <result column="bank_account" property="bankAccount" jdbcType="VARCHAR" />
- <result column="bank_card_number" property="bankCardNumber" jdbcType="VARCHAR" />
- <result column="amount_money" property="amountMoney" jdbcType="DECIMAL" />
- <result column="audit_status" property="auditStatus" jdbcType="INTEGER" />
- <result column="process" property="process" jdbcType="INTEGER" />
- <result column="wrong_count" property="wrongCount" jdbcType="INTEGER" />
- <result column="payment_date" property="paymentDate" jdbcType="TIMESTAMP" />
- </resultMap>
- <sql id="Base_Column_List" >
- id, uid, username, sex, date_of_birth_year, date_of_birth_month, id_number, positive_id_url,
- opposite_id_url, aft_username, province, city, area, contact_mobile, bank_name, bank_account,
- bank_card_number, amount_money, audit_status, process , wrong_count, payment_date
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from user_identity
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
- delete from user_identity
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.UserIdentity" >
- insert into user_identity (id, uid, username,
- sex, date_of_birth_year, date_of_birth_month,
- id_number, positive_id_url, opposite_id_url,
- aft_username, province, city,
- area, contact_mobile, bank_name,
- bank_account, bank_card_number, amount_money,
- audit_status, process, payment_date)
- values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
- #{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR}, #{dateOfBirthMonth,jdbcType=VARCHAR},
- #{idNumber,jdbcType=VARCHAR}, #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR},
- #{aftUsername,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR},
- #{area,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR},
- #{bankAccount,jdbcType=VARCHAR}, #{bankCardNumber,jdbcType=VARCHAR}, #{amountMoney,jdbcType=DECIMAL},
- #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity" >
- insert into user_identity
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="uid != null" >
- uid,
- </if>
- <if test="username != null" >
- username,
- </if>
- <if test="sex != null" >
- sex,
- </if>
- <if test="dateOfBirthYear != null" >
- date_of_birth_year,
- </if>
- <if test="dateOfBirthMonth != null" >
- date_of_birth_month,
- </if>
- <if test="idNumber != null" >
- id_number,
- </if>
- <if test="positiveIdUrl != null" >
- positive_id_url,
- </if>
- <if test="oppositeIdUrl != null" >
- opposite_id_url,
- </if>
- <if test="aftUsername != null" >
- aft_username,
- </if>
- <if test="province != null" >
- province,
- </if>
- <if test="city != null" >
- city,
- </if>
- <if test="area != null" >
- area,
- </if>
- <if test="contactMobile != null" >
- contact_mobile,
- </if>
- <if test="bankName != null" >
- bank_name,
- </if>
- <if test="bankAccount != null" >
- bank_account,
- </if>
- <if test="bankCardNumber != null" >
- bank_card_number,
- </if>
- <if test="amountMoney != null" >
- amount_money,
- </if>
- <if test="auditStatus != null" >
- audit_status,
- </if>
- <if test="process != null" >
- process,
- </if>
- <if test="wrongCount != null" >
- wrong_count,
- </if>
- <if test="paymentDate != null" >
- payment_date,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="uid != null" >
- #{uid,jdbcType=VARCHAR},
- </if>
- <if test="username != null" >
- #{username,jdbcType=VARCHAR},
- </if>
- <if test="sex != null" >
- #{sex,jdbcType=VARCHAR},
- </if>
- <if test="dateOfBirthYear != null" >
- #{dateOfBirthYear,jdbcType=VARCHAR},
- </if>
- <if test="dateOfBirthMonth != null" >
- #{dateOfBirthMonth,jdbcType=VARCHAR},
- </if>
- <if test="idNumber != null" >
- #{idNumber,jdbcType=VARCHAR},
- </if>
- <if test="positiveIdUrl != null" >
- #{positiveIdUrl,jdbcType=VARCHAR},
- </if>
- <if test="oppositeIdUrl != null" >
- #{oppositeIdUrl,jdbcType=VARCHAR},
- </if>
- <if test="aftUsername != null" >
- #{aftUsername,jdbcType=VARCHAR},
- </if>
- <if test="province != null" >
- #{province,jdbcType=VARCHAR},
- </if>
- <if test="city != null" >
- #{city,jdbcType=VARCHAR},
- </if>
- <if test="area != null" >
- #{area,jdbcType=VARCHAR},
- </if>
- <if test="contactMobile != null" >
- #{contactMobile,jdbcType=VARCHAR},
- </if>
- <if test="bankName != null" >
- #{bankName,jdbcType=VARCHAR},
- </if>
- <if test="bankAccount != null" >
- #{bankAccount,jdbcType=VARCHAR},
- </if>
- <if test="bankCardNumber != null" >
- #{bankCardNumber,jdbcType=VARCHAR},
- </if>
- <if test="amountMoney != null" >
- #{amountMoney,jdbcType=DECIMAL},
- </if>
- <if test="auditStatus != null" >
- #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="process != null" >
- #{process,jdbcType=INTEGER},
- </if>
- <if test="wrongCount != null" >
- #{wrongCount,jdbcType=INTEGER},
- </if>
- <if test="paymentDate != null" >
- #{paymentDate,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserIdentity" >
- update user_identity
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=VARCHAR},
- </if>
- <if test="username != null" >
- username = #{username,jdbcType=VARCHAR},
- </if>
- <if test="sex != null" >
- sex = #{sex,jdbcType=VARCHAR},
- </if>
- <if test="dateOfBirthYear != null" >
- date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
- </if>
- <if test="dateOfBirthMonth != null" >
- date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
- </if>
- <if test="idNumber != null" >
- id_number = #{idNumber,jdbcType=VARCHAR},
- </if>
- <if test="positiveIdUrl != null" >
- positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
- </if>
- <if test="oppositeIdUrl != null" >
- opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
- </if>
- <if test="aftUsername != null" >
- aft_username = #{aftUsername,jdbcType=VARCHAR},
- </if>
- <if test="province != null" >
- province = #{province,jdbcType=VARCHAR},
- </if>
- <if test="city != null" >
- city = #{city,jdbcType=VARCHAR},
- </if>
- <if test="area != null" >
- area = #{area,jdbcType=VARCHAR},
- </if>
- <if test="contactMobile != null" >
- contact_mobile = #{contactMobile,jdbcType=VARCHAR},
- </if>
- <if test="bankName != null" >
- bank_name = #{bankName,jdbcType=VARCHAR},
- </if>
- <if test="bankAccount != null" >
- bank_account = #{bankAccount,jdbcType=VARCHAR},
- </if>
- <if test="bankCardNumber != null" >
- bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
- </if>
- <if test="amountMoney != null" >
- amount_money = #{amountMoney,jdbcType=DECIMAL},
- </if>
- <if test="auditStatus != null" >
- audit_status = #{auditStatus,jdbcType=INTEGER},
- </if>
- <if test="process != null" >
- process = #{process,jdbcType=INTEGER},
- </if>
- <if test="wrongCount != null" >
- wrong_count = #{wrongCount,jdbcType=INTEGER},
- </if>
- <if test="paymentDate != null" >
- payment_date = #{paymentDate,jdbcType=TIMESTAMP},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.UserIdentity" >
- update user_identity
- set uid = #{uid,jdbcType=VARCHAR},
- username = #{username,jdbcType=VARCHAR},
- sex = #{sex,jdbcType=VARCHAR},
- date_of_birth_year = #{dateOfBirthYear,jdbcType=VARCHAR},
- date_of_birth_month = #{dateOfBirthMonth,jdbcType=VARCHAR},
- id_number = #{idNumber,jdbcType=VARCHAR},
- positive_id_url = #{positiveIdUrl,jdbcType=VARCHAR},
- opposite_id_url = #{oppositeIdUrl,jdbcType=VARCHAR},
- aft_username = #{aftUsername,jdbcType=VARCHAR},
- province = #{province,jdbcType=VARCHAR},
- city = #{city,jdbcType=VARCHAR},
- area = #{area,jdbcType=VARCHAR},
- contact_mobile = #{contactMobile,jdbcType=VARCHAR},
- bank_name = #{bankName,jdbcType=VARCHAR},
- bank_account = #{bankAccount,jdbcType=VARCHAR},
- bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
- amount_money = #{amountMoney,jdbcType=DECIMAL},
- audit_status = #{auditStatus,jdbcType=INTEGER},
- process = #{process,jdbcType=INTEGER},
- wrong_count = #{wrongCount,jdbcType=INTEGER},
- payment_date = #{paymentDate,jdbcType=TIMESTAMP}
- where id = #{id,jdbcType=VARCHAR}
- </update>
-
- <select id="selectUserIdentityByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from user_identity
- where uid = #{uid,jdbcType=VARCHAR}
- </select>
-
-
- <select id="selectUserIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserIdentityBo">
- select t.id, t.uid, t.username, t.sex, t.date_of_birth_year as dateOfBirthYear,
- t.date_of_birth_month as dateOfBirthMonth, t.id_number as idNumber, t.audit_status as auditStatus,
- u.mobile, u.number from user u left JOIN user_identity t
- on t.uid = u.id where t.uid=#{uid,jdbcType=VARCHAR}
- </select>
- </mapper>
|