| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <?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.LabourServicesDAO">
- <resultMap id="LabourServicesMap" type="com.jpsoft.employment.modules.base.entity.LabourServices">
- <id property="id" column="id_" />
- <result property="type" column="type_" />
- <result property="content" column="content_" />
- <result property="status" column="status_" />
- <result property="sortNo" column="sort_no" />
- <result property="approvalStatus" column="approval_status" />
- <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="approvePersonId" column="approve_person_id" />
- <result property="approveTime" column="approve_time" />
- </resultMap>
- <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.LabourServices">
- <!--
- <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
- select sys_guid() from dual
- </selectKey>
- -->
- <![CDATA[
- insert into base_labour_services
- (id_,type_,content_,status_,sort_no,approval_status,create_by,create_time,update_by,update_time,del_flag,approve_person_id,approve_time)
- values
- (
- #{id,jdbcType=VARCHAR}
- ,#{type,jdbcType=VARCHAR}
- ,#{content,jdbcType= NUMERIC }
- ,#{status,jdbcType=VARCHAR}
- ,#{sortNo,jdbcType= NUMERIC }
- ,#{approvalStatus,jdbcType=VARCHAR}
- ,#{createBy,jdbcType=VARCHAR}
- ,#{createTime,jdbcType= TIMESTAMP }
- ,#{updateBy,jdbcType=VARCHAR}
- ,#{updateTime,jdbcType= TIMESTAMP }
- ,#{delFlag,jdbcType= NUMERIC }
- ,#{approvePersonId,jdbcType=VARCHAR}
- ,#{approveTime,jdbcType= TIMESTAMP }
- )
- ]]>
- </insert>
- <delete id="delete" parameterType="string">
- delete from base_labour_services where id_=#{id,jdbcType=VARCHAR}
- </delete>
- <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.LabourServices">
- update base_labour_services
- <set>
- <if test="type!=null">
- type_=#{type,jdbcType=VARCHAR},
- </if>
- <if test="content!=null">
- content_=#{content,jdbcType= NUMERIC },
- </if>
- <if test="status!=null">
- status_=#{status,jdbcType=VARCHAR},
- </if>
- <if test="sortNo!=null">
- sort_no=#{sortNo,jdbcType= NUMERIC },
- </if>
- <if test="approvalStatus!=null">
- approval_status=#{approvalStatus,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="approvePersonId!=null">
- approve_person_id=#{approvePersonId,jdbcType=VARCHAR},
- </if>
- <if test="approveTime!=null">
- approve_time=#{approveTime,jdbcType= TIMESTAMP },
- </if>
- </set>
- where id_=#{id}
- </update>
- <select id="get" parameterType="string" resultMap="LabourServicesMap">
- select * from base_labour_services where id_=#{0}
- </select>
- <select id="exist" parameterType="string" resultType="int">
- select count(*) from base_labour_services where id_=#{0}
- </select>
- <select id="list" resultMap="LabourServicesMap">
- select * from base_labour_services
- </select>
- <select id="search" parameterType="hashmap" resultMap="LabourServicesMap">
- <![CDATA[
- select * from base_labour_services
- ]]>
- <where>
- del_flag = false
- <if test="searchParams.approvalStatus != null">
- and approval_status = #{searchParams.approvalStatus}
- </if>
- <if test="searchParams.beginTime != null">
- <![CDATA[
- and approve_time >= #{searchParams.beginTime}
- ]]>
- </if>
- <if test="searchParams.endTime != null">
- <![CDATA[
- and approve_time <= #{searchParams.endTime}
- ]]>
- </if>
- </where>
- <foreach item="sort" collection="sortList" open="order by" separator=",">
- ${sort.name} ${sort.order}
- </foreach>
- </select>
- </mapper>
|