<?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.tr.troubleshootList.mapper.TroubleshootListMapper">
|
|
<resultMap type="TroubleshootList" id="TroubleshootListResult">
|
<result property="troubleshootId" column="troubleshoot_id" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="remark" column="remark" />
|
<result property="troubleshootName" column="troubleshoot_name" />
|
<result property="troubleshootType" column="troubleshoot_type" />
|
<result property="troubleshootDept" column="troubleshoot_dept" />
|
<result property="troubleshootRistId" column="troubleshoot_rist_id" />
|
<result property="troubleshootCheckUserId" column="troubleshoot_check_user_id" />
|
<result property="troubleshootCheckedDeptId" column="troubleshoot_checked_dept_id" />
|
<result property="troubleshootBiginTime" column="troubleshoot_bigin_time" />
|
<result property="troubleshootEndTime" column="troubleshoot_end_time" />
|
<result property="troubleshootDistributeStatus" column="troubleshoot_distribute_status" />
|
<result property="troubleshootStatus" column="troubleshoot_status" />
|
<result property="troubleshootTroubleName" column="troubleshoot_trouble_name" />
|
<result property="troubleshootTroubleDescription" column="troubleshoot_trouble_description" />
|
<result property="troubleshootTroubleLevel" column="troubleshoot_trouble_level" />
|
<result property="troubleshootTroubleType" column="troubleshoot_trouble_type" />
|
<result property="troubleshootTroubleDept" column="troubleshoot_trouble_dept" />
|
<result property="troubleshootTroubleAddress" column="troubleshoot_trouble_address" />
|
<result property="troubleshootTime" column="troubleshoot_time" />
|
<result property="troubleshootBeforeChangeImageUrl" column="troubleshoot_before_change_image_url" />
|
<result property="troubleshootReviewUserId" column="troubleshoot_review_user_id" />
|
<result property="troubleshootRectificationUserId" column="troubleshoot_rectification_user_id" />
|
<result property="hiddenTroubleType" column="hidden_trouble_type" />
|
<result property="hiddenTroubleStatus" column="hidden_trouble_status" />
|
<result property="troubleshootRectificationMeasures" column="troubleshoot_rectification_measures" />
|
<result property="troubleshootRectificationHappening" column="troubleshoot_rectification_happening" />
|
<result property="troubleshootRectificationMoney" column="troubleshoot_rectification_money" />
|
<result property="troubleshootRectificationCompleteTime" column="troubleshoot_rectification_complete_time" />
|
<result property="troubleshootAcceptanceUserId" column="troubleshoot_acceptance_user_id" />
|
<result property="troubleshootAfterChangeImageUrl" column="troubleshoot_after_change_image_url" />
|
<result property="troubleshootAcceptanceOpinion" column="troubleshoot_acceptance_opinion" />
|
<result property="troubleshootAcceptanceResult" column="troubleshoot_acceptance_result" />
|
<result property="troubleshootAcceptanceImageUrl" column="troubleshoot_acceptance_image_url" />
|
<result property="troubleshootProgress" column="troubleshoot_progress" />
|
</resultMap>
|
|
<sql id="selectTroubleshootListVo">
|
select troubleshoot_id, create_by, create_time, update_by, update_time, remark, troubleshoot_name, troubleshoot_type, troubleshoot_dept, troubleshoot_rist_id, troubleshoot_check_user_id, troubleshoot_checked_dept_id, troubleshoot_bigin_time, troubleshoot_end_time, troubleshoot_distribute_status, troubleshoot_status, troubleshoot_trouble_name, troubleshoot_trouble_description, troubleshoot_trouble_level, troubleshoot_trouble_type, troubleshoot_trouble_dept, troubleshoot_trouble_address, troubleshoot_time, troubleshoot_before_change_image_url, troubleshoot_review_user_id, troubleshoot_rectification_user_id, hidden_trouble_type, hidden_trouble_status, troubleshoot_rectification_measures, troubleshoot_rectification_happening, troubleshoot_rectification_money, troubleshoot_rectification_complete_time, troubleshoot_acceptance_user_id, troubleshoot_after_change_image_url, troubleshoot_acceptance_opinion, troubleshoot_acceptance_result, troubleshoot_acceptance_image_url, troubleshoot_progress from tr_troubleshoot_list
|
</sql>
|
|
<select id="selectTroubleshootListList" parameterType="TroubleshootList" resultMap="TroubleshootListResult">
|
<include refid="selectTroubleshootListVo"/>
|
<where>
|
<if test="troubleshootId != null "> and troubleshoot_id = #{troubleshootId}</if>
|
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
<if test="troubleshootName != null and troubleshootName != ''"> and troubleshoot_name like concat('%', #{troubleshootName}, '%')</if>
|
<if test="troubleshootType != null "> and troubleshoot_type = #{troubleshootType}</if>
|
<if test="troubleshootDept != null "> and troubleshoot_dept = #{troubleshootDept}</if>
|
<if test="troubleshootRistId != null "> and troubleshoot_rist_id = #{troubleshootRistId}</if>
|
<if test="troubleshootCheckUserId != null "> and troubleshoot_check_user_id = #{troubleshootCheckUserId}</if>
|
<if test="troubleshootCheckedDeptId != null "> and troubleshoot_checked_dept_id = #{troubleshootCheckedDeptId}</if>
|
<if test="troubleshootBiginTime != null "> and troubleshoot_bigin_time = #{troubleshootBiginTime}</if>
|
<if test="troubleshootEndTime != null "> and troubleshoot_end_time = #{troubleshootEndTime}</if>
|
<if test="troubleshootDistributeStatus != null "> and troubleshoot_distribute_status = #{troubleshootDistributeStatus}</if>
|
<if test="troubleshootStatus != null "> and troubleshoot_status = #{troubleshootStatus}</if>
|
<if test="troubleshootTroubleName != null and troubleshootTroubleName != ''"> and troubleshoot_trouble_name like concat('%', #{troubleshootTroubleName}, '%')</if>
|
<if test="troubleshootTroubleDescription != null and troubleshootTroubleDescription != ''"> and troubleshoot_trouble_description = #{troubleshootTroubleDescription}</if>
|
<if test="troubleshootTroubleLevel != null "> and troubleshoot_trouble_level = #{troubleshootTroubleLevel}</if>
|
<if test="troubleshootTroubleType != null "> and troubleshoot_trouble_type = #{troubleshootTroubleType}</if>
|
<if test="troubleshootTroubleDept != null "> and troubleshoot_trouble_dept = #{troubleshootTroubleDept}</if>
|
<if test="troubleshootTroubleAddress != null and troubleshootTroubleAddress != ''"> and troubleshoot_trouble_address = #{troubleshootTroubleAddress}</if>
|
<if test="troubleshootTime != null "> and troubleshoot_time = #{troubleshootTime}</if>
|
<if test="troubleshootBeforeChangeImageUrl != null and troubleshootBeforeChangeImageUrl != ''"> and troubleshoot_before_change_image_url = #{troubleshootBeforeChangeImageUrl}</if>
|
<if test="troubleshootReviewUserId != null "> and troubleshoot_review_user_id = #{troubleshootReviewUserId}</if>
|
<if test="troubleshootRectificationUserId != null "> and troubleshoot_rectification_user_id = #{troubleshootRectificationUserId}</if>
|
<if test="hiddenTroubleType != null "> and hidden_trouble_type = #{hiddenTroubleType}</if>
|
<if test="hiddenTroubleStatus != null "> and hidden_trouble_status = #{hiddenTroubleStatus}</if>
|
<if test="troubleshootRectificationMeasures != null and troubleshootRectificationMeasures != ''"> and troubleshoot_rectification_measures = #{troubleshootRectificationMeasures}</if>
|
<if test="troubleshootRectificationHappening != null and troubleshootRectificationHappening != ''"> and troubleshoot_rectification_happening = #{troubleshootRectificationHappening}</if>
|
<if test="troubleshootRectificationMoney != null "> and troubleshoot_rectification_money = #{troubleshootRectificationMoney}</if>
|
<if test="troubleshootRectificationCompleteTime != null "> and troubleshoot_rectification_complete_time = #{troubleshootRectificationCompleteTime}</if>
|
<if test="troubleshootAcceptanceUserId != null "> and troubleshoot_acceptance_user_id = #{troubleshootAcceptanceUserId}</if>
|
<if test="troubleshootAfterChangeImageUrl != null and troubleshootAfterChangeImageUrl != ''"> and troubleshoot_after_change_image_url = #{troubleshootAfterChangeImageUrl}</if>
|
<if test="troubleshootAcceptanceOpinion != null and troubleshootAcceptanceOpinion != ''"> and troubleshoot_acceptance_opinion = #{troubleshootAcceptanceOpinion}</if>
|
<if test="troubleshootAcceptanceResult != null "> and troubleshoot_acceptance_result = #{troubleshootAcceptanceResult}</if>
|
<if test="troubleshootAcceptanceImageUrl != null and troubleshootAcceptanceImageUrl != ''"> and troubleshoot_acceptance_image_url = #{troubleshootAcceptanceImageUrl}</if>
|
<if test="troubleshootProgress != null "> and troubleshoot_progress = #{troubleshootProgress}</if>
|
</where>
|
</select>
|
|
<select id="selectTroubleshootListById" parameterType="Long" resultMap="TroubleshootListResult">
|
<include refid="selectTroubleshootListVo"/>
|
where troubleshoot_id = #{troubleshootId}
|
</select>
|
|
<insert id="insertTroubleshootList" parameterType="TroubleshootList">
|
insert into tr_troubleshoot_list
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="troubleshootId != null ">troubleshoot_id,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createTime != null ">create_time,</if>
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
<if test="updateTime != null ">update_time,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
<if test="troubleshootName != null and troubleshootName != ''">troubleshoot_name,</if>
|
<if test="troubleshootType != null ">troubleshoot_type,</if>
|
<if test="troubleshootDept != null ">troubleshoot_dept,</if>
|
<if test="troubleshootRistId != null ">troubleshoot_rist_id,</if>
|
<if test="troubleshootCheckUserId != null ">troubleshoot_check_user_id,</if>
|
<if test="troubleshootCheckedDeptId != null ">troubleshoot_checked_dept_id,</if>
|
<if test="troubleshootBiginTime != null ">troubleshoot_bigin_time,</if>
|
<if test="troubleshootEndTime != null ">troubleshoot_end_time,</if>
|
<if test="troubleshootDistributeStatus != null ">troubleshoot_distribute_status,</if>
|
<if test="troubleshootStatus != null ">troubleshoot_status,</if>
|
<if test="troubleshootTroubleName != null and troubleshootTroubleName != ''">troubleshoot_trouble_name,</if>
|
<if test="troubleshootTroubleDescription != null and troubleshootTroubleDescription != ''">troubleshoot_trouble_description,</if>
|
<if test="troubleshootTroubleLevel != null ">troubleshoot_trouble_level,</if>
|
<if test="troubleshootTroubleType != null ">troubleshoot_trouble_type,</if>
|
<if test="troubleshootTroubleDept != null ">troubleshoot_trouble_dept,</if>
|
<if test="troubleshootTroubleAddress != null and troubleshootTroubleAddress != ''">troubleshoot_trouble_address,</if>
|
<if test="troubleshootTime != null ">troubleshoot_time,</if>
|
<if test="troubleshootBeforeChangeImageUrl != null and troubleshootBeforeChangeImageUrl != ''">troubleshoot_before_change_image_url,</if>
|
<if test="troubleshootReviewUserId != null ">troubleshoot_review_user_id,</if>
|
<if test="troubleshootRectificationUserId != null ">troubleshoot_rectification_user_id,</if>
|
<if test="hiddenTroubleType != null ">hidden_trouble_type,</if>
|
<if test="hiddenTroubleStatus != null ">hidden_trouble_status,</if>
|
<if test="troubleshootRectificationMeasures != null and troubleshootRectificationMeasures != ''">troubleshoot_rectification_measures,</if>
|
<if test="troubleshootRectificationHappening != null and troubleshootRectificationHappening != ''">troubleshoot_rectification_happening,</if>
|
<if test="troubleshootRectificationMoney != null ">troubleshoot_rectification_money,</if>
|
<if test="troubleshootRectificationCompleteTime != null ">troubleshoot_rectification_complete_time,</if>
|
<if test="troubleshootAcceptanceUserId != null ">troubleshoot_acceptance_user_id,</if>
|
<if test="troubleshootAfterChangeImageUrl != null and troubleshootAfterChangeImageUrl != ''">troubleshoot_after_change_image_url,</if>
|
<if test="troubleshootAcceptanceOpinion != null and troubleshootAcceptanceOpinion != ''">troubleshoot_acceptance_opinion,</if>
|
<if test="troubleshootAcceptanceResult != null ">troubleshoot_acceptance_result,</if>
|
<if test="troubleshootAcceptanceImageUrl != null and troubleshootAcceptanceImageUrl != ''">troubleshoot_acceptance_image_url,</if>
|
<if test="troubleshootProgress != null ">troubleshoot_progress,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="troubleshootId != null ">#{troubleshootId},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createTime != null ">#{createTime},</if>
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
<if test="updateTime != null ">#{updateTime},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="troubleshootName != null and troubleshootName != ''">#{troubleshootName},</if>
|
<if test="troubleshootType != null ">#{troubleshootType},</if>
|
<if test="troubleshootDept != null ">#{troubleshootDept},</if>
|
<if test="troubleshootRistId != null ">#{troubleshootRistId},</if>
|
<if test="troubleshootCheckUserId != null ">#{troubleshootCheckUserId},</if>
|
<if test="troubleshootCheckedDeptId != null ">#{troubleshootCheckedDeptId},</if>
|
<if test="troubleshootBiginTime != null ">#{troubleshootBiginTime},</if>
|
<if test="troubleshootEndTime != null ">#{troubleshootEndTime},</if>
|
<if test="troubleshootDistributeStatus != null ">#{troubleshootDistributeStatus},</if>
|
<if test="troubleshootStatus != null ">#{troubleshootStatus},</if>
|
<if test="troubleshootTroubleName != null and troubleshootTroubleName != ''">#{troubleshootTroubleName},</if>
|
<if test="troubleshootTroubleDescription != null and troubleshootTroubleDescription != ''">#{troubleshootTroubleDescription},</if>
|
<if test="troubleshootTroubleLevel != null ">#{troubleshootTroubleLevel},</if>
|
<if test="troubleshootTroubleType != null ">#{troubleshootTroubleType},</if>
|
<if test="troubleshootTroubleDept != null ">#{troubleshootTroubleDept},</if>
|
<if test="troubleshootTroubleAddress != null and troubleshootTroubleAddress != ''">#{troubleshootTroubleAddress},</if>
|
<if test="troubleshootTime != null ">#{troubleshootTime},</if>
|
<if test="troubleshootBeforeChangeImageUrl != null and troubleshootBeforeChangeImageUrl != ''">#{troubleshootBeforeChangeImageUrl},</if>
|
<if test="troubleshootReviewUserId != null ">#{troubleshootReviewUserId},</if>
|
<if test="troubleshootRectificationUserId != null ">#{troubleshootRectificationUserId},</if>
|
<if test="hiddenTroubleType != null ">#{hiddenTroubleType},</if>
|
<if test="hiddenTroubleStatus != null ">#{hiddenTroubleStatus},</if>
|
<if test="troubleshootRectificationMeasures != null and troubleshootRectificationMeasures != ''">#{troubleshootRectificationMeasures},</if>
|
<if test="troubleshootRectificationHappening != null and troubleshootRectificationHappening != ''">#{troubleshootRectificationHappening},</if>
|
<if test="troubleshootRectificationMoney != null ">#{troubleshootRectificationMoney},</if>
|
<if test="troubleshootRectificationCompleteTime != null ">#{troubleshootRectificationCompleteTime},</if>
|
<if test="troubleshootAcceptanceUserId != null ">#{troubleshootAcceptanceUserId},</if>
|
<if test="troubleshootAfterChangeImageUrl != null and troubleshootAfterChangeImageUrl != ''">#{troubleshootAfterChangeImageUrl},</if>
|
<if test="troubleshootAcceptanceOpinion != null and troubleshootAcceptanceOpinion != ''">#{troubleshootAcceptanceOpinion},</if>
|
<if test="troubleshootAcceptanceResult != null ">#{troubleshootAcceptanceResult},</if>
|
<if test="troubleshootAcceptanceImageUrl != null and troubleshootAcceptanceImageUrl != ''">#{troubleshootAcceptanceImageUrl},</if>
|
<if test="troubleshootProgress != null ">#{troubleshootProgress},</if>
|
</trim>
|
</insert>
|
|
<update id="updateTroubleshootList" parameterType="TroubleshootList">
|
update tr_troubleshoot_list
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
<if test="troubleshootName != null and troubleshootName != ''">troubleshoot_name = #{troubleshootName},</if>
|
<if test="troubleshootType != null ">troubleshoot_type = #{troubleshootType},</if>
|
<if test="troubleshootDept != null ">troubleshoot_dept = #{troubleshootDept},</if>
|
<if test="troubleshootRistId != null ">troubleshoot_rist_id = #{troubleshootRistId},</if>
|
<if test="troubleshootCheckUserId != null ">troubleshoot_check_user_id = #{troubleshootCheckUserId},</if>
|
<if test="troubleshootCheckedDeptId != null ">troubleshoot_checked_dept_id = #{troubleshootCheckedDeptId},</if>
|
<if test="troubleshootBiginTime != null ">troubleshoot_bigin_time = #{troubleshootBiginTime},</if>
|
<if test="troubleshootEndTime != null ">troubleshoot_end_time = #{troubleshootEndTime},</if>
|
<if test="troubleshootDistributeStatus != null ">troubleshoot_distribute_status = #{troubleshootDistributeStatus},</if>
|
<if test="troubleshootStatus != null ">troubleshoot_status = #{troubleshootStatus},</if>
|
<if test="troubleshootTroubleName != null and troubleshootTroubleName != ''">troubleshoot_trouble_name = #{troubleshootTroubleName},</if>
|
<if test="troubleshootTroubleDescription != null and troubleshootTroubleDescription != ''">troubleshoot_trouble_description = #{troubleshootTroubleDescription},</if>
|
<if test="troubleshootTroubleLevel != null ">troubleshoot_trouble_level = #{troubleshootTroubleLevel},</if>
|
<if test="troubleshootTroubleType != null ">troubleshoot_trouble_type = #{troubleshootTroubleType},</if>
|
<if test="troubleshootTroubleDept != null ">troubleshoot_trouble_dept = #{troubleshootTroubleDept},</if>
|
<if test="troubleshootTroubleAddress != null and troubleshootTroubleAddress != ''">troubleshoot_trouble_address = #{troubleshootTroubleAddress},</if>
|
<if test="troubleshootTime != null ">troubleshoot_time = #{troubleshootTime},</if>
|
<if test="troubleshootBeforeChangeImageUrl != null and troubleshootBeforeChangeImageUrl != ''">troubleshoot_before_change_image_url = #{troubleshootBeforeChangeImageUrl},</if>
|
<if test="troubleshootReviewUserId != null ">troubleshoot_review_user_id = #{troubleshootReviewUserId},</if>
|
<if test="troubleshootRectificationUserId != null ">troubleshoot_rectification_user_id = #{troubleshootRectificationUserId},</if>
|
<if test="hiddenTroubleType != null ">hidden_trouble_type = #{hiddenTroubleType},</if>
|
<if test="hiddenTroubleStatus != null ">hidden_trouble_status = #{hiddenTroubleStatus},</if>
|
<if test="troubleshootRectificationMeasures != null and troubleshootRectificationMeasures != ''">troubleshoot_rectification_measures = #{troubleshootRectificationMeasures},</if>
|
<if test="troubleshootRectificationHappening != null and troubleshootRectificationHappening != ''">troubleshoot_rectification_happening = #{troubleshootRectificationHappening},</if>
|
<if test="troubleshootRectificationMoney != null ">troubleshoot_rectification_money = #{troubleshootRectificationMoney},</if>
|
<if test="troubleshootRectificationCompleteTime != null ">troubleshoot_rectification_complete_time = #{troubleshootRectificationCompleteTime},</if>
|
<if test="troubleshootAcceptanceUserId != null ">troubleshoot_acceptance_user_id = #{troubleshootAcceptanceUserId},</if>
|
<if test="troubleshootAfterChangeImageUrl != null and troubleshootAfterChangeImageUrl != ''">troubleshoot_after_change_image_url = #{troubleshootAfterChangeImageUrl},</if>
|
<if test="troubleshootAcceptanceOpinion != null and troubleshootAcceptanceOpinion != ''">troubleshoot_acceptance_opinion = #{troubleshootAcceptanceOpinion},</if>
|
<if test="troubleshootAcceptanceResult != null ">troubleshoot_acceptance_result = #{troubleshootAcceptanceResult},</if>
|
<if test="troubleshootAcceptanceImageUrl != null and troubleshootAcceptanceImageUrl != ''">troubleshoot_acceptance_image_url = #{troubleshootAcceptanceImageUrl},</if>
|
<if test="troubleshootProgress != null ">troubleshoot_progress = #{troubleshootProgress},</if>
|
</trim>
|
where troubleshoot_id = #{troubleshootId}
|
</update>
|
|
<delete id="deleteTroubleshootListById" parameterType="Long">
|
delete from tr_troubleshoot_list where troubleshoot_id = #{troubleshootId}
|
</delete>
|
|
<delete id="deleteTroubleshootListByIds" parameterType="String">
|
delete from tr_troubleshoot_list where troubleshoot_id in
|
<foreach item="troubleshootId" collection="array" open="(" separator="," close=")">
|
#{troubleshootId}
|
</foreach>
|
</delete>
|
|
</mapper>
|