|
|
@@ -0,0 +1,129 @@
|
|
|
+<?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.lc.ibps.sysdata.dao.GangDaPaiBanDao">
|
|
|
+
|
|
|
+ <!-- 字段映射 -->
|
|
|
+ <resultMap id="BaseResultMap" type="com.lc.ibps.sysdata.entity.GangDaPaiBanPo">
|
|
|
+ <id column="id_" property="id" jdbcType="VARCHAR"/>
|
|
|
+ <result column="tenant_id_" property="tenantId" jdbcType="VARCHAR"/>
|
|
|
+ <result column="ip_" property="ip" jdbcType="VARCHAR"/>
|
|
|
+ <result column="create_by_" property="createBy" jdbcType="VARCHAR"/>
|
|
|
+ <result column="create_time_" property="createTime" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="update_by_" property="updateBy" jdbcType="VARCHAR"/>
|
|
|
+ <result column="update_time_" property="updateTime" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="shi_fou_guo_shen_" property="shiFouGuoShen" jdbcType="VARCHAR"/>
|
|
|
+ <result column="di_dian_" property="diDian" jdbcType="VARCHAR"/>
|
|
|
+ <result column="bian_zhi_ren_" property="bianZhiRen" jdbcType="VARCHAR"/>
|
|
|
+ <result column="bian_zhi_bu_men_" property="bianZhiBuMen" jdbcType="VARCHAR"/>
|
|
|
+ <result column="bian_zhi_shi_jian" property="bianZhiShiJian" jdbcType="VARCHAR"/>
|
|
|
+ <result column="kuai_zhao_" property="kuaiZhao" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pei_zhi_ming_chen" property="peiZhiMingChen" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pai_ban_lei_xing_" property="paiBanLeiXing" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pai_ban_ren_yuan_" property="paiBanRenYuan" jdbcType="VARCHAR"/>
|
|
|
+ <result column="kai_shi_shi_jian_" property="kaiShiShiJian" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="jie_shu_shi_jian_" property="jieShuShiJian" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="pai_ban_bu_men_" property="paiBanBuMen" jdbcType="VARCHAR"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!-- 通用查询列 -->
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id_, tenant_id_, ip_, create_by_, create_time_, update_by_, update_time_,
|
|
|
+ shi_fou_guo_shen_, di_dian_, bian_zhi_ren_, bian_zhi_bu_men_, bian_zhi_shi_jian,
|
|
|
+ kuai_zhao_, pei_zhi_ming_chen, pai_ban_lei_xing_, pai_ban_ren_yuan_,
|
|
|
+ kai_shi_shi_jian_, jie_shu_shi_jian_, pai_ban_bu_men_
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!-- 根据部门,配置名称,排班类型等查询 -->
|
|
|
+ <select id="selectListByBuMen" resultMap="BaseResultMap" parameterType="java.util.Map">
|
|
|
+ SELECT <include refid="Base_Column_List"/>
|
|
|
+ FROM t_gdpbpzb WHERE 1=1
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.buMen)">
|
|
|
+ AND pai_ban_bu_men_ like CONCAT('%', #{map.buMen}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.paiBanLeiXing)">
|
|
|
+ AND pai_ban_lei_xing_ like CONCAT('%', #{map.paiBanLeiXing}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.peiZhiMingChen)">
|
|
|
+ AND pei_zhi_ming_chen like CONCAT('%', #{map.peiZhiMingChen}, '%')
|
|
|
+ </if>
|
|
|
+ order by create_time_ desc
|
|
|
+ limit #{map.startPage},#{map.limit}
|
|
|
+ </select>
|
|
|
+ <!-- 根据部门查询 -->
|
|
|
+ <select id="selectListCountByBuMen" resultType="java.lang.Integer" parameterType="java.util.Map">
|
|
|
+ SELECT count(*)
|
|
|
+ FROM t_gdpbpzb WHERE 1=1
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.buMen)">
|
|
|
+ AND pai_ban_bu_men_ like CONCAT('%', #{map.buMen}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.paiBanLeiXing)">
|
|
|
+ AND pai_ban_lei_xing_ like CONCAT('%', #{map.paiBanLeiXing}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="@o.Ognl@isNotEmpty(map.peiZhiMingChen)">
|
|
|
+ AND pei_zhi_ming_chen like CONCAT('%', #{map.peiZhiMingChen}, '%')
|
|
|
+ </if>
|
|
|
+ order by create_time_ desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 根据主键查询 -->
|
|
|
+ <select id="selectById" resultMap="BaseResultMap" parameterType="string">
|
|
|
+ SELECT <include refid="Base_Column_List"/>
|
|
|
+ FROM t_gdpbpzb
|
|
|
+ WHERE id_ = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 批量删除 -->
|
|
|
+ <delete id="deleteByIds" parameterType="list">
|
|
|
+ DELETE FROM t_gdpbpzb
|
|
|
+ WHERE id_ IN
|
|
|
+ <foreach collection="ids" item="id" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 选择性更新(只更新非空字段) -->
|
|
|
+ <update id="updateByIdSelective" parameterType="com.lc.ibps.sysdata.entity.GangDaPaiBanPo">
|
|
|
+ UPDATE t_gdpbpzb
|
|
|
+ <set>
|
|
|
+ <!-- 字符串类型字段:非 null 且非空字符串才更新 -->
|
|
|
+ <if test="tenantId != null and tenantId != ''">tenant_id_ = #{tenantId},</if>
|
|
|
+ <if test="ip != null and ip != ''">ip_ = #{ip},</if>
|
|
|
+ <if test="createBy != null and createBy != ''">create_by_ = #{createBy},</if>
|
|
|
+ <if test="updateBy != null and updateBy != ''">update_by_ = #{updateBy},</if>
|
|
|
+ <if test="shiFouGuoShen != null and shiFouGuoShen != ''">shi_fou_guo_shen_ = #{shiFouGuoShen},</if>
|
|
|
+ <if test="diDian != null and diDian != ''">di_dian_ = #{diDian},</if>
|
|
|
+ <if test="bianZhiRen != null and bianZhiRen != ''">bian_zhi_ren_ = #{bianZhiRen},</if>
|
|
|
+ <if test="bianZhiBuMen != null and bianZhiBuMen != ''">bian_zhi_bu_men_ = #{bianZhiBuMen},</if>
|
|
|
+ <if test="bianZhiShiJian != null and bianZhiShiJian != ''">bian_zhi_shi_jian = #{bianZhiShiJian},</if>
|
|
|
+ <if test="kuaiZhao != null and kuaiZhao != ''">kuai_zhao_ = #{kuaiZhao},</if>
|
|
|
+ <if test="peiZhiMingChen != null and peiZhiMingChen != ''">pei_zhi_ming_chen = #{peiZhiMingChen},</if>
|
|
|
+ <if test="paiBanLeiXing != null and paiBanLeiXing != ''">pai_ban_lei_xing_ = #{paiBanLeiXing},</if>
|
|
|
+ <if test="paiBanRenYuan != null and paiBanRenYuan != ''">pai_ban_ren_yuan_ = #{paiBanRenYuan},</if>
|
|
|
+ <if test="paiBanBuMen != null and paiBanBuMen != ''">pai_ban_bu_men_ = #{paiBanBuMen},</if>
|
|
|
+ <if test="createTime != null">create_time_ = #{createTime},</if>
|
|
|
+ <if test="updateTime != null">update_time_ = #{updateTime},</if>
|
|
|
+ <if test="kaiShiShiJian != null">kai_shi_shi_jian_ = #{kaiShiShiJian},</if>
|
|
|
+ <if test="jieShuShiJian != null">jie_shu_shi_jian_ = #{jieShuShiJian},</if>
|
|
|
+ </set>
|
|
|
+ WHERE id_ = #{id}
|
|
|
+ </update>
|
|
|
+ <!-- 批量插入 -->
|
|
|
+ <insert id="insertBatch" parameterType="list">
|
|
|
+ INSERT INTO t_gdpbpzb (
|
|
|
+ id_, tenant_id_, ip_, create_by_, create_time_, update_by_, update_time_,
|
|
|
+ shi_fou_guo_shen_, di_dian_, bian_zhi_ren_, bian_zhi_bu_men_, bian_zhi_shi_jian,
|
|
|
+ kuai_zhao_, pei_zhi_ming_chen, pai_ban_lei_xing_, pai_ban_ren_yuan_,
|
|
|
+ kai_shi_shi_jian_, jie_shu_shi_jian_, pai_ban_bu_men_
|
|
|
+ ) VALUES
|
|
|
+ <foreach collection="list" item="item" separator=",">
|
|
|
+ (
|
|
|
+ #{item.id}, #{item.tenantId}, #{item.ip}, #{item.createBy}, #{item.createTime},
|
|
|
+ #{item.updateBy}, #{item.updateTime}, #{item.shiFouGuoShen}, #{item.diDian},
|
|
|
+ #{item.bianZhiRen}, #{item.bianZhiBuMen}, #{item.bianZhiShiJian},
|
|
|
+ #{item.kuaiZhao}, #{item.peiZhiMingChen}, #{item.paiBanLeiXing},
|
|
|
+ #{item.paiBanRenYuan}, #{item.kaiShiShiJian}, #{item.jieShuShiJian},
|
|
|
+ #{item.paiBanBuMen}
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+</mapper>
|