1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?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.picc.modules.base.dao.InsuranceAgentDAO">
- <resultMap id="InsuranceAgentMap" type="com.jpsoft.picc.modules.base.entity.InsuranceAgent">
- <id property="id" column="id_" />
- <result property="name" column="name_" />
- <result property="status" column="status_" />
- <result property="delFlag" column="del_flag" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- </resultMap>
- <insert id="insert" parameterType="com.jpsoft.picc.modules.base.entity.InsuranceAgent">
- <!--
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
- select sys_guid() from dual
- </selectKey>
- -->
- <![CDATA[
- insert into base_insurance_agent
- (id_,name_,status_,del_flag,create_by,create_time,update_by,update_time)
- values
- (
- #{id,jdbcType=VARCHAR}
- ,#{name,jdbcType=VARCHAR}
- ,#{status,jdbcType=VARCHAR}
- ,#{delFlag,jdbcType= NUMERIC }
- ,#{createBy,jdbcType=VARCHAR}
- ,#{createTime,jdbcType= TIMESTAMP }
- ,#{updateBy,jdbcType=VARCHAR}
- ,#{updateTime,jdbcType= TIMESTAMP }
- )
- ]]>
- </insert>
- <delete id="delete" parameterType="string">
- delete from base_insurance_agent where id_=#{id,jdbcType=VARCHAR}
- </delete>
- <update id="update" parameterType="com.jpsoft.picc.modules.base.entity.InsuranceAgent">
- update base_insurance_agent
- <set>
- <if test="name!=null">
- name_=#{name,jdbcType=VARCHAR},
- </if>
- <if test="status!=null">
- status_=#{status,jdbcType=VARCHAR},
- </if>
- <if test="delFlag!=null">
- del_flag=#{delFlag,jdbcType= NUMERIC },
- </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>
- </set>
- where id_=#{id}
- </update>
- <select id="get" parameterType="string" resultMap="InsuranceAgentMap">
- select
- id_,name_,status_,del_flag,create_by,create_time,update_by,update_time from base_insurance_agent where id_=#{0}
- </select>
- <select id="exist" parameterType="string" resultType="int">
- select count(*) from base_insurance_agent where id_=#{0} and del_flag = false
- </select>
- <select id="list" resultMap="InsuranceAgentMap">
- select * from base_insurance_agent where del_flag = false
- </select>
- <select id="search" parameterType="hashmap" resultMap="InsuranceAgentMap">
- <![CDATA[
- select * from base_insurance_agent
- ]]>
- <where>
- and del_flag = false
- <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>
|