| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?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.DepositDAO">
- <resultMap id="DepositMap" type="com.jpsoft.employment.modules.base.entity.Deposit">
- <id property="id" column="id_" />
- <result property="amount" column="amount_" />
- <result property="technicianId" column="technician_id" />
- <result property="payType" column="pay_type" />
- <result property="payStatus" column="pay_status_" />
- <result property="payTime" column="pay_time" />
- <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="payImages" column="pay_images" />
- </resultMap>
- <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.Deposit">
- <!--
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
- select sys_guid() from dual
- </selectKey>
- -->
- <![CDATA[
- insert into base_deposit
- (id_,amount_,technician_id,pay_type,pay_status_,pay_time,create_time,update_time,del_flag,create_by,update_by,pay_images)
- values
- (
- #{id,jdbcType=VARCHAR}
- ,#{amount,jdbcType= NUMERIC }
- ,#{technicianId,jdbcType=VARCHAR}
- ,#{payType,jdbcType=VARCHAR}
- ,#{payStatus,jdbcType=VARCHAR}
- ,#{payTime,jdbcType= TIMESTAMP }
- ,#{createTime,jdbcType= TIMESTAMP }
- ,#{updateTime,jdbcType= TIMESTAMP }
- ,#{delFlag,jdbcType= NUMERIC }
- ,#{createBy,jdbcType=VARCHAR}
- ,#{updateBy,jdbcType=VARCHAR}
- ,#{payImages,jdbcType=VARCHAR}
- )
- ]]>
- </insert>
- <delete id="delete" parameterType="string">
- delete from base_deposit where id_=#{id,jdbcType=VARCHAR}
- </delete>
- <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.Deposit">
- update base_deposit
- <set>
- <if test="amount!=null">
- amount_=#{amount,jdbcType= NUMERIC },
- </if>
- <if test="technicianId!=null">
- technician_id=#{technicianId,jdbcType=VARCHAR},
- </if>
- <if test="payType!=null">
- pay_type=#{payType,jdbcType=VARCHAR},
- </if>
- <if test="payStatus!=null">
- pay_status_=#{payStatus,jdbcType=VARCHAR},
- </if>
- <if test="payTime!=null">
- pay_time=#{payTime,jdbcType= TIMESTAMP },
- </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="payImages!=null">
- pay_images=#{payImages,jdbcType=VARCHAR},
- </if>
- </set>
- where id_=#{id}
- </update>
- <select id="get" parameterType="string" resultMap="DepositMap">
- select * from base_deposit where id_=#{0}
- </select>
- <select id="exist" parameterType="string" resultType="int">
- select count(*) from base_deposit where id_=#{0}
- </select>
- <select id="list" resultMap="DepositMap">
- select * from base_deposit
- </select>
- <select id="search" parameterType="hashmap" resultMap="DepositMap">
- <![CDATA[
- select * from base_deposit
- ]]>
- <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>
|