TInsuranceEnclosureMapper.xml 2.53 KB
Newer Older
1 2 3 4
<?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">
5
<mapper namespace="com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceEnclosureMapper">
6 7

    <resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceEnclosure">
huyuchen's avatar
huyuchen committed
8
            <id property="id" column="ID" jdbcType="VARCHAR"/>
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
            <result property="enclosureName" column="ENCLOSURE_NAME" jdbcType="VARCHAR"/>
            <result property="remark" column="REMARK" jdbcType="VARCHAR"/>
            <result property="deleteFlag" column="DELETE_FLAG" jdbcType="VARCHAR"/>
            <result property="enclosureAddress" column="ENCLOSURE_ADDRESS" jdbcType="VARCHAR"/>
			<result property="createBy" column="CREATE_BY" jdbcType="VARCHAR"/>
			<result property="createName" column="CREATE_NAME" jdbcType="VARCHAR"/>
			<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
			<result property="updateBy" column="UPDATE_BY" jdbcType="VARCHAR"/>
			<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
    </resultMap>

    <sql id="Base_Column_List">
        id,enclosure_name,create_name,
        create_by,create_time,remark,
        delete_flag,enclosure_address,
		updateBy,updateTime
    </sql>
	<select id="getInsuranceEnclosurePage" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceEnclosureVo">
		select
		    e.ID as id,
			e.ENCLOSURE_NAME as enclosureName,
		    e.CREATE_NAME as createName,
		    e.REMARK as remark,
		    e.CREATE_TIME as createTime
		from
			t_insurance_enclosure e
		where
			e.DELETE_FLAG = 0
		<if test="param.createName != null and param.createName.trim() != ''">
			and e.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
		</if>
		<if test="param.remark != null and param.remark.trim() != ''">
			and e.REMARK like concat('%',replace(replace(#{param.remark},'_','\_'),'%','\%'),'%')
		</if>
		<if test="param.enclosureName != null and param.enclosureName.trim() != ''">
			and e.ENCLOSURE_NAME like concat('%',replace(replace(#{param.enclosureName},'_','\_'),'%','\%'),'%')
		</if>
		<if test="param.startTime != null and param.startTime.trim() != '' ">
			AND e.CREATE_TIME   <![CDATA[ >= ]]>  concat(#{param.startTime}, ' 00:00:00')
		</if>
		<if test="param.endTime != null and param.endTime.trim() != '' ">
			AND e.CREATE_TIME <![CDATA[ <= ]]> concat(#{param.endTime}, ' 23:59:59')
		</if>
52
		order by e.CREATE_TIME desc
53 54 55 56

	</select>

</mapper>