| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <?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">
- <!-- namespace必须指向DAO接口 -->
- <mapper namespace="com.jpsoft.employment.modules.base.dao.CustomerInfoDAO">
- <resultMap id="CustomerInfoMap" type="com.jpsoft.employment.modules.base.entity.CustomerInfo">
- <id property="id" column="id_" />
- <result property="userName" column="user_name" />
- <result property="password" column="password_" />
- <result property="openId" column="open_id" />
- <result property="phone" column="phone_" />
- <result property="idCard" column="id_card" />
- <result property="idCardImage" column="id_card_image" />
- <result property="realName" column="real_name" />
- <result property="gender" column="gender_" />
- <result property="region" column="region_" />
- <result property="image" column="image_" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="updateBy" column="update_by" />
- <result property="companyName" column="company_name" />
- <result property="status" column="status_" />
- <result property="businessLicense" column="business_license" />
- <result property="businessCode" column="business_code" />
- </resultMap>
- <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.CustomerInfo">
- <!--
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
- select sys_guid() from dual
- </selectKey>
- -->
- <![CDATA[
- insert into base_customer_info
- (id_,user_name,password_,open_id,phone_,id_card,id_card_image,real_name,gender_,region_,image_,create_time,update_time,del_flag,create_by,update_by,company_name,status_,business_license,business_code)
- values
- (
- #{id,jdbcType=VARCHAR}
- ,#{userName,jdbcType=VARCHAR}
- ,#{password,jdbcType=VARCHAR}
- ,#{openId,jdbcType=VARCHAR}
- ,#{phone,jdbcType=VARCHAR}
- ,#{idCard,jdbcType=VARCHAR}
- ,#{idCardImage,jdbcType=VARCHAR}
- ,#{realName,jdbcType=VARCHAR}
- ,#{gender,jdbcType=VARCHAR}
- ,#{region,jdbcType=VARCHAR}
- ,#{image,jdbcType=VARCHAR}
- ,#{createTime,jdbcType= TIMESTAMP }
- ,#{updateTime,jdbcType= TIMESTAMP }
- ,#{delFlag,jdbcType= NUMERIC }
- ,#{createBy,jdbcType=VARCHAR}
- ,#{updateBy,jdbcType=VARCHAR}
- ,#{companyName,jdbcType=VARCHAR}
- ,#{status,jdbcType=VARCHAR}
- ,#{businessLicense,jdbcType=VARCHAR}
- ,#{businessCode,jdbcType=VARCHAR}
- )
- ]]>
- </insert>
- <delete id="delete" parameterType="string">
- delete from base_customer_info where id_=#{id,jdbcType=VARCHAR}
- </delete>
- <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.CustomerInfo">
- update base_customer_info
- <set>
- <if test="userName!=null">
- user_name=#{userName,jdbcType=VARCHAR},
- </if>
- <if test="password!=null">
- password_=#{password,jdbcType=VARCHAR},
- </if>
- <if test="openId!=null">
- open_id=#{openId,jdbcType=VARCHAR},
- </if>
- <if test="phone!=null">
- phone_=#{phone,jdbcType=VARCHAR},
- </if>
- <if test="idCard!=null">
- id_card=#{idCard,jdbcType=VARCHAR},
- </if>
- <if test="idCardImage!=null">
- id_card_image=#{idCardImage,jdbcType=VARCHAR},
- </if>
- <if test="realName!=null">
- real_name=#{realName,jdbcType=VARCHAR},
- </if>
- <if test="gender!=null">
- gender_=#{gender,jdbcType=VARCHAR},
- </if>
- <if test="region!=null">
- region_=#{region,jdbcType=VARCHAR},
- </if>
- <if test="image!=null">
- image_=#{image,jdbcType=VARCHAR},
- </if>
- <if test="createTime!=null">
- create_time=#{createTime,jdbcType= TIMESTAMP },
- </if>
- <if test="updateTime!=null">
- update_time=#{updateTime,jdbcType= TIMESTAMP },
- </if>
- <if test="delFlag!=null">
- del_flag=#{delFlag,jdbcType= NUMERIC },
- </if>
- <if test="createBy!=null">
- create_by=#{createBy,jdbcType=VARCHAR},
- </if>
- <if test="updateBy!=null">
- update_by=#{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="companyName!=null">
- company_name=#{companyName,jdbcType=VARCHAR},
- </if>
- <if test="status!=null">
- status_=#{status,jdbcType=VARCHAR},
- </if>
- <if test="businessLicense!=null">
- business_license=#{businessLicense,jdbcType=VARCHAR},
- </if>
- <if test="businessCode!=null">
- business_code=#{businessCode,jdbcType=VARCHAR},
- </if>
- </set>
- where id_=#{id}
- </update>
- <select id="get" parameterType="string" resultMap="CustomerInfoMap">
- select * from base_customer_info where id_=#{0}
- </select>
- <select id="exist" parameterType="string" resultType="int">
- select count(*) from base_customer_info where id_=#{0}
- </select>
- <select id="list" resultMap="CustomerInfoMap">
- select * from base_customer_info
- </select>
- <select id="findByOpenId" resultMap="CustomerInfoMap">
- select * from base_customer_info
- where del_flag=0
- and open_id=#{openId}
- order by create_time asc
- limit 1
- </select>
- <select id="findByPhone" resultMap="CustomerInfoMap">
- select * from base_customer_info
- where del_flag=0
- and phone_=#{0}
- limit 1
- </select>
- <select id="search" parameterType="hashmap" resultMap="CustomerInfoMap">
- <![CDATA[
- select * from base_customer_info
- ]]>
- <where>
- <if test="searchParams.id != null">
- and ID_ like #{searchParams.id}
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- </mapper>
|