<?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="cn.gistack.sm.exam.mapper.ExamPlanMapper">
|
|
<resultMap id="selectExamPlan" type="cn.gistack.sm.exam.vo.ExamPlanVO">
|
<result column="id" property="id"/>
|
<result column="name" property="name"/>
|
<result column="exam_period" property="examPeriod"/>
|
<result column="cron_expression" property="cronExpression"/>
|
<result column="exam_role" property="examRole"/>
|
<result column="duty" property="duty"/>
|
<result column="effective_time_start" property="effectiveTimeStart"/>
|
<result column="effective_time_end" property="effectiveTimeEnd"/>
|
<result column="remark" property="remark"/>
|
<result column="status" property="status"/>
|
<result column="examPeriodText" property="examPeriodText"/>
|
</resultMap>
|
|
|
<!--分页列表查询-->
|
<select id="selectExamPlanPage" resultType="cn.gistack.sm.exam.vo.ExamPlanVO">
|
select plan.id,plan.name,plan.exam_period,plan.cron_expression,plan.exam_role,plan.duty,plan.effective_time_start,plan.effective_time_end,plan.remark,plan.status,
|
biz.dict_value examPeriodText
|
from sm_exam_plan plan
|
LEFT JOIN blade_dict_biz biz ON biz.dict_key = plan.exam_period AND biz.code = 'EXAM_PERIOD'
|
where plan.is_deleted = 0
|
<if test="examPlan.name !=null and examPlan.name !=''">
|
AND plan.name LIKE CONCAT('%',#{examPlan.name},'%')
|
</if>
|
<if test="examPlan.examPeriod !=null and examPlan.examPeriod !=''">
|
AND plan.exam_period = #{examPlan.examPeriod}
|
</if>
|
<if test="examPlan.status !=null and examPlan.status !='' ">
|
AND plan.status = #{examPlan.status}
|
</if>
|
order by plan.id desc
|
</select>
|
|
<!-- 设置启用或者禁用-->
|
<update id="enableOrDisable">
|
update sm_exam_plan
|
<set >
|
status = #{value}
|
</set>
|
where id = #{id}
|
</update>
|
|
</mapper>
|