<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~
  ~      Copyright (c) 2018-2025, lengleng All rights reserved.
  ~
  ~  Redistribution and use in source and binary forms, with or without
  ~  modification, are permitted provided that the following conditions are met:
  ~
  ~ Redistributions of source code must retain the above copyright notice,
  ~  this list of conditions and the following disclaimer.
  ~  Redistributions in binary form must reproduce the above copyright
  ~  notice, this list of conditions and the following disclaimer in the
  ~  documentation and/or other materials provided with the distribution.
  ~  Neither the name of the yifu4cloud.com developer nor the names of its
  ~  contributors may be used to endorse or promote products derived from
  ~  this software without specific prior written permission.
  ~  Author: lengleng (wangiegie@gmail.com)
  ~
  -->

<!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.TSalaryStandardSetDetailMapper">

  <resultMap id="tSalaryStandardSetDetailMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandardSetDetail">
    <id property="id" column="id"/>
    <result property="setId" column="set_id"/>
    <result property="cnName" column="cn_name"/>
    <result property="orderLine" column="order_line"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.id,
                a.set_id,
                a.cn_name,
                a.order_line
    </sql>
    <sql id="tSalaryStandardSetDetail_where">
        <if test="tSalaryStandardSetDetail != null">
                    <if test="tSalaryStandardSetDetail.id != null and tSalaryStandardSetDetail.id.trim() != ''">
                        AND a.id = #{tSalaryStandardSetDetail.id}
                    </if>
                    <if test="tSalaryStandardSetDetail.setId != null and tSalaryStandardSetDetail.setId.trim() != ''">
                        AND a.set_id = #{tSalaryStandardSetDetail.setId}
                    </if>
                    <if test="tSalaryStandardSetDetail.cnName != null and tSalaryStandardSetDetail.cnName.trim() != ''">
                        AND a.cn_name = #{tSalaryStandardSetDetail.cnName}
                    </if>
                    <if test="tSalaryStandardSetDetail.orderLine != null">
                        AND a.order_line = #{tSalaryStandardSetDetail.orderLine}
                    </if>
        </if>
    </sql>
    <!--tSalaryStandardSetDetail简单分页查询-->
    <select id="getTSalaryStandardSetDetailPage" resultMap="tSalaryStandardSetDetailMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_salary_standard_set_detail a
        <where>
            1=1
            <include refid="tSalaryStandardSetDetail_where"/>
        </where>
    </select>
</mapper>