<?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.HiddenDangerCheckJob.mapper.HiddenDangerCheckJobMapper">
|
|
<resultMap type="HiddenDangerCheckJob" id="JobResult">
|
<id property="jobId" column="job_id" />
|
<result property="jobName" column="job_name" />
|
<result property="jobGroup" column="job_group" />
|
<result property="invokeTarget" column="invoke_target" />
|
<result property="cronExpression" column="cron_expression" />
|
<result property="misfirePolicy" column="misfire_policy" />
|
<result property="concurrent" column="concurrent" />
|
<result property="status" column="status" />
|
<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="troubleshootTypeId" column="troubleshoot_type_id" />
|
<result property="troubleshootTypeName" column="troubleshoot_type_name" />
|
<result property="troubleshootTypeCycleNum" column="troubleshoot_type_cycle_num" />
|
<result property="troubleshootTypeCycleType" column="troubleshoot_type_cycle_type" />
|
<result property="companyId" column="company_id" />
|
<result property="riskType" column="risk_type" />
|
<result property="riskId" column="risk_id" />
|
<result property="riskName" column="risk_name" />
|
<result property="riskPlaceId" column="risk_place_id" />
|
<result property="riskPlaceName" column="risk_place_name" />
|
<result property="riskDeptId" column="risk_dept_id" />
|
<result property="riskDeptName" column="risk_dept_name" />
|
<result property="executeUserId" column="execute_user_id" />
|
<result property="executeUserName" column="execute_user_name" />
|
<result property="createUserId" column="create_user_id" />
|
<result property="createUserName" column="create_user_name" />
|
<result property="startTime" column="start_time" />
|
|
|
<result property="checkType" column="check_type" />
|
|
</resultMap>
|
|
<sql id="selectJobVo">
|
select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent,
|
status, create_by, create_time, remark,
|
troubleshoot_type_id, troubleshoot_type_name,
|
troubleshoot_type_cycle_num, troubleshoot_type_cycle_type,
|
company_id, risk_type, risk_id, risk_name, risk_place_id,risk_place_name,
|
risk_dept_id, risk_dept_name, execute_user_id,
|
execute_user_name, start_time, create_user_id,
|
create_user_name,
|
check_type
|
from tr_hidden_danger_check_job
|
</sql>
|
|
<select id="selectJobList" parameterType="Job" resultMap="JobResult">
|
<include refid="selectJobVo"/>
|
<where>
|
<if test="jobName != null and jobName != ''">
|
AND job_name like concat('%', #{jobName}, '%')
|
</if>
|
<if test="jobGroup != null and jobGroup != ''">
|
AND job_group = #{jobGroup}
|
</if>
|
<if test="status != null and status != ''">
|
AND status = #{status}
|
</if>
|
<if test="invokeTarget != null and invokeTarget != ''">
|
AND invoke_target like concat('%', #{invokeTarget}, '%')
|
</if>
|
|
<if test="troubleshootTypeId != null "> and troubleshoot_type_id = #{troubleshootTypeId}</if>
|
<if test="troubleshootTypeName != null and troubleshootTypeName != ''"> and troubleshoot_type_name like concat('%', #{troubleshootTypeName}, '%')</if>
|
<if test="troubleshootTypeCycleNum != null "> and troubleshoot_type_cycle_num = #{troubleshootTypeCycleNum}</if>
|
<if test="troubleshootTypeCycleType != null "> and troubleshoot_type_cycle_type = #{troubleshootTypeCycleType}</if>
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
<if test="riskType != null and riskType != ''"> and risk_type = #{riskType}</if>
|
<if test="riskId != null "> and risk_id = #{riskId}</if>
|
<if test="riskName != null and riskName != ''"> and risk_name like concat('%', #{riskName}, '%')</if>
|
<if test="riskPlaceId != null and riskPlaceId != ''"> and risk_place_id = #{riskPlaceId}</if>
|
<if test="riskPlaceName != null and riskPlaceName != ''"> and risk_place_name = #{riskPlaceName}</if>
|
<if test="riskDeptId != null "> and risk_dept_id = #{riskDeptId}</if>
|
<if test="riskDeptName != null and riskDeptName != ''"> and risk_dept_name like concat('%', #{riskDeptName}, '%')</if>
|
<if test="executeUserId != null "> and execute_user_id = #{executeUserId}</if>
|
<if test="executeUserName != null and executeUserName != ''"> and execute_user_name like concat('%', #{executeUserName}, '%')</if>
|
|
<if test="createUserId != null "> and create_user_id = #{createUserId}</if>
|
<if test="createUserName != null and createUserName != ''"> and create_user_name like concat('%', #{createUserName}, '%')</if>
|
|
|
<if test="startTime != null "> and start_time = #{startTime}</if>
|
|
|
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
|
|
|
</where>
|
</select>
|
|
<select id="selectJobAll" resultMap="JobResult">
|
<include refid="selectJobVo"/>
|
</select>
|
|
<select id="selectJobById" parameterType="Long" resultMap="JobResult">
|
<include refid="selectJobVo"/>
|
where job_id = #{jobId}
|
</select>
|
|
<delete id="deleteJobById" parameterType="Long">
|
delete from tr_hidden_danger_check_job where job_id = #{jobId}
|
</delete>
|
|
<delete id="deleteJobByIds" parameterType="Long">
|
delete from tr_hidden_danger_check_job where job_id in
|
<foreach collection="array" item="jobId" open="(" separator="," close=")">
|
#{jobId}
|
</foreach>
|
</delete>
|
|
<update id="updateJob" parameterType="Job">
|
update tr_hidden_danger_check_job
|
<set>
|
<if test="jobName != null and jobName != ''">job_name = #{jobName},</if>
|
<if test="jobGroup != null and jobGroup != ''">job_group = #{jobGroup},</if>
|
<if test="invokeTarget != null and invokeTarget != ''">invoke_target = #{invokeTarget},</if>
|
<if test="cronExpression != null and cronExpression != ''">cron_expression = #{cronExpression},</if>
|
<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy = #{misfirePolicy},</if>
|
<if test="concurrent != null and concurrent != ''">concurrent = #{concurrent},</if>
|
<if test="status !=null">status = #{status},</if>
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
<if test="troubleshootTypeId != null ">troubleshoot_type_id = #{troubleshootTypeId},</if>
|
<if test="troubleshootTypeName != null and troubleshootTypeName != ''">troubleshoot_type_name = #{troubleshootTypeName},</if>
|
<if test="troubleshootTypeCycleNum != null ">troubleshoot_type_cycle_num = #{troubleshootTypeCycleNum},</if>
|
<if test="troubleshootTypeCycleType != null ">troubleshoot_type_cycle_type = #{troubleshootTypeCycleType},</if>
|
<if test="companyId != null ">company_id = #{companyId},</if>
|
<if test="riskType != null and riskType != ''">risk_type = #{riskType},</if>
|
<if test="riskId != null ">risk_id = #{riskId},</if>
|
<if test="riskName != null and riskName != ''">risk_name = #{riskName},</if>
|
<if test="riskPlaceId != null and riskPlaceId != ''">risk_place_id = #{riskPlaceId},</if>
|
<if test="riskPlaceName != null and riskPlaceName != ''">risk_place_name = #{riskPlaceName},</if>
|
<if test="riskDeptId != null ">risk_dept_id = #{riskDeptId},</if>
|
<if test="riskDeptName != null and riskDeptName != ''">risk_dept_name = #{riskDeptName},</if>
|
<if test="executeUserId != null ">execute_user_id = #{executeUserId},</if>
|
<if test="executeUserName != null and executeUserName != ''">execute_user_name = #{executeUserName},</if>
|
|
<if test="createUserId != null ">create_user_id = #{createUserId},</if>
|
<if test="createUserName != null and createUserName != ''">create_user_name = #{createUserName},</if>
|
|
<if test="startTime != null ">start_time = #{startTime},</if>
|
|
<if test="checkType != null and checkType != ''">check_type = #{checkType},</if>
|
|
update_time = sysdate()
|
</set>
|
where job_id = #{jobId}
|
</update>
|
|
<insert id="insertJob" parameterType="Job" useGeneratedKeys="true" keyProperty="jobId">
|
insert into tr_hidden_danger_check_job(
|
<if test="jobId != null and jobId != 0">job_id,</if>
|
<if test="jobName != null and jobName != ''">job_name,</if>
|
<if test="jobGroup != null and jobGroup != ''">job_group,</if>
|
<if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if>
|
<if test="cronExpression != null and cronExpression != ''">cron_expression,</if>
|
<if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy,</if>
|
<if test="concurrent != null and concurrent != ''">concurrent,</if>
|
<if test="status != null and status != ''">status,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="troubleshootTypeId != null ">troubleshoot_type_id,</if>
|
<if test="troubleshootTypeName != null and troubleshootTypeName != ''">troubleshoot_type_name,</if>
|
<if test="troubleshootTypeCycleNum != null ">troubleshoot_type_cycle_num,</if>
|
<if test="troubleshootTypeCycleType != null ">troubleshoot_type_cycle_type,</if>
|
<if test="companyId != null ">company_id,</if>
|
<if test="riskType != null and riskType != ''">risk_type,</if>
|
<if test="riskId != null ">risk_id,</if>
|
<if test="riskName != null and riskName != ''">risk_name,</if>
|
<if test="riskPlaceId != null and riskPlaceId != ''">risk_place_id,</if>
|
<if test="riskPlaceName != null and riskPlaceName != ''">risk_place_name,</if>
|
<if test="riskDeptId != null ">risk_dept_id,</if>
|
<if test="riskDeptName != null and riskDeptName != ''">risk_dept_name,</if>
|
<if test="executeUserId != null ">execute_user_id,</if>
|
<if test="executeUserName != null and executeUserName != ''">execute_user_name,</if>
|
<if test="createUserId != null ">create_user_id,</if>
|
<if test="createUserName != null and createUserName != ''">create_user_name,</if>
|
<if test="startTime != null ">start_time,</if>
|
|
<if test="checkType != null and checkType != ''">check_type,</if>
|
create_time
|
)values(
|
<if test="jobId != null and jobId != 0">#{jobId},</if>
|
<if test="jobName != null and jobName != ''">#{jobName},</if>
|
<if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if>
|
<if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if>
|
<if test="cronExpression != null and cronExpression != ''">#{cronExpression},</if>
|
<if test="misfirePolicy != null and misfirePolicy != ''">#{misfirePolicy},</if>
|
<if test="concurrent != null and concurrent != ''">#{concurrent},</if>
|
<if test="status != null and status != ''">#{status},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="troubleshootTypeId != null ">#{troubleshootTypeId},</if>
|
<if test="troubleshootTypeName != null and troubleshootTypeName != ''">#{troubleshootTypeName},</if>
|
<if test="troubleshootTypeCycleNum != null ">#{troubleshootTypeCycleNum},</if>
|
<if test="troubleshootTypeCycleType != null ">#{troubleshootTypeCycleType},</if>
|
<if test="companyId != null ">#{companyId},</if>
|
<if test="riskType != null and riskType != ''">#{riskType},</if>
|
<if test="riskId != null ">#{riskId},</if>
|
<if test="riskName != null and riskName != ''">#{riskName},</if>
|
<if test="riskPlaceId != null and riskPlaceId != ''">#{riskPlaceId},</if>
|
<if test="riskPlaceName != null and riskPlaceName != ''">#{riskPlaceName},</if>
|
<if test="riskDeptId != null ">#{riskDeptId},</if>
|
<if test="riskDeptName != null and riskDeptName != ''">#{riskDeptName},</if>
|
<if test="executeUserId != null ">#{executeUserId},</if>
|
<if test="executeUserName != null and executeUserName != ''">#{executeUserName},</if>
|
<if test="createUserId != null ">#{createUserId},</if>
|
<if test="createUserName != null and createUserName != ''">#{createUserName},</if>
|
<if test="startTime != null ">#{startTime},</if>
|
|
<if test="checkType != null and checkType != ''">#{checkType},</if>
|
sysdate()
|
)
|
</insert>
|
|
</mapper>
|