深圳停车平台

This commit is contained in:
Guoqs
2025-02-14 15:40:37 +08:00
parent 8f6642df11
commit e18cd482fa
2 changed files with 8 additions and 10 deletions

View File

@@ -36,7 +36,7 @@ public class QcyunsServiceImpl implements QcyunsService {
@Value("${parking.qcyuns.parkId}")
private String parkId;
@Value("${parking.qcyuns.parkId}")
@Value("${parking.qcyuns.orgId}")
private String orgId;
/**
@@ -61,6 +61,8 @@ public class QcyunsServiceImpl implements QcyunsService {
dto.setParkingSerial(String.valueOf(tempCarInfo.getRecordId()));
// 2. 创建停车券
boolean discountCoupon = createDiscountCoupon(dto);
// 3. 查询优惠抵扣金额
// queryCarInfoDiscountDestory(dto);
return discountCoupon;
}
@@ -87,7 +89,7 @@ public class QcyunsServiceImpl implements QcyunsService {
// 发送请求
String result = HttpUtil.post(URL, JSON.toJSONString(param));
DataResponse dataResponse = JSONUtil.toBean(result, DataResponse.class);
log.info("获取车辆信息接口成功, response:{}", JSON.toJSONString(dataResponse));
log.info("获取车辆信息接口成功, param:{}, response:{}", JSON.toJSONString(param), JSON.toJSONString(dataResponse));
if (dataResponse.getRetCode() == 0) {
return dataResponse.getRetData().toString();
}
@@ -120,8 +122,8 @@ public class QcyunsServiceImpl implements QcyunsService {
// 发送请求
String result = HttpUtil.post(URL, JSON.toJSONString(param));
DataResponse dataResponse = JSONUtil.toBean(result, DataResponse.class);
log.info("创建优惠券成功, response:{}", JSON.toJSONString(dataResponse));
queryCarInfoDiscountDestory(dto);
log.info("创建优惠券成功, param:{}, response:{}", JSON.toJSONString(param), JSON.toJSONString(dataResponse));
if (dataResponse.getRetCode() == 0 && StringUtils.equals("减免成功", dataResponse.getRetData().toString())) {
return true;
}
@@ -146,14 +148,14 @@ public class QcyunsServiceImpl implements QcyunsService {
param.setService(ServiceApiCmd.CarInfoDiscountDestory);
param.setVersion("01");
param.setMsgId(UUID.randomUUID().toString());
param.setOrgId(dto.getOrgId());
param.setOrgId(orgId);
param.setData(data);
// 生成sign
ParkingUtil.generateAndSetSign(param, secretKey);
// 发送请求
String result = HttpUtil.post(URL, JSON.toJSONString(param));
DataResponse dataResponse = JSONUtil.toBean(result, DataResponse.class);
log.info("查询优惠抵扣金额, response:{}", JSON.toJSONString(dataResponse));
log.info("查询优惠抵扣金额, param:{}, response:{}", JSON.toJSONString(param), JSON.toJSONString(dataResponse));
}
}