|  |  | 
 |  |  | <mapper namespace="com.smartor.mapper.ServiceTaskdiagMapper"> | 
 |  |  |  | 
 |  |  |     <resultMap type="com.smartor.domain.ServiceTaskdiag" id="ServiceTaskdiagResult"> | 
 |  |  |             <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="icd10id" column="icd10id"/> | 
 |  |  |             <result property="icd10code" column="icd10code"/> | 
 |  |  |             <result property="icd10name" column="icd10name"/> | 
 |  |  |             <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"/> | 
 |  |  |         <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="icd10id" column="icd10id"/> | 
 |  |  |         <result property="icd10code" column="icd10code"/> | 
 |  |  |         <result property="icd10name" column="icd10name"/> | 
 |  |  |         <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="selectServiceTaskdiagVo"> | 
 |  |  |         select id, task_id, longtask, task_name, service_type, icd10id, icd10code, icd10name, del_flag, create_time, update_time, orgid, guid, pguid, pid | 
 |  |  |         select id, | 
 |  |  |                task_id, | 
 |  |  |                longtask, | 
 |  |  |                task_name, | 
 |  |  |                service_type, | 
 |  |  |                icd10id, | 
 |  |  |                icd10code, | 
 |  |  |                icd10name, | 
 |  |  |                del_flag, | 
 |  |  |                create_time, | 
 |  |  |                update_time, | 
 |  |  |                orgid, | 
 |  |  |                guid, | 
 |  |  |                pguid, | 
 |  |  |                pid | 
 |  |  |         from service_taskdiag | 
 |  |  |     </sql> | 
 |  |  |  | 
 |  |  | 
 |  |  |             resultMap="ServiceTaskdiagResult"> | 
 |  |  |         <include refid="selectServiceTaskdiagVo"/> | 
 |  |  |         <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="icd10id != null "> | 
 |  |  |                             and icd10id = #{icd10id} | 
 |  |  |                         </if> | 
 |  |  |                         <if test="icd10code != null  and icd10code != ''"> | 
 |  |  |                             and icd10code = #{icd10code} | 
 |  |  |                         </if> | 
 |  |  |                         <if test="icd10name != null  and icd10name != ''"> | 
 |  |  |                             and icd10name like concat('%', #{icd10name}, '%') | 
 |  |  |                         </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> | 
 |  |  |             del_flag=0 | 
 |  |  |             <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="icd10id != null "> | 
 |  |  |                 and icd10id = #{icd10id} | 
 |  |  |             </if> | 
 |  |  |             <if test="icd10code != null  and icd10code != ''"> | 
 |  |  |                 and icd10code = #{icd10code} | 
 |  |  |             </if> | 
 |  |  |             <if test="icd10name != null  and icd10name != ''"> | 
 |  |  |                 and icd10name like concat('%', #{icd10name}, '%') | 
 |  |  |             </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="selectServiceTaskdiagById" parameterType="Long" | 
 |  |  |             resultMap="ServiceTaskdiagResult"> | 
 |  |  |             <include refid="selectServiceTaskdiagVo"/> | 
 |  |  |             where id = #{id} | 
 |  |  |         <include refid="selectServiceTaskdiagVo"/> | 
 |  |  |         where id = #{id} | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <insert id="insertServiceTaskdiag" parameterType="com.smartor.domain.ServiceTaskdiag"            useGeneratedKeys="true" keyProperty="id"> | 
 |  |  |     <insert id="insertServiceTaskdiag" parameterType="com.smartor.domain.ServiceTaskdiag" useGeneratedKeys="true" | 
 |  |  |             keyProperty="id"> | 
 |  |  |         insert into service_taskdiag | 
 |  |  |         <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="icd10id != null">icd10id, | 
 |  |  |                     </if> | 
 |  |  |                     <if test="icd10code != null">icd10code, | 
 |  |  |                     </if> | 
 |  |  |                     <if test="icd10name != null">icd10name, | 
 |  |  |                     </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> | 
 |  |  |             <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="icd10id != null">icd10id, | 
 |  |  |             </if> | 
 |  |  |             <if test="icd10code != null">icd10code, | 
 |  |  |             </if> | 
 |  |  |             <if test="icd10name != null">icd10name, | 
 |  |  |             </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="icd10id != null">#{icd10id}, | 
 |  |  |                     </if> | 
 |  |  |                     <if test="icd10code != null">#{icd10code}, | 
 |  |  |                     </if> | 
 |  |  |                     <if test="icd10name != null">#{icd10name}, | 
 |  |  |                     </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> | 
 |  |  |             <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="icd10id != null">#{icd10id}, | 
 |  |  |             </if> | 
 |  |  |             <if test="icd10code != null">#{icd10code}, | 
 |  |  |             </if> | 
 |  |  |             <if test="icd10name != null">#{icd10name}, | 
 |  |  |             </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="updateServiceTaskdiag" parameterType="com.smartor.domain.ServiceTaskdiag"> | 
 |  |  |         update service_taskdiag | 
 |  |  |         <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="icd10id != null">icd10id = | 
 |  |  |                         #{icd10id}, | 
 |  |  |                     </if> | 
 |  |  |                     <if test="icd10code != null">icd10code = | 
 |  |  |                         #{icd10code}, | 
 |  |  |                     </if> | 
 |  |  |                     <if test="icd10name != null">icd10name = | 
 |  |  |                         #{icd10name}, | 
 |  |  |                     </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> | 
 |  |  |             <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="icd10id != null">icd10id = | 
 |  |  |                 #{icd10id}, | 
 |  |  |             </if> | 
 |  |  |             <if test="icd10code != null">icd10code = | 
 |  |  |                 #{icd10code}, | 
 |  |  |             </if> | 
 |  |  |             <if test="icd10name != null">icd10name = | 
 |  |  |                 #{icd10name}, | 
 |  |  |             </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="deleteServiceTaskdiagById" parameterType="Long"> | 
 |  |  |     <update id="deleteServiceTaskdiagById" parameterType="Long"> | 
 |  |  |         update service_taskdiag | 
 |  |  |         <trim prefix="SET" suffixOverrides=","> | 
 |  |  |             del_flag =1 | 
 |  |  |         </trim> | 
 |  |  |         where  id = #{id} | 
 |  |  |         where id = #{id} | 
 |  |  |     </update> | 
 |  |  |  | 
 |  |  |                             <update id="deleteServiceTaskdiagByIds" parameterType="String"> | 
 |  |  |         update  service_taskdiag | 
 |  |  |     <update id="deleteServiceTaskdiagByIds" parameterType="String"> | 
 |  |  |         update service_taskdiag | 
 |  |  |         <trim prefix="SET" suffixOverrides=","> | 
 |  |  |             del_flag =1 | 
 |  |  |         </trim> | 
 |  |  | 
 |  |  |             #{id} | 
 |  |  |         </foreach> | 
 |  |  |     </update> | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  | </mapper> |