20200507-zlp-1
园历管理根据时间判断是否允许删除 一日流程管理
This commit is contained in:
100
ruoyi/src/main/resources/mybatis/benyi/ByDayFlowDetailMapper.xml
Normal file
100
ruoyi/src/main/resources/mybatis/benyi/ByDayFlowDetailMapper.xml
Normal file
@ -0,0 +1,100 @@
|
||||
<?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.ruoyi.project.benyi.mapper.ByDayFlowDetailMapper">
|
||||
|
||||
<resultMap type="ByDayFlowDetail" id="ByDayFlowDetailResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sortNumber" column="sort_number" />
|
||||
<result property="targetCount" column="target_count" />
|
||||
<result property="name" column="name" />
|
||||
<result property="content" column="content" />
|
||||
<result property="note" column="note" />
|
||||
<result property="flowType" column="flow_type" />
|
||||
<result property="createUser" column="create_user" />
|
||||
<result property="updateUser" column="update_user" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByDayFlowDetailVo">
|
||||
select id, sort_number, target_count, name, content, note, flow_type, create_user, update_user, create_time, update_time from by_day_flow_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectByDayFlowDetailList" parameterType="ByDayFlowDetail" resultMap="ByDayFlowDetailResult">
|
||||
<include refid="selectByDayFlowDetailVo"/>
|
||||
<where>
|
||||
<if test="sortNumber != null "> and sort_number = #{sortNumber}</if>
|
||||
<if test="targetCount != null "> and target_count = #{targetCount}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
<if test="note != null and note != ''"> and note = #{note}</if>
|
||||
<if test="flowType != null "> and flow_type = #{flowType}</if>
|
||||
<if test="createUser != null "> and create_user = #{createUser}</if>
|
||||
<if test="updateUser != null "> and update_user = #{updateUser}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByDayFlowDetailById" parameterType="Long" resultMap="ByDayFlowDetailResult">
|
||||
<include refid="selectByDayFlowDetailVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByDayFlowDetail" parameterType="ByDayFlowDetail" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_day_flow_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sortNumber != null ">sort_number,</if>
|
||||
<if test="targetCount != null ">target_count,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
<if test="note != null and note != ''">note,</if>
|
||||
<if test="flowType != null ">flow_type,</if>
|
||||
<if test="createUser != null ">create_user,</if>
|
||||
<if test="updateUser != null ">update_user,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sortNumber != null ">#{sortNumber},</if>
|
||||
<if test="targetCount != null ">#{targetCount},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
<if test="note != null and note != ''">#{note},</if>
|
||||
<if test="flowType != null ">#{flowType},</if>
|
||||
<if test="createUser != null ">#{createUser},</if>
|
||||
<if test="updateUser != null ">#{updateUser},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateTime != null ">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByDayFlowDetail" parameterType="ByDayFlowDetail">
|
||||
update by_day_flow_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sortNumber != null ">sort_number = #{sortNumber},</if>
|
||||
<if test="targetCount != null ">target_count = #{targetCount},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="content != null and content != ''">content = #{content},</if>
|
||||
<if test="note != null and note != ''">note = #{note},</if>
|
||||
<if test="flowType != null ">flow_type = #{flowType},</if>
|
||||
<if test="createUser != null ">create_user = #{createUser},</if>
|
||||
<if test="updateUser != null ">update_user = #{updateUser},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByDayFlowDetailById" parameterType="Long">
|
||||
delete from by_day_flow_detail where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByDayFlowDetailByIds" parameterType="String">
|
||||
delete from by_day_flow_detail where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user