diff --git a/src/main/java/com/ycwl/basic/mapper/DeviceMapper.java b/src/main/java/com/ycwl/basic/mapper/DeviceMapper.java deleted file mode 100644 index 79bde93..0000000 --- a/src/main/java/com/ycwl/basic/mapper/DeviceMapper.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.ycwl.basic.mapper; - -import com.ycwl.basic.model.mobile.scenic.ScenicDeviceCountVO; -import com.ycwl.basic.model.pc.device.entity.DeviceConfigEntity; -import com.ycwl.basic.model.pc.device.entity.DeviceEntity; -import com.ycwl.basic.model.pc.device.req.DeviceAddOrUpdateReq; -import com.ycwl.basic.model.pc.device.req.DeviceReqQuery; -import com.ycwl.basic.model.pc.device.resp.DeviceRespVO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.Date; -import java.util.List; - -/** - * @Author:longbinbin - * @Date:2024/11/29 14:48 - * device(设备管理) - */ -@Mapper -public interface DeviceMapper { - List list(DeviceReqQuery deviceReqQuery); - List listAll(); - DeviceRespVO getById(Long id); - int add(DeviceAddOrUpdateReq deviceReqQuery); - int deleteById(Long id); - int update(DeviceAddOrUpdateReq deviceReqQuery); - int updateStatus(Long id); - - DeviceEntity getByDeviceId(Long deviceId); - List listByScenicIdWithWVP(Long scenicId); - - ScenicDeviceCountVO deviceCountByScenicId(@Param("scenicId") Long scenicId); - - DeviceConfigEntity getConfigByDeviceId(Long deviceId); - int addConfig(DeviceConfigEntity deviceConfigEntity); - int updateConfig(DeviceConfigEntity deviceConfigEntity); - - DeviceEntity getByDeviceNo(String deviceNo); - - int updateEntity(DeviceEntity device); - - int addEntity(DeviceEntity device); - - int updateOnlineStatus(Long id, String ipAddr, int online, Date keepaliveAt); - - DeviceEntity getByDeviceNo2(String deviceNo); - - List listAllByScenicId(Long scenicId); - - int updateSort(Long id, Integer sort); -} diff --git a/src/main/resources/mapper/DeviceMapper.xml b/src/main/resources/mapper/DeviceMapper.xml deleted file mode 100644 index 86602ca..0000000 --- a/src/main/resources/mapper/DeviceMapper.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - insert into device(id, scenic_id, name, no, latitude, longitude) values (#{id}, #{scenicId}, #{name}, #{no}, #{latitude}, #{longitude}) - - - insert into device_config(id, device_id, create_time) - values (#{id}, #{deviceId}, now()) - - - insert into device(id, name, no, status, online, ip_addr, keepalive_at, create_at, update_at) - values (#{id}, #{name}, #{no}, 0, #{online}, #{ipAddr}, #{keepaliveAt}, now(), now()) - - - update device set scenic_id = #{scenicId}, name = #{name}, no = #{no}, longitude = #{longitude}, latitude = #{latitude}, update_at = now() where id = #{id} - - - update device - set status = (CASE - status - WHEN 1 THEN - 0 - WHEN 0 THEN - 1 - ELSE null - END) - where id = #{id} - - - update device_config - set viid_type = #{viidType}, - store_type = #{storeType}, - store_config_json = #{storeConfigJson}, - store_expire_day = #{storeExpireDay}, - online_check = #{onlineCheck}, - online_max_interval = #{onlineMaxInterval}, - cut_pre = #{cutPre}, - cut_post = #{cutPost}, - enable_pre_book = #{enablePreBook}, - image_free = #{imageFree}, - video_free = #{videoFree}, - pair_device = #{pairDevice}, - video_crop = #{videoCrop} - where id = #{id} - - - update device - set name = #{name}, - no = #{no}, - online = #{online}, - ip_addr = #{ipAddr}, - keepalive_at = #{keepaliveAt}, - update_at = now() - where id = #{id} - - - update device - set online = #{online}, - ip_addr = #{ipAddr}, - keepalive_at = #{keepaliveAt}, - update_at = now() - where id = #{id} - - - update device - set sort = #{sort} - where id = #{id} - - - delete from device where id = #{id} - - - - - - - - - - - - \ No newline at end of file