| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <?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.ExpensesInfoDAO">
- <resultMap id="ExpensesInfoMap" type="com.jpsoft.employment.modules.base.entity.ExpensesInfo">
- <id property="id" column="id_" />
- <result property="serialNumber" column="serial_number" />
- <result property="name" column="name_" />
- <result property="amount" column="amount_" />
- <result property="executor" column="executor_" />
- <result property="responsiblePerson" column="responsible_person" />
- <result property="completionTime" column="completion_time" />
- <result property="feeStartDate" column="fee_start_date" />
- <result property="supervisor" column="supervisor" />
- <result property="aboutTopic" column="about_topic" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- <result property="createBy" column="create_by" />
- <result property="updateBy" column="update_by" />
- <result property="delFlag" column="del_flag" />
- <result property="year" column="year_" />
- <result property="index" column="index_" />
- <result property="templateId" column="template_id" />
- </resultMap>
- <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.ExpensesInfo">
- <!--
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
- select sys_guid() from dual
- </selectKey>
- -->
- <![CDATA[
- insert into base_expenses_info
- (id_,serial_number,name_,amount_,executor_,responsible_person,completion_time,fee_start_date,supervisor,about_topic,create_time,update_time,create_by,update_by,del_flag,year_,index_,template_id)
- values
- (
- #{id,jdbcType=VARCHAR}
- ,#{serialNumber,jdbcType=VARCHAR}
- ,#{name,jdbcType=VARCHAR}
- ,#{amount,jdbcType= NUMERIC }
- ,#{executor,jdbcType=VARCHAR}
- ,#{responsiblePerson,jdbcType=VARCHAR}
- ,#{completionTime,jdbcType=VARCHAR}
- ,#{feeStartDate,jdbcType= TIMESTAMP }
- ,#{supervisor,jdbcType=VARCHAR}
- ,#{aboutTopic,jdbcType=VARCHAR}
- ,#{createTime,jdbcType= TIMESTAMP }
- ,#{updateTime,jdbcType= TIMESTAMP }
- ,#{createBy,jdbcType=VARCHAR}
- ,#{updateBy,jdbcType=VARCHAR}
- ,#{delFlag,jdbcType= NUMERIC }
- ,#{year,jdbcType= TIMESTAMP }
- ,#{index,jdbcType= NUMERIC }
- ,#{templateId,jdbcType=VARCHAR}
- )
- ]]>
- </insert>
- <delete id="delete" parameterType="string">
- delete from base_expenses_info where id_=#{id,jdbcType=VARCHAR}
- </delete>
- <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.ExpensesInfo">
- update base_expenses_info
- <set>
- <if test="serialNumber!=null">
- serial_number=#{serialNumber,jdbcType=VARCHAR},
- </if>
- <if test="name!=null">
- name_=#{name,jdbcType=VARCHAR},
- </if>
- <if test="amount!=null">
- amount_=#{amount,jdbcType= NUMERIC },
- </if>
- <if test="executor!=null">
- executor_=#{executor,jdbcType=VARCHAR},
- </if>
- <if test="responsiblePerson!=null">
- responsible_person=#{responsiblePerson,jdbcType=VARCHAR},
- </if>
- <if test="completionTime!=null">
- completion_time=#{completionTime,jdbcType=VARCHAR},
- </if>
- <if test="feeStartDate!=null">
- fee_start_date=#{feeStartDate,jdbcType= TIMESTAMP },
- </if>
- <if test="supervisor!=null">
- supervisor=#{supervisor,jdbcType=VARCHAR},
- </if>
- <if test="aboutTopic!=null">
- about_topic=#{aboutTopic,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="createBy!=null">
- create_by=#{createBy,jdbcType=VARCHAR},
- </if>
- <if test="updateBy!=null">
- update_by=#{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="delFlag!=null">
- del_flag=#{delFlag,jdbcType= NUMERIC },
- </if>
- <if test="year!=null">
- year_=#{year,jdbcType= TIMESTAMP },
- </if>
- <if test="index!=null">
- index_=#{index,jdbcType= NUMERIC },
- </if>
- <if test="templateId!=null">
- template_id=#{templateId,jdbcType=VARCHAR},
- </if>
- </set>
- where id_=#{id}
- </update>
- <select id="get" parameterType="string" resultMap="ExpensesInfoMap">
- select * from base_expenses_info where id_=#{0}
- </select>
- <select id="exist" parameterType="string" resultType="int">
- select count(*) from base_expenses_info where id_=#{0}
- </select>
- <select id="list" resultMap="ExpensesInfoMap">
- select * from base_expenses_info
- </select>
- <select id="search" parameterType="hashmap" resultMap="ExpensesInfoMap">
- <![CDATA[
- select * from base_expenses_info
- ]]>
- <where>
- del_flag = false
- <if test="searchParams.startDate != null">
- <![CDATA[
- and year_>=#{searchParams.startDate}
- ]]>
- </if>
- <if test="searchParams.endDate != null">
- <![CDATA[
- and year_<=#{searchParams.endDate}
- ]]>
- </if>
- <if test="searchParams.name != null">
- and name_ = #{searchParams.name}
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- </mapper>
|