<?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.TSalaryStandardSetMapper">
    <resultMap id="tSalaryStandardSetMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardSet">
        <id property="id" column="id"/>
        <result property="salaryId" column="SALARY_ID"/>
        <result property="deptId" column="DEPT_ID"/>
        <result property="createUser" column="CREATE_BY"/>
        <result property="createTime" column="CREATE_TIME"/>
        <result property="isZero" column="IS_ZERO"/>
    </resultMap>
    <sql id="Base_Column_List">
             a.id,
                  a.SALARY_ID,
                  a.DEPT_ID,
                  a.CREATE_BY,
                  a.CREATE_TIME,
                  a.IS_ZERO
         </sql>
    <sql id="tSalaryStandardSet_where">
        <if test="tSalaryStandardSet != null">
            <if test="tSalaryStandardSet.id != null and tSalaryStandardSet.id.trim() != ''">
                AND a.id = #{tSalaryStandardSet.id}
            </if>
            <if test="tSalaryStandardSet.salaryId != null and tSalaryStandardSet.salaryId.trim() != ''">
                AND a.SALARY_ID = #{tSalaryStandardSet.salaryId}
            </if>
            <if test="tSalaryStandardSet.deptId != null and tSalaryStandardSet.deptId.trim() != ''">
                AND a.DEPT_ID = #{tSalaryStandardSet.deptId}
            </if>
            <if test="tSalaryStandardSet.createUser != null and tSalaryStandardSet.createUser.trim() != ''">
                AND a.CREATE_BY = #{tSalaryStandardSet.createUser}
            </if>
            <if test="tSalaryStandardSet.createTime != null">
                AND a.CREATE_TIME = #{tSalaryStandardSet.createTime}
            </if>
            <if test="tSalaryStandardSet.isZero != null">
                AND a.IS_ZERO = #{tSalaryStandardSet.isZero}
            </if>
        </if>
    </sql>
    <!--tSalaryStandardSet简单分页查询-->
    <select id="getTSalaryStandardSetPage" resultMap="tSalaryStandardSetMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_salary_standard_set a
        <where>
            1=1
            <include refid="tSalaryStandardSet_where"/>
        </where>
    </select>
</mapper>
