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.
118 lines
3.0 KiB
118 lines
3.0 KiB
package com.psdc.mapper;
|
|
|
|
import java.util.List;
|
|
|
|
import com.psdc.entity.PsdcDevice;
|
|
import com.psdc.entity.res.PsdcDeviceInfoRes;
|
|
import com.psdc.entity.vo.DeviceStatusVo;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.springframework.data.domain.Pageable;
|
|
import org.springframework.security.access.method.P;
|
|
|
|
|
|
/**
|
|
* 设备信息表;(psdc_device)表数据库访问层
|
|
* @author : http://www.chiner.pro
|
|
* @date : 2023-4-23
|
|
*/
|
|
@Mapper
|
|
public interface PsdcDeviceMapper{
|
|
/**
|
|
* 通过ID查询单条数据
|
|
*
|
|
* @param deviceId 主键
|
|
* @return 实例对象
|
|
*/
|
|
PsdcDevice queryById(Integer deviceId);
|
|
|
|
DeviceStatusVo queryDeviceStatusById(@Param(value = "deviceId") Integer deviceId);
|
|
|
|
|
|
List<Integer> selMyWorkDevices(@Param(value = "devType") Integer devType,
|
|
@Param(value = "userId") Long userId);
|
|
|
|
/**
|
|
* 设备绑定用户
|
|
* @param userId
|
|
* @param devId
|
|
* @return
|
|
*/
|
|
Integer upDevStaUser(@Param(value = "userId") Long userId,
|
|
@Param(value = "devId") Integer devId);
|
|
|
|
|
|
/**
|
|
* 分页查询指定行数据
|
|
*
|
|
* @param psdcDevice 查询条件
|
|
* @return 对象列表
|
|
*/
|
|
List<PsdcDeviceInfoRes> queryAllByLimit(PsdcDevice psdcDevice);
|
|
/**
|
|
* 统计总行数
|
|
*
|
|
* @param psdcDevice 查询条件
|
|
* @return 总行数
|
|
*/
|
|
long count(PsdcDevice psdcDevice);
|
|
/**
|
|
* 新增数据
|
|
*
|
|
* @param psdcDevice 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int insert(PsdcDevice psdcDevice);
|
|
/**
|
|
* 更新数据
|
|
*
|
|
* @param psdcDevice 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int update(PsdcDevice psdcDevice);
|
|
/**
|
|
* 通过主键删除数据
|
|
*
|
|
* @param deviceIds 主键
|
|
* @return 影响行数
|
|
*/
|
|
int deleteById(@Param(value = "deviceIds") Long[] deviceIds);
|
|
|
|
/**
|
|
* 根据用户id查询设备
|
|
* @param userId
|
|
* @return
|
|
*/
|
|
List<PsdcDevice> queryByUserId(@Param(value = "userId") Long userId,
|
|
@Param(value = "parentId") Integer parentId);
|
|
|
|
List<PsdcDevice> queryByModel(@Param(value = "userId") Long userId,
|
|
@Param(value = "devModel") String devModel);
|
|
|
|
/**
|
|
* 根据设备id修改设备状态
|
|
* @param deviceId
|
|
* @return
|
|
*/
|
|
int updateDevRunStatusByDevId(@Param(value = "deviceId") Integer deviceId,
|
|
@Param(value = "runStatus") Integer runStatus);
|
|
|
|
|
|
/**
|
|
* 根据设备id查询设备名称
|
|
* @param deviceId
|
|
* @return
|
|
*/
|
|
String queryDeviceNameByDeviceId(Integer deviceId);
|
|
|
|
|
|
|
|
void saveDevicesData(@Param(value = "devRecord") List<PsdcDevice> devRecord);
|
|
|
|
/**
|
|
* 控制页面查询设备查询可操作设备列表
|
|
* @param userId
|
|
* @return
|
|
*/
|
|
List<PsdcDevice> controlQueryByUserId(Long userId);
|
|
} |