<?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.smartor.mapper.ServiceTaskoperMapper">
|
|
<resultMap type="com.smartor.domain.ServiceTaskoper" id="ServiceTaskoperResult">
|
<result property="id" column="id"/>
|
<result property="taskId" column="task_id"/>
|
<result property="longtask" column="longtask"/>
|
<result property="taskName" column="task_name"/>
|
<result property="serviceType" column="service_type"/>
|
<result property="deptId" column="dept_id"/>
|
<result property="deptCode" column="dept_code"/>
|
<result property="deptName" column="dept_name"/>
|
<result property="delFlag" column="del_flag"/>
|
<result property="createTime" column="create_time"/>
|
<result property="updateTime" column="update_time"/>
|
<result property="orgid" column="orgid"/>
|
<result property="guid" column="guid"/>
|
<result property="pguid" column="pguid"/>
|
<result property="pid" column="pid"/>
|
</resultMap>
|
|
<sql id="selectServiceTaskoperVo">
|
select id, task_id, longtask, task_name, service_type, dept_id, dept_code, dept_name, del_flag, create_time, update_time, orgid, guid, pguid, pid
|
from service_taskoper
|
</sql>
|
|
<select id="selectServiceTaskoperList" parameterType="com.smartor.domain.ServiceTaskoper"
|
resultMap="ServiceTaskoperResult">
|
<include refid="selectServiceTaskoperVo"/>
|
<where>
|
<if test="taskId != null ">
|
and task_id = #{taskId}
|
</if>
|
<if test="longtask != null ">
|
and longtask = #{longtask}
|
</if>
|
<if test="taskName != null and taskName != ''">
|
and task_name like concat('%', #{taskName}, '%')
|
</if>
|
<if test="serviceType != null and serviceType != ''">
|
and service_type = #{serviceType}
|
</if>
|
<if test="deptId != null ">
|
and dept_id = #{deptId}
|
</if>
|
<if test="deptCode != null and deptCode != ''">
|
and dept_code = #{deptCode}
|
</if>
|
<if test="deptName != null and deptName != ''">
|
and dept_name like concat('%', #{deptName}, '%')
|
</if>
|
<if test="orgid != null and orgid != ''">
|
and orgid = #{orgid}
|
</if>
|
<if test="guid != null and guid != ''">
|
and guid = #{guid}
|
</if>
|
<if test="pguid != null and pguid != ''">
|
and pguid = #{pguid}
|
</if>
|
<if test="pid != null ">
|
and pid = #{pid}
|
</if>
|
</where>
|
</select>
|
|
<select id="selectServiceTaskoperById" parameterType="Long"
|
resultMap="ServiceTaskoperResult">
|
<include refid="selectServiceTaskoperVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertServiceTaskoper" parameterType="com.smartor.domain.ServiceTaskoper" useGeneratedKeys="true" keyProperty="id">
|
insert into service_taskoper
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="taskId != null">task_id,
|
</if>
|
<if test="longtask != null">longtask,
|
</if>
|
<if test="taskName != null">task_name,
|
</if>
|
<if test="serviceType != null">service_type,
|
</if>
|
<if test="deptId != null">dept_id,
|
</if>
|
<if test="deptCode != null">dept_code,
|
</if>
|
<if test="deptName != null">dept_name,
|
</if>
|
<if test="delFlag != null">del_flag,
|
</if>
|
<if test="createTime != null">create_time,
|
</if>
|
<if test="updateTime != null">update_time,
|
</if>
|
<if test="orgid != null">orgid,
|
</if>
|
<if test="guid != null">guid,
|
</if>
|
<if test="pguid != null">pguid,
|
</if>
|
<if test="pid != null">pid,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="taskId != null">#{taskId},
|
</if>
|
<if test="longtask != null">#{longtask},
|
</if>
|
<if test="taskName != null">#{taskName},
|
</if>
|
<if test="serviceType != null">#{serviceType},
|
</if>
|
<if test="deptId != null">#{deptId},
|
</if>
|
<if test="deptCode != null">#{deptCode},
|
</if>
|
<if test="deptName != null">#{deptName},
|
</if>
|
<if test="delFlag != null">#{delFlag},
|
</if>
|
<if test="createTime != null">#{createTime},
|
</if>
|
<if test="updateTime != null">#{updateTime},
|
</if>
|
<if test="orgid != null">#{orgid},
|
</if>
|
<if test="guid != null">#{guid},
|
</if>
|
<if test="pguid != null">#{pguid},
|
</if>
|
<if test="pid != null">#{pid},
|
</if>
|
</trim>
|
</insert>
|
|
<update id="updateServiceTaskoper" parameterType="com.smartor.domain.ServiceTaskoper">
|
update service_taskoper
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="taskId != null">task_id =
|
#{taskId},
|
</if>
|
<if test="longtask != null">longtask =
|
#{longtask},
|
</if>
|
<if test="taskName != null">task_name =
|
#{taskName},
|
</if>
|
<if test="serviceType != null">service_type =
|
#{serviceType},
|
</if>
|
<if test="deptId != null">dept_id =
|
#{deptId},
|
</if>
|
<if test="deptCode != null">dept_code =
|
#{deptCode},
|
</if>
|
<if test="deptName != null">dept_name =
|
#{deptName},
|
</if>
|
<if test="delFlag != null">del_flag =
|
#{delFlag},
|
</if>
|
<if test="createTime != null">create_time =
|
#{createTime},
|
</if>
|
<if test="updateTime != null">update_time =
|
#{updateTime},
|
</if>
|
<if test="orgid != null">orgid =
|
#{orgid},
|
</if>
|
<if test="guid != null">guid =
|
#{guid},
|
</if>
|
<if test="pguid != null">pguid =
|
#{pguid},
|
</if>
|
<if test="pid != null">pid =
|
#{pid},
|
</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<update id="deleteServiceTaskoperById" parameterType="Long">
|
update service_taskoper
|
<trim prefix="SET" suffixOverrides=",">
|
del_flag =1
|
</trim>
|
where id = #{id}
|
</update>
|
|
<update id="deleteServiceTaskoperByIds" parameterType="String">
|
update service_taskoper
|
<trim prefix="SET" suffixOverrides=",">
|
del_flag =1
|
</trim>
|
where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</update>
|
|
|
|
|
</mapper>
|