90 lines
4.5 KiB
XML
90 lines
4.5 KiB
XML
<?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.ByDayFlowStandardMapper">
|
|
|
|
<resultMap type="ByDayFlowStandard" id="ByDayFlowStandardResult">
|
|
<result property="id" column="id"/>
|
|
<result property="taskCode" column="task_code"/>
|
|
<result property="standardTitle" column="standard_title"/>
|
|
<result property="standardSort" column="standard_sort"/>
|
|
<result property="unscrambleCount" column="unscramble_count"/>
|
|
<result property="createuser" column="createuser"/>
|
|
<result property="createtime" column="createtime"/>
|
|
<result property="updateuser" column="updateuser"/>
|
|
<result property="updatetime" column="updatetime"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectByDayFlowStandardVo">
|
|
select id, task_code, standard_title, standard_sort,(select count(*) from by_day_flow_unscramble where standard_id=by_day_flow_standard.id) unscramble_count, createuser, createtime, updateuser, updatetime from by_day_flow_standard
|
|
</sql>
|
|
|
|
<select id="selectByDayFlowStandardList" parameterType="ByDayFlowStandard" resultMap="ByDayFlowStandardResult">
|
|
<include refid="selectByDayFlowStandardVo"/>
|
|
<where>
|
|
<if test="taskCode != null ">and task_code = #{taskCode}</if>
|
|
<if test="standardTitle != null and standardTitle != ''">and standard_title like concat('%',
|
|
#{standardTitle}, '%')
|
|
</if>
|
|
<if test="standardSort != null ">and standard_sort = #{standardSort}</if>
|
|
<if test="createuser != null ">and createuser = #{createuser}</if>
|
|
<if test="createtime != null ">and createtime = #{createtime}</if>
|
|
<if test="updateuser != null ">and updateuser = #{updateuser}</if>
|
|
<if test="updatetime != null ">and updatetime = #{updatetime}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectByDayFlowStandardById" parameterType="Long" resultMap="ByDayFlowStandardResult">
|
|
<include refid="selectByDayFlowStandardVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertByDayFlowStandard" parameterType="ByDayFlowStandard" useGeneratedKeys="true" keyProperty="id">
|
|
insert into by_day_flow_standard
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="taskCode != null ">task_code,</if>
|
|
<if test="standardTitle != null and standardTitle != ''">standard_title,</if>
|
|
<if test="standardSort != null ">standard_sort,</if>
|
|
<if test="createuser != null ">createuser,</if>
|
|
<if test="createtime != null ">createtime,</if>
|
|
<if test="updateuser != null ">updateuser,</if>
|
|
<if test="updatetime != null ">updatetime,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="taskCode != null ">#{taskCode},</if>
|
|
<if test="standardTitle != null and standardTitle != ''">#{standardTitle},</if>
|
|
<if test="standardSort != null ">#{standardSort},</if>
|
|
<if test="createuser != null ">#{createuser},</if>
|
|
<if test="createtime != null ">#{createtime},</if>
|
|
<if test="updateuser != null ">#{updateuser},</if>
|
|
<if test="updatetime != null ">#{updatetime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateByDayFlowStandard" parameterType="ByDayFlowStandard">
|
|
update by_day_flow_standard
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="taskCode != null ">task_code = #{taskCode},</if>
|
|
<if test="standardTitle != null and standardTitle != ''">standard_title = #{standardTitle},</if>
|
|
<if test="standardSort != null ">standard_sort = #{standardSort},</if>
|
|
<if test="createuser != null ">createuser = #{createuser},</if>
|
|
<if test="createtime != null ">createtime = #{createtime},</if>
|
|
<if test="updateuser != null ">updateuser = #{updateuser},</if>
|
|
<if test="updatetime != null ">updatetime = #{updatetime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteByDayFlowStandardById" parameterType="Long">
|
|
delete from by_day_flow_standard where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteByDayFlowStandardByIds" parameterType="String">
|
|
delete from by_day_flow_standard where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper> |