mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
深圳停车平台
This commit is contained in:
@@ -9,7 +9,9 @@ public interface QcyunsService {
|
||||
|
||||
/**
|
||||
* 发放停车券
|
||||
* @return
|
||||
* dto中只需要传入车牌号, 其他参数取配置文件中的参数
|
||||
* 现在只有一家车场, parkId在配置文件中, 以后多家车场改为数据库配置
|
||||
* @return true: 发放成功, false: 失败
|
||||
*/
|
||||
String issuanceOfParkingTickets(QcyunParkCouponDTO dto);
|
||||
boolean issuanceOfParkingTickets(QcyunParkCouponDTO dto);
|
||||
}
|
||||
|
||||
@@ -138,9 +138,7 @@ public class LTYTServiceImpl implements LTYTService {
|
||||
carCouponRecord.setReturnMsg(msg);
|
||||
carCouponRecord.setPlateNumber(dto.getPlateNumber());
|
||||
carCouponRecord.setStationId(Long.parseLong(orderBasicInfo.getStationId()));
|
||||
|
||||
carCouponRecordService.insertCarCouponRecord(carCouponRecord);
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,24 +45,23 @@ public class QcyunsServiceImpl implements QcyunsService {
|
||||
* 现在只有一家车场, parkId在配置文件中, 以后多家车场改为数据库配置
|
||||
*/
|
||||
@Override
|
||||
public String issuanceOfParkingTickets(QcyunParkCouponDTO dto) {
|
||||
public boolean issuanceOfParkingTickets(QcyunParkCouponDTO dto) {
|
||||
dto.setParkId(parkId);
|
||||
// 1. 查询车辆信息
|
||||
String carInfo = getCarInfo(dto);
|
||||
if (StringUtils.isBlank(carInfo)) {
|
||||
return null;
|
||||
return false;
|
||||
}
|
||||
// carInfo转为json, 提取carInfo
|
||||
JSONObject jsonObject = JSON.parseObject(carInfo);
|
||||
TempCarInfo tempCarInfo = JSON.parseObject(jsonObject.getString("carInfo"), TempCarInfo.class);
|
||||
if (tempCarInfo == null) {
|
||||
return null;
|
||||
return false;
|
||||
}
|
||||
dto.setParkingSerial(String.valueOf(tempCarInfo.getRecordId()));
|
||||
// 2. 创建停车券
|
||||
boolean discountCoupon = createDiscountCoupon(dto);
|
||||
|
||||
return null;
|
||||
return discountCoupon;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user