You've already forked FrameTour-BE
模板、设备排序
This commit is contained in:
@ -58,6 +58,11 @@
|
||||
update_at = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateSort">
|
||||
update device
|
||||
set sort = #{sort}
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="deleteById">
|
||||
delete from device where id = #{id}
|
||||
</delete>
|
||||
@ -85,6 +90,7 @@
|
||||
and d.create_at <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by sort
|
||||
</select>
|
||||
<select id="getById" resultType="com.ycwl.basic.model.pc.device.resp.DeviceRespVO">
|
||||
select d.id, scenic_id, d.name, no, d.longitude, d.latitude, d.status, create_at, d.update_at, s.name scenic_name
|
||||
@ -123,6 +129,7 @@
|
||||
select *
|
||||
from device
|
||||
where status = 1
|
||||
order by sort
|
||||
</select>
|
||||
<select id="getByDeviceNo2" resultType="com.ycwl.basic.model.pc.device.entity.DeviceEntity">
|
||||
select *
|
||||
@ -130,4 +137,10 @@
|
||||
where no_2 = #{deviceNo}
|
||||
limit 1
|
||||
</select>
|
||||
<select id="listAllByScenicId" resultType="java.lang.Long">
|
||||
select id
|
||||
from device
|
||||
where scenic_id = #{scenicId}
|
||||
order by sort
|
||||
</select>
|
||||
</mapper>
|
@ -85,6 +85,11 @@
|
||||
where status = 0 and worker_id is null
|
||||
limit 1
|
||||
</select>
|
||||
<select id="selectAllNotRunning" resultType="com.ycwl.basic.model.pc.task.entity.TaskEntity">
|
||||
select *
|
||||
from task
|
||||
where status = 0 and worker_id is null
|
||||
</select>
|
||||
<select id="countTask" resultType="java.lang.Integer">
|
||||
select count(1) from task
|
||||
<where>
|
||||
@ -123,4 +128,9 @@
|
||||
<if test="endTime!= null">and create_time <= #{endTime} </if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectAllRunning" resultType="com.ycwl.basic.model.pc.task.entity.TaskEntity">
|
||||
select *
|
||||
from task
|
||||
where status = 2
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -54,6 +54,11 @@
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateSort">
|
||||
update template
|
||||
set sort = #{sort}
|
||||
where id = #{templateId}
|
||||
</update>
|
||||
<delete id="deleteById">
|
||||
delete from template where id = #{id}
|
||||
</delete>
|
||||
@ -84,6 +89,7 @@
|
||||
<if test="startTime!= null">and t.create_time >= #{startTime} </if>
|
||||
<if test="endTime!= null">and t.create_time <= #{endTime} </if>
|
||||
</where>
|
||||
order by scenic_id, sort
|
||||
</select>
|
||||
<select id="getById" resultType="com.ycwl.basic.model.pc.template.resp.TemplateRespVO">
|
||||
select t.*, s.name as scenic_name
|
||||
@ -127,4 +133,10 @@
|
||||
from template
|
||||
where status = 1 and pid = 0
|
||||
</select>
|
||||
<select id="listAllTemplateIdByScenicId" resultType="java.lang.Long">
|
||||
select t.id
|
||||
from template t
|
||||
where t.scenic_id = #{scenicId} and t.pid = 0
|
||||
order by sort
|
||||
</select>
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user