101 lines
2.1 KiB
Java
101 lines
2.1 KiB
Java
package com.sv.mapper;
|
|
import com.common.DeviceDTO;
|
|
import com.sv.annotation.NoPlatform;
|
|
import com.sv.entity.Device;
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* Mapper - 门禁设备
|
|
*
|
|
* @author zhaoziyu
|
|
* @since 2018-08-09
|
|
*/
|
|
public interface DeviceMapper {
|
|
|
|
/**
|
|
* 新建门禁设备
|
|
*
|
|
* @param device 门禁设备
|
|
*/
|
|
void insert(Device device);
|
|
|
|
/**
|
|
* 更新门禁设备
|
|
*
|
|
* @param device 门禁设备
|
|
*/
|
|
void update(Device device);
|
|
|
|
/**
|
|
* 删除门禁设备
|
|
*
|
|
* @param id 编号
|
|
* @return 删除数量
|
|
*/
|
|
int delete(Integer id);
|
|
|
|
/**
|
|
* 删除门禁设备
|
|
*
|
|
* @param ids 编号数组
|
|
* @return 删除数量
|
|
*/
|
|
int deleteByIds(Integer[] ids);
|
|
|
|
/**
|
|
* 查询门禁设备
|
|
*
|
|
* @param id 编号
|
|
* @return 门禁设备
|
|
*/
|
|
@NoPlatform
|
|
Device findById(Integer id);
|
|
|
|
/**
|
|
* 查询门禁设备
|
|
*
|
|
* @return 门禁设备集合
|
|
*/
|
|
List<Device> findAll();
|
|
|
|
List<DeviceDTO> findAllDTO();
|
|
|
|
Integer countByStream(@Param("stream") String stream,@Param("id") Integer id);
|
|
|
|
/**
|
|
* 更新设备状态为 0 - 未连接
|
|
*/
|
|
void offline(@Param("venueId") Integer venueId,@Param("deviceName") String deviceName);
|
|
|
|
/**
|
|
* 更新设备状态为 2 - 连接成功
|
|
*/
|
|
void online(@Param("venueId") Integer venueId, @Param("deviceName") String deviceName);
|
|
|
|
|
|
Integer checkDevice(@Param("deviceName") String deviceName,@Param("venueId") Integer venueId);
|
|
|
|
/**
|
|
* 根据记录找设备
|
|
* @param venueId
|
|
* @return
|
|
*/
|
|
@NoPlatform
|
|
Device findByDevice(@Param("venueId") Integer venueId);
|
|
|
|
/**
|
|
* 设备绑定正在扫码的用户
|
|
*/
|
|
void bindMember(@Param("bindMember") Integer bindMember,@Param("venueId") Integer venueId,@Param("deviceName") String deviceName);
|
|
|
|
/**
|
|
* 更新设备状态为 2 - 连接成功
|
|
*/
|
|
void unBindMember(@Param("venueId") Integer venueId, @Param("deviceName") String deviceName);
|
|
|
|
|
|
}
|