|
|
|
@@ -345,12 +345,17 @@ public class WxCarCallBackController extends BaseController { |
|
|
|
/** |
|
|
|
* ETCP 主动支付结果通知 |
|
|
|
* { |
|
|
|
* "signment":"B8534D2E8FA2074C216CCEF087AA9954", |
|
|
|
* "payWayDesc":"微信", |
|
|
|
* "plateNumber": "渝 ATX061", |
|
|
|
* "orderId": "fd92f645-880e-4c2a-9d7d-7081a2488181", |
|
|
|
* "fee": 7.65, |
|
|
|
* "paidServiceFee": 0.07, |
|
|
|
* "coupon": 0, |
|
|
|
* "time": "2017-08-20 11:57:51" |
|
|
|
* "discountAmount":0, |
|
|
|
* "onceServiceFeePaid":0.0, |
|
|
|
* "couponCode":"" |
|
|
|
* } |
|
|
|
*/ |
|
|
|
@PostMapping(value = "/etcpPaidCallback") |
|
|
|
@@ -364,9 +369,20 @@ public class WxCarCallBackController extends BaseController { |
|
|
|
HashMap<String, String> map = new HashMap<String, String>(); |
|
|
|
map.put("synId", orderId); |
|
|
|
String tenantId = wxCarCmdLogService.getTenantIdBySynId(map); |
|
|
|
/// if not found syn_id, maybe use user_car to get tenantId |
|
|
|
if(StringUtils.isBlank(tenantId)) { |
|
|
|
WxCUserCar queryOne = new WxCUserCar(); |
|
|
|
queryOne.setCarNumber(carNumber); |
|
|
|
WxCUserCar userCar = wxCUserCarService.getOnlyOne(queryOne); |
|
|
|
if(userCar != null) { |
|
|
|
tenantId = userCar.getTenantId(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 检查是否有重复数据 |
|
|
|
map.put("tenantId", tenantId); |
|
|
|
if(StringUtils.isNotBlank(tenantId)) { |
|
|
|
map.put("tenantId", tenantId); |
|
|
|
} |
|
|
|
map.put("orderId", orderId); |
|
|
|
map.put("feeTime", etcpTime); |
|
|
|
WxCarCmdLog carCmdLog = wxCarCmdLogService.getByOrderId(map); |
|
|
|
@@ -393,44 +409,19 @@ public class WxCarCallBackController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
String paidServiceFee = paramMap.get(ETCPUtil.ETCP_PAID_SERVICE_FEE); |
|
|
|
String synId = paramMap.get(ETCPUtil.ETCP_SYN_ID); |
|
|
|
String exitTime = paramMap.get(ETCPUtil.ETCP_EXIT_TIME); |
|
|
|
String stayedTime = paramMap.get(ETCPUtil.ETCP_STAYED_TIME); |
|
|
|
String parkId = paramMap.get(ETCPUtil.ETCP_PARK_ID); |
|
|
|
String parkName = paramMap.get(ETCPUtil.ETCP_PARK_NAME); |
|
|
|
String userType = paramMap.get(ETCPUtil.ETCP_USER_TYPE); |
|
|
|
String entranceTime = paramMap.get(ETCPUtil.ETCP_ENTRANCE_TIME); |
|
|
|
String fixParkingId = paramMap.get(ETCPUtil.ETCP_FIX_PARKING_ID); |
|
|
|
String remainingDays = paramMap.get(ETCPUtil.ETCP_REMAINING_DAYS); |
|
|
|
String fee = paramMap.get(ETCPUtil.ETCP_FEE); |
|
|
|
|
|
|
|
try { |
|
|
|
// 保存WxCarPayRecord |
|
|
|
WxCarPayRecord record = new WxCarPayRecord(); |
|
|
|
record.setSynId(orderId); |
|
|
|
record.setPaidServiceFee(paidServiceFee); |
|
|
|
record.setFee(fee); |
|
|
|
if(StringUtils.isNotBlank(etcpTime)) { |
|
|
|
record.setFeeTime(dateFormat.parse(etcpTime)); |
|
|
|
} |
|
|
|
record.setFee(fee); |
|
|
|
if(StringUtils.isNotBlank(exitTime)) { |
|
|
|
record.setExitTime(dateFormat.parse(exitTime)); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(stayedTime)) { |
|
|
|
record.setStayedTime(Long.parseLong(stayedTime)); |
|
|
|
} |
|
|
|
record.setPaidServiceFee(paidServiceFee); |
|
|
|
record.setVendorType(wxCarCmdLog.getVendorType()); |
|
|
|
record.setSynId(synId); |
|
|
|
record.setParkId(parkId); |
|
|
|
record.setParkName(parkName); |
|
|
|
record.setUserType(userType); |
|
|
|
record.setPlateNumber(carNumber); |
|
|
|
if(StringUtils.isNotBlank(entranceTime)) { |
|
|
|
record.setEntranceTime(dateFormat.parse(entranceTime)); |
|
|
|
} |
|
|
|
record.setFixParkingId(fixParkingId); |
|
|
|
record.setRemainingDays(remainingDays); |
|
|
|
//record.setPhone(phoneStrs); |
|
|
|
record.setTenantId(tenantId); |
|
|
|
|
|
|
|
WxCarPayRecord query = new WxCarPayRecord(); |
|
|
|
|