JinJiHuJava/ruoyi-admin/src/main/resources/mapper/jjh/ent/JSmartRemindersMapper.xml

43 lines
1.5 KiB

10 months ago
<?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>
10 months ago
<select id="page" resultType="com.ruoyi.jjh.ent.entity.JSmartReminders">
10 months ago
select a.*,
jp.project_small_type as projectSmallType,
jp.declare_unit as qymc
10 months ago
from j_smart_reminders a
left join j_project jp on a.project_id = jp.id
10 months ago
<where>
<if test="req.rulesName != null and req.rulesName != '' ">
10 months ago
and a.rules_name = #{req.rulesName}
10 months ago
</if>
10 months ago
<if test="req.alertType != null and req.alertType != '' ">
and a.alert_type = #{req.alertType}
</if>
10 months ago
</where>
10 months ago
order by a.create_time desc
10 months ago
</select>
10 months ago
10 months ago
<select id="selectOneSmart" resultType="com.ruoyi.jjh.ent.entity.JSmartReminders">
10 months ago
select a.*,
jp.project_small_type as projectSmallType,
jp.declare_unit as qymc
10 months ago
from j_smart_reminders a
10 months ago
left join j_project jp on a.project_id = jp.id
10 months ago
where a.id=#{id}
10 months ago
</select>
<select id="selectJobSmart" resultType="com.ruoyi.jjh.ent.entity.request.JAddJobSmart">
select * from sys_job_smart
where smart_id = #{smartId}
</select>
10 months ago
</mapper>