| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- package com.ruoyi.device.mapper;
- import com.ruoyi.device.domain.entity.TsbDevice;
- import com.ruoyi.device.domain.vo.TsbDeviceHomeVo;
- import java.util.List;
- /**
- * 调试宝设备表 tsb_device 数据访问层
- *
- * @author lwm
- */
- public interface TsbDeviceMapper
- {
- /**
- * 条件分页查询设备列表(仅 del_flag = 0)
- * 条件含:deviceId、imei(模糊)、deviceType、deviceSn、status;
- * 扩展请求参数:params.beginProduceDate、params.endProduceDate(yyyy-MM-dd,按 device_produce_date 日期闭区间)
- *
- * @param tsbDevice 查询条件,字段可为空;日期范围放在 BaseEntity.params 中
- * @return 设备列表
- */
- List<TsbDevice> selectTsbDeviceList(TsbDevice tsbDevice);
- /**
- * 首页设备卡片列表(含绑定用户、部门)
- */
- List<TsbDeviceHomeVo> selectTsbDeviceHomeList(TsbDevice tsbDevice);
- /**
- * 按 SN码 查询当前用户有操作权限的设备
- */
- TsbDevice selectAccessibleDeviceBySn(TsbDevice tsbDevice);
- /**
- * 按主键查询未删除的设备
- *
- * @param deviceId 设备主键
- * @return 设备实体,不存在或已逻辑删除时返回 null
- */
- TsbDevice selectTsbDeviceById(Long deviceId);
- /**
- * 按 IMEI 精确查询未删除的设备
- *
- * @param imei 设备 IMEI
- * @return 设备实体
- */
- TsbDevice selectTsbDeviceByImei(String imei);
- /**
- * 按设备 SN 精确查询未删除的设备
- *
- * @param deviceSn 设备 SN 码
- * @return 设备实体
- */
- TsbDevice selectTsbDeviceByDeviceSn(Long deviceSn);
- /**
- * IMEI 唯一性校验:在「未删除」设备中是否存在相同 IMEI
- *
- * @param imei IMEI
- * @return 设备信息
- */
- TsbDevice checkImeiUnique(String imei);
- /**
- * 设备 SN 唯一性校验:在「未删除」设备中是否存在相同 device_sn
- *
- * @param deviceSn 设备 SN 码
- * @return 设备信息
- */
- TsbDevice checkDeviceSnUnique(Long deviceSn);
- /**
- * 新增设备,主键回填至实体 deviceId
- *
- * @param tsbDevice 设备实体
- * @return 影响行数
- */
- int insertTsbDevice(TsbDevice tsbDevice);
- /**
- * 按主键更新设备(仅更新非空字段,且要求 del_flag = 0)
- *
- * @param tsbDevice 设备实体,须含 deviceId
- * @return 影响行数
- */
- int updateTsbDevice(TsbDevice tsbDevice);
- /**
- * 批量逻辑删除:del_flag 置为 2
- *
- * @param deviceIds 设备主键数组
- * @return 影响行数
- */
- int deleteTsbDeviceByIds(Long[] deviceIds);
- }
|