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.
60 lines
2.9 KiB
60 lines
2.9 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="org.dromara.sample.manage.mapper.IDeviceQrtzMapper">
|
|
<resultMap id="listManageFilePlatformInfoMap" type="org.dromara.sample.manage.model.entity.DeviceQrtzEntity">
|
|
<result column="id" property="id" jdbcType="VARCHAR"/>
|
|
<result column="device_sn" property="deviceSn" jdbcType="VARCHAR"/>
|
|
<result column="name" property="name" jdbcType="VARCHAR"/>
|
|
<result column="status" property="status" jdbcType="VARCHAR"/>
|
|
<collection column="{qrtzId=id}"
|
|
property="deviceQrtzDates" ofType="org.dromara.sample.manage.model.entity.DeviceQrtzDateEntity"
|
|
javaType="java.util.ArrayList"
|
|
select="org.dromara.sample.manage.mapper.IDeviceQrtzDateMapper.listDeviceQrtzDateByQrtzAndDate"/>
|
|
</resultMap>
|
|
|
|
|
|
<select id="listManageDeviceQrtz" resultMap="listManageFilePlatformInfoMap">
|
|
SELECT wdq.* FROM manage_device_qrtz wdq
|
|
LEFT JOIN manage_device wd ON wdq.device_sn = wd.device_sn
|
|
WHERE wdq.del_flag = 0
|
|
<if test="condition.name != null and condition.name != ''">
|
|
AND wdq.name like concat(concat('%',#{condition.name}),'%')
|
|
</if>
|
|
<if test="condition.status != null">
|
|
AND wdq.status = #{condition.status}
|
|
</if>
|
|
<if test="condition.startDate != null">
|
|
AND DATE_FORMAT(wdq.`start_date`,'%H:%i:%s') >= DATE_FORMAT(#{condition.startDate},'%H:%i:%s')
|
|
</if>
|
|
<if test="condition.endDate != null">
|
|
AND DATE_FORMAT(wdq.end_date,'%H:%i:%s') <= DATE_FORMAT(#{endDate},'%H:%i:%s')
|
|
</if>
|
|
<if test="condition.deviceSn != null and condition.deviceSn != ''">
|
|
AND wd.device_sn like concat(concat('%',#{condition.deviceSn}),'%')
|
|
</if>
|
|
<if test="condition.deptName != null and condition.deptName != ''">
|
|
AND wd.dept_name like concat(concat('%',#{condition.deptName}),'%')
|
|
</if>
|
|
<if test="condition.deptIds.size > 0">
|
|
AND wd.dept_id in
|
|
<foreach item="id" collection="condition.deptIds" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
<if test="condition.proIds.size > 0">
|
|
AND wd.pro_id in
|
|
<foreach item="proId" collection="condition.proIds" open="(" separator="," close=")">
|
|
#{proId}
|
|
</foreach>
|
|
</if>
|
|
order by wdq.status asc, wdq.create_time desc
|
|
</select>
|
|
<select id="calendarList" resultType="java.util.Map"></select>
|
|
<select id="manageDeviceQrtzFileByQrtzId"
|
|
resultType="org.dromara.sample.manage.model.entity.DeviceQrtzFileEntity">
|
|
select dqf.* from manage_device_qrtz_file dqf where dqf.qrtz_id=#{qrtzId}
|
|
ORDER BY dqf.sort
|
|
</select>
|
|
</mapper>
|
|
|