连接数据
parent
ce57ddfe16
commit
4c08e5a40b
|
@ -21,7 +21,7 @@ public class VehicleConnectionReq {
|
||||||
* 车辆Vin
|
* 车辆Vin
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "vehicleVin")
|
@JSONField(name = "vehicleVin")
|
||||||
private String vin;
|
private String vehicleVin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 时间戳
|
* 时间戳
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class VehiclelaunchServiceimpl implements VehiclelaunchService {
|
||||||
@Override
|
@Override
|
||||||
public String vehicleConnection(VehicleConnectionReq vehicleConnectionReq) {
|
public String vehicleConnection(VehicleConnectionReq vehicleConnectionReq) {
|
||||||
// 先去查询车辆的vin 在不在 ,如果不在就连接不上
|
// 先去查询车辆的vin 在不在 ,如果不在就连接不上
|
||||||
if (StringUtils.isEmpty(vehicleConnectionReq.getVin())){
|
if (StringUtils.isEmpty(vehicleConnectionReq.getVehicleVin())){
|
||||||
return "vin为空";
|
return "vin为空";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public class VehiclelaunchServiceimpl implements VehiclelaunchService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String fate = "fate" + vehicleConnectionReq.getVin().substring(3,7) + vehicleConnectionReq.getNonce();
|
String fate = "fate" + vehicleConnectionReq.getVehicleVin().substring(3,7) + vehicleConnectionReq.getNonce();
|
||||||
|
|
||||||
return fate;
|
return fate;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<mapper namespace="com.shiyi.launch.mapper.VehicleaunchMapper">
|
<mapper namespace="com.shiyi.launch.mapper.VehicleaunchMapper">
|
||||||
<insert id="into">
|
<insert id="into">
|
||||||
insert into t_car(car_vin,car_address,car_license,car_name) values
|
insert into t_car(car_vin,car_address,car_license,car_name) values
|
||||||
(#{vin},#{timestamp},#{nonce},#{userName})
|
(#{vehicleVin},#{timestamp},#{nonce},#{userName})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue