<?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.social.mapper.TDispatchDayConfMapper">

  <resultMap id="tDispatchDayConfMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchDayConf">
    <id property="id" column="ID"/>
    <result property="province" column="PROVINCE"/>
    <result property="city" column="CITY"/>
    <result property="town" column="TOWN"/>
    <result property="areaName" column="AREA_NAME"/>
    <result property="day" column="DAY"/>
    <result property="createBy" column="CREATE_BY"/>
    <result property="updateBy" column="UPDATE_BY"/>
    <result property="createName" column="CREATE_NAME"/>
    <result property="updateTime" column="UPDATE_TIME"/>
    <result property="createTime" column="CREATE_TIME"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.ID,
                a.PROVINCE,
                a.CITY,
                a.TOWN,
                a.AREA_NAME,
                a.DAY,
                a.CREATE_BY,
                a.UPDATE_BY,
                a.CREATE_NAME,
                a.UPDATE_TIME,
				a.CREATE_TIME
    </sql>
    <sql id="tDispatchDayConf_where">
        <if test="tDispatchDayConf != null">
                    <if test="tDispatchDayConf.id != null and tDispatchDayConf.id.trim() != ''">
                        AND a.ID = #{tDispatchDayConf.id}
                    </if>
                    <if test="tDispatchDayConf.province != null and tDispatchDayConf.province.trim() != ''">
                        AND a.PROVINCE = #{tDispatchDayConf.province}
                    </if>
                    <if test="tDispatchDayConf.city != null and tDispatchDayConf.city.trim() != ''">
                        AND a.CITY = #{tDispatchDayConf.city}
                    </if>
                    <if test="tDispatchDayConf.town != null and tDispatchDayConf.town.trim() != ''">
                        AND a.TOWN = #{tDispatchDayConf.town}
                    </if>
                    <if test="tDispatchDayConf.areaName != null and tDispatchDayConf.areaName.trim() != ''">
                        AND a.AREA_NAME = #{tDispatchDayConf.areaName}
                    </if>
                    <if test="tDispatchDayConf.day != null">
                        AND a.DAY = #{tDispatchDayConf.day}
                    </if>
                    <if test="tDispatchDayConf.createBy != null and tDispatchDayConf.createBy.trim() != ''">
                        AND a.CREATE_BY = #{tDispatchDayConf.createBy}
                    </if>
                    <if test="tDispatchDayConf.updateBy != null and tDispatchDayConf.updateBy.trim() != ''">
                        AND a.UPDATE_BY = #{tDispatchDayConf.updateBy}
                    </if>
                    <if test="tDispatchDayConf.createName != null and tDispatchDayConf.createName.trim() != ''">
                        AND a.CREATE_NAME = #{tDispatchDayConf.createName}
                    </if>
                    <if test="tDispatchDayConf.updateTime != null">
                        AND a.UPDATE_TIME = #{tDispatchDayConf.updateTime}
                    </if>
					<if test="tDispatchDayConf.createTime != null">
						AND a.CREATE_TIME = #{tDispatchDayConf.createTime}
					</if>
        </if>
    </sql>
    <!--tDispatchDayConf简单分页查询-->
    <select id="getTDispatchDayConfPage" resultMap="tDispatchDayConfMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_dispatch_day_conf a
        <where>
            1=1
            <include refid="tDispatchDayConf_where"/>
        </where>
    </select>
</mapper>