|
|
|
@@ -50,7 +50,7 @@ public class WxCarCallBackController extends BaseController { |
|
|
|
@Autowired |
|
|
|
WxCouponSendService wxCouponSendService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
WxCarPayRecordService wxCarPayRecordService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
@@ -129,6 +129,7 @@ public class WxCarCallBackController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
// 保存WxCarPayRecord |
|
|
|
WxCarPayRecord record = new WxCarPayRecord(); |
|
|
|
record.setVendorType(wxCarCmdLog.getVendorType()); |
|
|
|
Map<String,String> jsonMap = (Map)JSON.parseObject(wxCarCmdLog.getCmdJson()); |
|
|
|
@@ -143,8 +144,10 @@ public class WxCarCallBackController extends BaseController { |
|
|
|
record.setFixParkingId(jsonMap.get("fixParkingId")); |
|
|
|
record.setRemainingDays(jsonMap.get("remainingDays")); |
|
|
|
record.setPhone(phoneStrs); |
|
|
|
record.setTenantId(park.getTenantId()); |
|
|
|
wxCarPayRecordService.saveOrUpdate(record); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
logger.error("WxCarPayRecord: 入库错误 " + paramMap.toString()); |
|
|
|
return new Result(ErrorCode.DB_FAIL.getCode(), "入库错误" + paramMap.toString()); |
|
|
|
} |
|
|
|
@@ -201,6 +204,23 @@ public class WxCarCallBackController extends BaseController { |
|
|
|
return new Result(ErrorCode.DB_FAIL.getCode(), "入库错误" + paramMap.toString()); |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
// 保存WxCarPayRecord |
|
|
|
WxCarPayRecord record = new WxCarPayRecord(); |
|
|
|
record.setSynId(paramMap.get("synId")); |
|
|
|
if(StringUtils.isNotBlank(paramMap.get("exitTime"))) { |
|
|
|
record.setExitTime(new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(paramMap.get("exitTime"))); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(paramMap.get("stayedTime"))) { |
|
|
|
record.setStayedTime(Long.parseLong(paramMap.get("stayedTime"))); |
|
|
|
} |
|
|
|
wxCarPayRecordService.updateBySynId(record); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
logger.error("WxCarPayRecord: 出场更新错误 " + paramMap.toString()); |
|
|
|
return new Result(ErrorCode.DB_FAIL.getCode(), "入库错误" + paramMap.toString()); |
|
|
|
} |
|
|
|
|
|
|
|
// TODO 如果此车关联了停车优免券,自动把优免券设为已使用 |
|
|
|
|
|
|
|
return new Result(EnumETCPCode.SUCCESS.getCode(), EnumETCPCode.SUCCESS.getMessage()); |
|
|
|
@@ -286,6 +306,22 @@ public class WxCarCallBackController extends BaseController { |
|
|
|
return new Result(ErrorCode.DB_FAIL.getCode(), "入库错误" + paramMap.toString()); |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
// 保存WxCarPayRecord |
|
|
|
WxCarPayRecord record = new WxCarPayRecord(); |
|
|
|
record.setSynId(paramMap.get("orderId")); |
|
|
|
record.setPaidServiceFee(paramMap.get("paidServiceFee")); |
|
|
|
if(StringUtils.isNotBlank(paramMap.get("time"))) { |
|
|
|
record.setFeeTime(new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(paramMap.get("time"))); |
|
|
|
} |
|
|
|
record.setFee(paramMap.get("fee")); |
|
|
|
wxCarPayRecordService.updateBySynId(record); |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
logger.error("WxCarPayRecord: 缴费更新错误 " + paramMap.toString()); |
|
|
|
return new Result(ErrorCode.DB_FAIL.getCode(), "入库错误" + paramMap.toString()); |
|
|
|
} |
|
|
|
|
|
|
|
// 营销 - 短信 |
|
|
|
return new Result(EnumETCPCode.SUCCESS.getCode(), EnumETCPCode.SUCCESS.getMessage()); |
|
|
|
} |
|
|
|
|