|
|
@@ -0,0 +1,136 @@
|
|
|
+<?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.enterprise.modules.base.dao.PersonInfoDAO">
|
|
|
+ <resultMap id="PersonInfoMap" type="com.jpsoft.enterprise.modules.base.entity.PersonInfo">
|
|
|
+ <id property="id" column="id_" />
|
|
|
+ <result property="name" column="name_" />
|
|
|
+ <result property="userName" column="user_name" />
|
|
|
+ <result property="password" column="password_" />
|
|
|
+ <result property="openId" column="open_id" />
|
|
|
+ <result property="idCard" column="id_card" />
|
|
|
+ <result property="faceImageUrl" column="face_image_url" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="registerType" column="register_type" />
|
|
|
+ <result property="phone" column="phone_" />
|
|
|
+ <result property="idCardUrl" column="id_card_url" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="remark" column="remark_" />
|
|
|
+ </resultMap>
|
|
|
+ <insert id="insert" parameterType="com.jpsoft.enterprise.modules.base.entity.PersonInfo">
|
|
|
+ <!--
|
|
|
+ <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
|
|
|
+ select sys_guid() from dual
|
|
|
+ </selectKey>
|
|
|
+ -->
|
|
|
+ <![CDATA[
|
|
|
+ insert into base_person_info
|
|
|
+ (id_,name_,user_name,password_,open_id,id_card,face_image_url,company_id,register_type,phone_,id_card_url,create_by,create_time,update_by,update_time,del_flag,remark_)
|
|
|
+ values
|
|
|
+ (
|
|
|
+#{id,jdbcType=VARCHAR}
|
|
|
+,#{name,jdbcType=VARCHAR}
|
|
|
+,#{userName,jdbcType=VARCHAR}
|
|
|
+,#{password,jdbcType=VARCHAR}
|
|
|
+,#{openId,jdbcType=VARCHAR}
|
|
|
+,#{idCard,jdbcType=VARCHAR}
|
|
|
+,#{faceImageUrl,jdbcType=VARCHAR}
|
|
|
+,#{companyId,jdbcType=VARCHAR}
|
|
|
+,#{registerType,jdbcType=VARCHAR}
|
|
|
+,#{phone,jdbcType=VARCHAR}
|
|
|
+,#{idCardUrl,jdbcType=VARCHAR}
|
|
|
+,#{createBy,jdbcType=VARCHAR}
|
|
|
+,#{createTime,jdbcType= TIMESTAMP }
|
|
|
+,#{updateBy,jdbcType=VARCHAR}
|
|
|
+,#{updateTime,jdbcType= TIMESTAMP }
|
|
|
+,#{delFlag,jdbcType= NUMERIC }
|
|
|
+,#{remark,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
+ ]]>
|
|
|
+ </insert>
|
|
|
+ <delete id="delete" parameterType="string">
|
|
|
+ delete from base_person_info where id_=#{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <update id="update" parameterType="com.jpsoft.enterprise.modules.base.entity.PersonInfo">
|
|
|
+ update base_person_info
|
|
|
+ <set>
|
|
|
+ <if test="name!=null">
|
|
|
+ name_=#{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <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="idCard!=null">
|
|
|
+ id_card=#{idCard,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="faceImageUrl!=null">
|
|
|
+ face_image_url=#{faceImageUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyId!=null">
|
|
|
+ company_id=#{companyId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="registerType!=null">
|
|
|
+ register_type=#{registerType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="phone!=null">
|
|
|
+ phone_=#{phone,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="idCardUrl!=null">
|
|
|
+ id_card_url=#{idCardUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createBy!=null">
|
|
|
+ create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime!=null">
|
|
|
+ create_time=#{createTime,jdbcType= TIMESTAMP },
|
|
|
+ </if>
|
|
|
+ <if test="updateBy!=null">
|
|
|
+ update_by=#{updateBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime!=null">
|
|
|
+ update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
|
+ </if>
|
|
|
+ <if test="delFlag!=null">
|
|
|
+ del_flag=#{delFlag,jdbcType= NUMERIC },
|
|
|
+ </if>
|
|
|
+ <if test="remark!=null">
|
|
|
+ remark_=#{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id_=#{id}
|
|
|
+ </update>
|
|
|
+ <select id="get" parameterType="string" resultMap="PersonInfoMap">
|
|
|
+ select
|
|
|
+id_,name_,user_name,password_,open_id,id_card,face_image_url,company_id,register_type,phone_,id_card_url,create_by,create_time,update_by,update_time,del_flag,remark_ from base_person_info where id_=#{0}
|
|
|
+ </select>
|
|
|
+ <select id="exist" parameterType="string" resultType="int">
|
|
|
+ select count(*) from base_person_info where id_=#{0}
|
|
|
+ </select>
|
|
|
+ <select id="list" resultMap="PersonInfoMap">
|
|
|
+ select * from base_person_info
|
|
|
+ </select>
|
|
|
+ <select id="search" parameterType="hashmap" resultMap="PersonInfoMap">
|
|
|
+ <![CDATA[
|
|
|
+ select * from base_person_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>
|