123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package com.zy.bms.mapper;
- import com.baomidou.mybatisplus.core.mapper.BaseMapper;
- import com.zy.bms.model.UserDeviceRelation;
- import com.zy.bms.common.vo.DeviceRelationVo;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.springframework.stereotype.Repository;
- import java.util.List;
- /**
- * 用户设备绑定关系表
- *
- * @author chenyi
- * Create on 2020/4/10
- */
- @Mapper
- @Repository
- public interface UserDeviceRelationMapper extends BaseMapper<UserDeviceRelation> {
- /**
- * 查询用户绑定的设备集合
- *
- * @param userId 用户ID
- */
- List<DeviceRelationVo> getListByUserId(@Param("userId") String userId);
- /**
- * 查询设备是否有绑定用户
- *
- * @param deviceNum 设备号
- */
- int checkDeviceIsBind(@Param("deviceNum") String deviceNum);
- /**
- * 查询设备是否属于某用户
- *
- * @param userId 用户ID
- * @param deviceNum 设备号
- */
- int checkDeviceIsBelongByNum(@Param("userId") String userId, @Param("deviceNum") String deviceNum);
- /**
- * 查询设备是否属于某用户
- *
- * @param userId 用户ID
- * @param deviceId 设备ID
- */
- int checkDeviceIsBelongByDeviceId(@Param("userId") String userId, @Param("deviceId") String deviceId);
- }
|