Explorar el Código

Merge remote-tracking branch 'origin/dev_v1.3.4_20220902' into dev_v1.3.4_20220902

# Conflicts:
#	cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CouponIssueServiceImp.java
Eric hace 3 años
padre
commit
975b5c512a

+ 4 - 2
cooleshow-mall/mall-portal/src/main/java/com/yonge/cooleshow/portal/service/impl/OmsPortalOrderServiceImpl.java

@@ -203,6 +203,9 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
             if(data != null) {
                 couponAmount = data.getDiscountedPrices();
             }
+            if (couponAmount.compareTo(orderParam.getOrderAmount()) > 0) {
+                couponAmount = orderParam.getOrderAmount();
+            }
             handleCouponAmount(orderItemList, couponAmount);
         }
         //判断是否使用积分
@@ -259,8 +262,7 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
             order.setIntegration(orderParam.getUseIntegration());
             order.setIntegrationAmount(calcIntegrationAmount(orderItemList));
         }
-        BigDecimal payAmount = calcPayAmount(order);
-        LOG.info("payAmount:{},totalAmount:{},couponAmount:{}",payAmount,order.getTotalAmount(),couponAmount);
+        LOG.info("payAmount:{},totalAmount:{},couponAmount:{}",order.getTotalAmount().subtract(couponAmount),order.getTotalAmount(),couponAmount);
         if (orderParam.getOrderAmount().compareTo(order.getTotalAmount().subtract(couponAmount)) != 0) {
             throw new BizException("订单金额校验不通过");
         }

+ 1 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CouponInfoServiceImp.java

@@ -329,6 +329,7 @@ public class CouponInfoServiceImp extends ServiceImpl<CouponInfoMapper, CouponIn
                         .useState(CouponUseStateEnum.USABLE)
                         .useTime(0L)
                         .orderNo("")
+                        .useType(null)
                         .build());
             }
         } else {

+ 1 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CouponIssueServiceImp.java

@@ -28,7 +28,6 @@ import com.yonge.cooleshow.common.enums.EStatus;
 import com.yonge.toolset.base.exception.BizException;
 import com.yonge.toolset.thirdparty.message.MessageSenderPluginContext;
 import org.apache.commons.collections.CollectionUtils;
-import org.apache.commons.lang3.StringUtils;
 import org.joda.time.DateTime;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -79,8 +78,7 @@ public class CouponIssueServiceImp extends ServiceImpl<CouponIssueMapper, Coupon
         // 优惠券过期状态
         couponIssueWrappers = couponIssueWrappers.stream()
                 .peek(couponIssueWrapper -> {
-                    if (StringUtils.isEmpty(couponIssueWrapper.getOrderNo())
-                            && couponIssueWrapper.getEndTime().compareTo(query.getExpiredTime()) < 0) {
+                    if (couponIssueWrapper.getEndTime().compareTo(query.getExpiredTime()) <0) {
                         couponIssueWrapper.setUseState(CouponUseStateEnum.EXPIRED);
                     }
                 }).collect(Collectors.toList());

+ 1 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/VideoLessonPurchaseRecordServiceImpl.java

@@ -102,6 +102,7 @@ public class VideoLessonPurchaseRecordServiceImpl extends ServiceImpl<VideoLesso
         purchaseRecord.setOrderStatus(OrderStatusEnum.WAIT_PAY.getCode());
         purchaseRecord.setOriginalPrice(lessonGroup.getLessonPrice());//原价
         purchaseRecord.setExpectPrice(lessonGroup.getLessonPrice());//预计价格
+        purchaseRecord.setPayMoney(orderReqInfo.getActualPrice());
         videoLessonPurchaseRecordDao.insert(purchaseRecord);
 
         OrderCreateRes orderCreateRes = new OrderCreateRes();