搜索bug处理
parent
253f559ba5
commit
8446811b6f
|
@ -1,65 +1,65 @@
|
|||
<?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.zcloud.mapper.datasource.bus.ShiftWorkRulesMapper">
|
||||
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_SHIFTWORKRULES
|
||||
</sql>
|
||||
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.NAME,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE,
|
||||
f.NAME,
|
||||
f.CORPINFO_ID,
|
||||
f.CREATOR,
|
||||
f.CREATTIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATTIME,
|
||||
f.ISDELETE,
|
||||
f.PARENTID,
|
||||
f.LEVEL,
|
||||
f.ISCUSTOM,
|
||||
f.SHIFTWORKRULES_ID
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
NAME,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE,
|
||||
NAME,
|
||||
CORPINFO_ID,
|
||||
CREATOR,
|
||||
CREATTIME,
|
||||
OPERATOR,
|
||||
OPERATTIME,
|
||||
ISDELETE,
|
||||
PARENTID,
|
||||
LEVEL,
|
||||
ISCUSTOM,
|
||||
SHIFTWORKRULES_ID
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{NAME},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE},
|
||||
#{NAME},
|
||||
#{CORPINFO_ID},
|
||||
#{CREATOR},
|
||||
#{CREATTIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATTIME},
|
||||
#{ISDELETE},
|
||||
#{PARENTID},
|
||||
#{LEVEL},
|
||||
#{ISCUSTOM},
|
||||
#{SHIFTWORKRULES_ID}
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
|
@ -67,7 +67,7 @@
|
|||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
|
@ -76,10 +76,10 @@
|
|||
ISDELETE = '1',
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME}
|
||||
where
|
||||
where
|
||||
SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="deleteByPar" parameterType="pd">
|
||||
update
|
||||
|
@ -88,15 +88,15 @@
|
|||
ISDELETE = '1',
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATTIME = #{OPERATTIME}
|
||||
where
|
||||
where
|
||||
PARENTID = #{PARENTID}
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
set
|
||||
<if test="NAME != null and NAME != ''"><!-- 关键词检索 -->
|
||||
NAME = #{NAME},
|
||||
</if>
|
||||
|
@ -109,56 +109,57 @@
|
|||
<if test="OPERATTIME != null and OPERATTIME != ''"><!-- 关键词检索 -->
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
</if>
|
||||
|
||||
|
||||
SHIFTWORKRULES_ID = SHIFTWORKRULES_ID
|
||||
where
|
||||
where
|
||||
SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
|
||||
</update>
|
||||
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
where
|
||||
f.SHIFTWORKRULES_ID = #{SHIFTWORKRULES_ID}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
<!-- 根据需求自己加检索条件
|
||||
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
-->
|
||||
)
|
||||
</if>
|
||||
</if>
|
||||
<if test="pd.PARENTID != null and pd.PARENTID != ''"><!-- 关键词检索 -->
|
||||
and f.PARENTID = #{pd.PARENTID}
|
||||
and f.PARENTID = #{pd.PARENTID}
|
||||
</if>
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||
</if>
|
||||
<if test="pd.LEVEL != null and pd.LEVEL != ''"><!-- 关键词检索 -->
|
||||
and f.LEVEL = #{pd.LEVEL}
|
||||
and f.LEVEL = #{pd.LEVEL}
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
SELECT
|
||||
<include refid="Field"></include>
|
||||
FROM
|
||||
FROM
|
||||
<include refid="tableName"></include> f
|
||||
WHERE f.ISDELETE = '0'
|
||||
AND f.CORPINFO_ID = #{CORPINFO_ID}
|
||||
|
@ -166,21 +167,21 @@
|
|||
AND f.PARENTID = #{PARENTID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
where
|
||||
SHIFTWORKRULES_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
<!-- 排班类型1是否使用 -->
|
||||
<select id="isUseOne" parameterType="pd" resultType="int">
|
||||
SELECT COUNT(1) FROM SYS_USER WHERE SHIFTDUTYONE = #{SHIFTWORKRULES_ID}
|
||||
|
|
Loading…
Reference in New Issue