<?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">

	<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"/>
		<result property="createBy" column="create_user"/>
		<result property="createTime" column="CREATE_TIME"/>
	</resultMap>

	<!--tMinSalary简单分页查询-->
	<select id="getTMinSalaryPage" resultMap="tMinSalaryMap">
		SELECT
		id,
		province,
		city,
		town,
		salary_base,
		status,
		start_date,
		end_date,
		create_by,
		CREATE_TIME
		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>
			<if test="tMinSalary.createBy != null and tMinSalary.createBy.trim() != ''">
				AND create_user = #{tMinSalary.createBy}
			</if>
		</where>
		ORDER  BY CREATE_TIME DESC
	</select>


</mapper>
