记得上下班打卡 | git大法好,push需谨慎

Commit 2e414e30 authored by 胡佳晨's avatar 胡佳晨

退款 撤回

parent 20bfee85
......@@ -510,7 +510,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
kylinOrderTicketEntitiesVo.setIsPayment(newIsPayment);
kylinOrderTicketEntitiesVo.setUpdatedAt(strTime);
kylinOrderTicketEntitiesVo.setChangeDate(time);
kylinOrderTicketEntitiesVo.setRefundPrice(entitiesVo.getRefundPrice());
for (KylinOrderRefundEntitiesVo item2:orderRefundsVo.getOrderRefundEntitiesVoList()){
if(item2.getOrderTicketEntitiesId().equalsIgnoreCase(item.getOrderTicketEntitiesId())){
kylinOrderTicketEntitiesVo.setRefundPrice(entitiesVo.getRefundPrice().subtract(item2.getRefundPrice()));
}
}
log.info("entitiesVo.getRefundPrice() = "+entitiesVo.getRefundPrice());
BasicDBObject entitiesObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(kylinOrderTicketEntitiesVo)));
mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateOne(
......
......@@ -233,9 +233,18 @@ public class KylinRefundsStatusServiceImpl {
entitiesTable.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2);
entitiesTable.setUpdatedAt(time);
BigDecimal oldRefundPrice = BigDecimal.valueOf(0);
for (KylinOrderTicketEntitiesVo item :orderInfo.getEntitiesVoList()) {
if(item.getOrderTicketEntitiesId().equalsIgnoreCase(orderEntitiesId)){
oldRefundPrice = item.getRefundPrice();
break;
}
}
KylinOrderTicketEntitiesVo kylinOrderTicketEntitiesVo = KylinOrderTicketEntitiesVo.getNew();
kylinOrderTicketEntitiesVo.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2);
kylinOrderTicketEntitiesVo.setRefundPrice(oldRefundPrice.add(BigDecimal.valueOf(refundPrice)));
kylinOrderTicketEntitiesVo.setUpdatedAt(strTime);
BasicDBObject entitiesObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(kylinOrderTicketEntitiesVo)));
mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateOne(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment