You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
3.0 KiB
76 lines
3.0 KiB
<?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.system.mapper.ZhyTaskMapper">
|
|
|
|
<resultMap type="ZhyTask" id="ZhyTaskResult">
|
|
<result property="id" column="id" />
|
|
<result property="userCommand" column="user_command" />
|
|
<result property="type" column="type" />
|
|
<result property="status" column="status" />
|
|
<result property="createTime" column="create_time" />
|
|
</resultMap>
|
|
|
|
<sql id="selectZhyTaskVo">
|
|
select id, user_command, type, status, create_time from zhy_task
|
|
</sql>
|
|
|
|
<select id="selectZhyTaskList" parameterType="ZhyTask" resultMap="ZhyTaskResult">
|
|
<include refid="selectZhyTaskVo"/>
|
|
<where>
|
|
<if test="userCommand != null and userCommand != ''"> and user_command = #{userCommand}</if>
|
|
<if test="type != null"> and type = #{type}</if>
|
|
<if test="status != null"> and status = #{status}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectZhyTaskById" parameterType="Long" resultMap="ZhyTaskResult">
|
|
<include refid="selectZhyTaskVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
<select id="selectZhyTaskListByStatus" resultMap="ZhyTaskResult">
|
|
<include refid="selectZhyTaskVo"/>
|
|
where status=0
|
|
</select>
|
|
|
|
<insert id="insertZhyTask" parameterType="ZhyTask" useGeneratedKeys="true" keyProperty="id">
|
|
insert into zhy_task
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="userCommand != null">user_command,</if>
|
|
<if test="type != null">type,</if>
|
|
<if test="status != null">status,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="userCommand != null">#{userCommand},</if>
|
|
<if test="type != null">#{type},</if>
|
|
<if test="status != null">#{status},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateZhyTask" parameterType="ZhyTask">
|
|
update zhy_task
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="userCommand != null">user_command = #{userCommand},</if>
|
|
<if test="type != null">type = #{type},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteZhyTaskById" parameterType="Long">
|
|
delete from zhy_task where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteZhyTaskByIds" parameterType="String">
|
|
delete from zhy_task where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|