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.
83 lines
2.0 KiB
83 lines
2.0 KiB
package com.psdc.mapper;
|
|
|
|
import java.util.List;
|
|
|
|
import com.psdc.entity.PsdcDevice;
|
|
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);
|
|
|
|
|
|
List<Integer> selMyWorkDevices(@Param(value = "devType") Integer devType,
|
|
@Param(value = "userId") Long userId);
|
|
|
|
|
|
/**
|
|
* 分页查询指定行数据
|
|
*
|
|
* @param psdcDevice 查询条件
|
|
* @param pageable 分页对象
|
|
* @return 对象列表
|
|
*/
|
|
List<PsdcDevice> queryAllByLimit(PsdcDevice psdcDevice, @Param("pageable") Pageable pageable);
|
|
/**
|
|
* 统计总行数
|
|
*
|
|
* @param psdcDevice 查询条件
|
|
* @return 总行数
|
|
*/
|
|
long count(PsdcDevice psdcDevice);
|
|
/**
|
|
* 新增数据
|
|
*
|
|
* @param psdcDevice 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int insert(PsdcDevice psdcDevice);
|
|
/**
|
|
* 更新数据
|
|
*
|
|
* @param psdcDevice 实例对象
|
|
* @return 影响行数
|
|
*/
|
|
int update(PsdcDevice psdcDevice);
|
|
/**
|
|
* 通过主键删除数据
|
|
*
|
|
* @param deviceId 主键
|
|
* @return 影响行数
|
|
*/
|
|
int deleteById(Integer deviceId);
|
|
|
|
/**
|
|
* 根据用户id查询设备
|
|
* @param userId
|
|
* @return
|
|
*/
|
|
List<PsdcDevice> queryByUserId(Long userId);
|
|
|
|
/**
|
|
* 根据设备id修改设备状态
|
|
* @param deviceId
|
|
* @return
|
|
*/
|
|
int updateDevRunStatusByDevId(@Param(value = "deviceId") Integer deviceId,
|
|
@Param(value = "runStatus") Integer runStatus);
|
|
} |