提交代码

master
胡锐 6 months ago
parent 16fd4bd238
commit 2ff1bbfeae
  1. 2
      order/src/main/resources/prod/logback.xml
  2. 6
      service/src/main/java/com/hfkj/service/order/OrderCreateService.java
  3. 4
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java

@ -183,7 +183,7 @@
<!-- 中油优途中石油卡券 --> <!-- 中油优途中石油卡券 -->
<appender name="PcytCNPCCouponLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <appender name="PcytCNPCCouponLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/petroLog.log</File> <File>log/PcytCNPCCouponLog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/PcytCNPC/PcytCNPCCouponLog.log.%d.%i</fileNamePattern> <fileNamePattern>log/PcytCNPC/PcytCNPCCouponLog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">

@ -78,6 +78,10 @@ public class OrderCreateService {
if (goodsSpecs == null) { if (goodsSpecs == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商品规格"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商品规格");
} }
JSONObject businessObj = orderChild.getBusiness()==null? new JSONObject(): new JSONObject((Map<String, Object>) orderChild.getBusiness());
if (businessObj.getLong("shopCartId") != null) {
shoppingCartService.delete(businessObj.getLong("shopCartId"));
}
orderChild.setMerId(goodsMsg.getMerId()); orderChild.setMerId(goodsMsg.getMerId());
orderChild.setProductName(goodsMsg.getTitle()); orderChild.setProductName(goodsMsg.getTitle());
orderChild.setProductImg(goodsMsg.getListImg()); orderChild.setProductImg(goodsMsg.getListImg());
@ -112,7 +116,7 @@ public class OrderCreateService {
orderCoupon.setStatus(OrderChildStatusEnum.status1.getCode()); orderCoupon.setStatus(OrderChildStatusEnum.status1.getCode());
orderCouponService.editData(orderCoupon); orderCouponService.editData(orderCoupon);
for (int i = 0; i <= orderCoupon.getGoodsCount(); i++) { for (int i = 0; i < orderCoupon.getGoodsCount(); i++) {
// 卡券订单卡密 // 卡券订单卡密
BsOrderCouponNo orderCouponNo = new BsOrderCouponNo(); BsOrderCouponNo orderCouponNo = new BsOrderCouponNo();
orderCouponNo.setCouponOrderId(orderCoupon.getId()); orderCouponNo.setCouponOrderId(orderCoupon.getId());

@ -217,12 +217,12 @@ public class BsOrderServiceImpl implements BsOrderService {
childOrder.setSurplusRefundIntegral(0L); childOrder.setSurplusRefundIntegral(0L);
} }
childOrder.setCouponDiscountPrice(childOrder.getProductPrice().subtract(childOrder.getSurplusRefundPrice())); childOrder.setCouponDiscountPrice(childOrder.getProductTotalPrice().subtract(childOrder.getSurplusRefundPrice()));
childOrder.setIntegralDiscountPrice(childOrder.getSurplusRefundIntegral()); childOrder.setIntegralDiscountPrice(childOrder.getSurplusRefundIntegral());
childOrder.setTotalDeductionPrice( childOrder.setTotalDeductionPrice(
childOrder.getCouponDiscountPrice().add(new BigDecimal(childOrder.getIntegralDiscountPrice().toString()).multiply(new BigDecimal("100"))) childOrder.getCouponDiscountPrice().add(new BigDecimal(childOrder.getIntegralDiscountPrice().toString()).multiply(new BigDecimal("100")))
); );
childOrder.setProductActualPrice(childOrder.getProductPrice().subtract(childOrder.getTotalDeductionPrice())); childOrder.setProductActualPrice(childOrder.getProductTotalPrice().subtract(childOrder.getTotalDeductionPrice()));
orderChildService.editData(childOrder); orderChildService.editData(childOrder);
} }

Loading…
Cancel
Save