TMinSalaryMapper.xml 2 KB
Newer Older
hongguangwu's avatar
hongguangwu committed
1 2 3 4 5 6
<?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">

<mapper namespace="com.yifu.cloud.plus.v1.yifu.salary.mapper.TMinSalaryMapper">

fangxinjiang's avatar
fangxinjiang committed
7 8 9 10 11 12 13 14 15
	<resultMap id="tMinSalaryMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TMinSalary">
		<id property="id" column="id"/>
		<result property="province" column="province"/>
		<result property="city" column="city"/>
		<result property="town" column="town"/>
		<result property="salaryBase" column="salary_base"/>
		<result property="status" column="status"/>
		<result property="startDate" column="start_date"/>
		<result property="endDate" column="end_date"/>
fangxinjiang's avatar
fangxinjiang committed
16 17
		<result property="createBy" column="create_user"/>
		<result property="createTime" column="CREATE_TIME"/>
fangxinjiang's avatar
fangxinjiang committed
18 19 20 21 22 23 24 25 26 27 28 29 30
	</resultMap>

	<!--tMinSalary简单分页查询-->
	<select id="getTMinSalaryPage" resultMap="tMinSalaryMap">
		SELECT
		id,
		province,
		city,
		town,
		salary_base,
		status,
		start_date,
		end_date,
fangxinjiang's avatar
fangxinjiang committed
31 32
		create_by,
		CREATE_TIME
fangxinjiang's avatar
fangxinjiang committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
		FROM t_min_salary
		<where>
			1=1
			<if test="tMinSalary.id != null and tMinSalary.id.trim() != ''">
				AND id = #{tMinSalary.id}
			</if>
			<if test="tMinSalary.province != null">
				AND province = #{tMinSalary.province}
			</if>
			<if test="tMinSalary.city != null">
				AND city = #{tMinSalary.city}
			</if>
			<if test="tMinSalary.town != null">
				AND town = #{tMinSalary.town}
			</if>
			<if test="tMinSalary.salaryBase != null and tMinSalary.salaryBase.trim() != ''">
				AND salary_base = #{tMinSalary.salaryBase}
			</if>
			<if test="tMinSalary.status != null">
				AND status = #{tMinSalary.status}
			</if>
			<if test="tMinSalary.startDate != null">
				AND start_date = #{tMinSalary.startDate}
			</if>
			<if test="tMinSalary.endDate != null">
				AND end_date = #{tMinSalary.endDate}
			</if>
fangxinjiang's avatar
fangxinjiang committed
60 61
			<if test="tMinSalary.createBy != null and tMinSalary.createBy.trim() != ''">
				AND create_user = #{tMinSalary.createBy}
fangxinjiang's avatar
fangxinjiang committed
62 63
			</if>
		</where>
fangxinjiang's avatar
fangxinjiang committed
64
		ORDER  BY CREATE_TIME DESC
fangxinjiang's avatar
fangxinjiang committed
65 66 67
	</select>


hongguangwu's avatar
hongguangwu committed
68
</mapper>