VehicleDeviceMapper.java
1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package cn.com.glsx.admin.modules.mapper;
import cn.com.glsx.admin.modules.entity.VehicleDevice;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 项目名:ne-shield-trialdrive-admin
* 包名: cn.com.glsx.admin.modules.mapper
* 作者: Yanglinlong
* 日期: 2021/5/21 17:57
*/
@Mapper
public interface VehicleDeviceMapper extends CommonBaseMapper<VehicleDevice> {
@Select("select * from t_vehicle_device where sn = #{sn} and bind_status = 1 and del_flag = 0 limit 1")
@ResultMap(value = "BaseResultMap")
VehicleDevice selectBindDeviceBySn(@Param("sn") String sn);
/**
* 查询车辆设备绑定
*
* @param sn
* @param bindStatus
* @return
*/
@Deprecated
List<VehicleDevice> selectBySnAndBindStatus(@Param("sn") String sn, @Param("bindStatus") Integer bindStatus);
/**
* 根据车辆id查询设备绑定关系
*
* @param vehicleId
* @return
*/
List<VehicleDevice> selectBindDeviceByVehicleId(@Param("vehicleId") Long vehicleId);
/**
* 获取某个用户下所有车辆设备
*
* @param userId
* @return
*/
List<VehicleDevice> selectVehicleDeviceByUserId(@Param("userId") Long userId);
/**
* 根据设备号解绑和车辆的关系
*
* @param sn
*/
void unBindBySn(@Param("sn") String sn);
}