You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.5 KiB
43 lines
1.5 KiB
<?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.jjh.ent.mapper.JSmartRemindersMapper">
|
|
|
|
<insert id="addJobSmart">
|
|
INSERT INTO sys_job_smart (smart_id, job_id)
|
|
VALUES (#{req.smartId}, #{req.jobId});
|
|
</insert>
|
|
|
|
|
|
<select id="page" resultType="com.ruoyi.jjh.ent.entity.JSmartReminders">
|
|
select a.*,
|
|
jp.project_small_type as projectSmallType,
|
|
jp.declare_unit as qymc
|
|
from j_smart_reminders a
|
|
left join j_project jp on a.project_id = jp.id
|
|
<where>
|
|
<if test="req.rulesName != null and req.rulesName != '' ">
|
|
and a.rules_name = #{req.rulesName}
|
|
</if>
|
|
<if test="req.alertType != null and req.alertType != '' ">
|
|
and a.alert_type = #{req.alertType}
|
|
</if>
|
|
</where>
|
|
order by a.create_time desc
|
|
</select>
|
|
|
|
<select id="selectOneSmart" resultType="com.ruoyi.jjh.ent.entity.JSmartReminders">
|
|
select a.*,
|
|
jp.project_small_type as projectSmallType,
|
|
jp.declare_unit as qymc
|
|
from j_smart_reminders a
|
|
left join j_project jp on a.project_id = jp.id
|
|
where a.id=#{id}
|
|
</select>
|
|
<select id="selectJobSmart" resultType="com.ruoyi.jjh.ent.entity.request.JAddJobSmart">
|
|
select * from sys_job_smart
|
|
where smart_id = #{smartId}
|
|
</select>
|
|
</mapper>
|