SQL动态语句 where和if标签的使用

1.resultType返回的是封装的实体类。返回的字段必须跟实体类的字段相同,不然有的数据会报空。

  
    
    

2.实体类封装


public class CarGpsAlarmAndCar {
    private Integer id;
    private String deviceNumber;
    private Date gpsTime;
    private Double latitude;
    private Double longitude;
    private Integer speed;
    private String status;
    private Double mileage;
    private String direction;
    private String deviceStatus;
    private Integer isRead;
    private String alarmType;
    
    private Integer Carid;
    private String carNumber;
    private String driver;
    private String phone;
    private String color;
    private String gpsDeviceNumber;

你可能感兴趣的:(SQL动态语句 where和if标签的使用)