添加设备查询和设备更新接口

This commit is contained in:
648540858
2024-03-13 23:16:01 +08:00
parent d78f76e58b
commit 4eb0163e43
11 changed files with 462 additions and 5 deletions

View File

@@ -3,6 +3,8 @@ package com.genersoft.iot.vmp.jt1078.dao;
import com.genersoft.iot.vmp.jt1078.bean.JTDevice;
import org.apache.ibatis.annotations.*;
import java.util.List;
@Mapper
public interface JTDeviceMapper {
@@ -25,4 +27,23 @@ public interface JTDeviceMapper {
"WHERE device_id=#{deviceId}"+
" </script>"})
void updateDevice(JTDevice device);
@Select(value = {" <script>" +
"SELECT * " +
"from " +
"wvp_jt_device jd " +
"WHERE " +
"1=1" +
" <if test='query != null'> AND (" +
"jd.province_id LIKE concat('%',#{query},'%') " +
"OR jd.city_id LIKE concat('%',#{query},'%') " +
"OR jd.maker_id LIKE concat('%',#{query},'%') " +
"OR jd.device_model LIKE concat('%',#{query},'%') " +
"OR jd.device_id LIKE concat('%',#{query},'%') " +
"OR jd.plate_no LIKE concat('%',#{query},'%')" +
")</if> " +
" <if test='online == true' > AND jd.status= true</if>" +
" <if test='online == false' > AND jd.status= false</if>" +
"ORDER BY jd.update_time " +
" </script>"})
List<JTDevice> getDeviceList(@Param("query") String query, @Param("online") Boolean online);
}