|
@@ -224,6 +224,11 @@ public class WxService {
|
|
|
String attachStr = tbOrder.getAttach();
|
|
|
String transactionId = notifyBO.getTransactionId();
|
|
|
Date now = new Date();
|
|
|
+ String timeEnd=notifyBO.getTimeEnd();
|
|
|
+ Date payTime=now;
|
|
|
+ if (StrUtil.isNotEmpty(timeEnd)){
|
|
|
+ payTime=DateUtil.parse(timeEnd,"yyyyMMddHHmmss");
|
|
|
+ }
|
|
|
if (StrUtil.isNotEmpty(attachStr)) {
|
|
|
Attach attach = JSONUtil.toBean(attachStr, Attach.class);
|
|
|
List<PriceBO> cars = JSONUtil.toList(attach.getC(), PriceBO.class);
|
|
@@ -235,7 +240,7 @@ public class WxService {
|
|
|
log.error("付款金额不正确:{}", JSONUtil.toJsonStr(notifyBO));
|
|
|
continue;
|
|
|
}
|
|
|
- car.setPay(1).setMoney(car.getMoney().add(price)).setPayTime(now).setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType());
|
|
|
+ car.setPay(1).setMoney(car.getMoney().add(price)).setPayTime(payTime).setPayType(TbBusinessCar.PayTypeEnum.HAS_PAY_TYPE.getType());
|
|
|
tbBusinessCarService.updateById(car);
|
|
|
TbBusiness business = tbBusinessService.getById(car.getBusinessId());
|
|
|
if (business != null) {
|
|
@@ -246,12 +251,13 @@ public class WxService {
|
|
|
}
|
|
|
tbFeeDetailsService.chargeParkFee(cars, transactionId, outTradeNo);//添加cars的收费明细
|
|
|
String businessId = attach.getB();
|
|
|
+ Date finalPayTime = payTime;
|
|
|
if (StrUtil.isNotEmpty(businessId)) {
|
|
|
List<String> businessIds = StrUtil.splitTrim(businessId, ",");
|
|
|
List<TbBusinessItem> items = tbBusinessItemService.findByBusinessIdList(businessIds);
|
|
|
List<TbBusiness> businessList = tbBusinessService.listByIds(businessIds);
|
|
|
for (TbBusiness tbBusiness : businessList) {
|
|
|
- tbBusiness.setPayTime(now).setPayType(3).setConfirmInput(1).setConfirmInputTime(now)
|
|
|
+ tbBusiness.setPayTime(payTime).setPayType(3).setConfirmInput(1).setConfirmInputTime(payTime)
|
|
|
.setPayMoney(tbBusiness.getPayMoney().add(tbBusiness.getItemPrice()))
|
|
|
.setPayNo(transactionId);
|
|
|
tbBusiness.setPayStatus(tbBusiness.getPayMoney().equals(tbBusiness.getItemPrice()) ? 3 : 4);
|
|
@@ -263,13 +269,13 @@ public class WxService {
|
|
|
//
|
|
|
if (TbItem.ItemTypeEnum.EMPTY_TYPE.getType().equals(carType) && tbGoods.getChinaCarPay() == 0
|
|
|
|| TbItem.ItemTypeEnum.WEIGHT_TYPE.getType().equals(carType) && tbGoods.getVietnamCarPay() == 0) {
|
|
|
- tbBusinessCar.setPay(1).setPayTime(now);
|
|
|
+ tbBusinessCar.setPay(1).setPayTime(finalPayTime);
|
|
|
tbBusinessCarService.updateById(tbBusinessCar);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
tbFeeStatisticsService.countBusinessFee(items, transactionId, outTradeNo);//业务费统计
|
|
|
- items.forEach(tbBusinessItem -> tbBusinessItem.setPayStatus(1).setPayTime(now));
|
|
|
+ items.forEach(tbBusinessItem -> tbBusinessItem.setPayStatus(1).setPayTime(finalPayTime));
|
|
|
tbBusinessItemService.updateBatchById(items);
|
|
|
}
|
|
|
String a = attach.getA();
|