Sfoglia il codice sorgente

20240712 邀请会员

lwhhszx 1 anno fa
parent
commit
4805c29162

+ 3 - 0
src/main/java/com/example/xiaoshiweixinback/factorys/goodFactory/GoodTicketService.java

@@ -34,6 +34,9 @@ public class GoodTicketService implements GoodImp {
     @Override
     public Double computePrice(List<GoodVO> goodVOs) {
         Double totalPrice = 0d;
+        if(goodVOs==null||goodVOs.size()==0){
+            return totalPrice;
+        }
         List<String> idStrs = goodVOs.stream().map(GoodVO::getId).distinct().collect(Collectors.toList());
         List<Integer> ids =FormatUtil.StringTOIntegerList(idStrs);
         LambdaQueryWrapper<Ticket> queryWrapper = new LambdaQueryWrapper<>();

+ 3 - 0
src/main/java/com/example/xiaoshiweixinback/factorys/goodFactory/GoodVipService.java

@@ -33,6 +33,9 @@ public class GoodVipService implements GoodImp {
     @Override
     public Double computePrice(List<GoodVO> goodVOs) {
         Double totalPrice = 0d;
+        if(goodVOs==null||goodVOs.size()==0){
+            return totalPrice;
+        }
         BigDecimal totalPriceBig = new BigDecimal(totalPrice);
         String idStr = goodVOs.get(0).getId();
         Vip vip = vipService.getVipByUuId(idStr);

+ 3 - 0
src/main/java/com/example/xiaoshiweixinback/factorys/goodFactory/GoodVoucherService.java

@@ -53,6 +53,9 @@ public class GoodVoucherService implements GoodImp {
     @Override
     public Double computePrice(List<GoodVO> goodVOs) {
         Double totalPrice = 0d;
+        if(goodVOs==null||goodVOs.size()==0){
+            return totalPrice;
+        }
         BigDecimal totalPriceBig = new BigDecimal(totalPrice.toString());
 
         List<String> idStrs = goodVOs.stream().map(GoodVO::getId).distinct().collect(Collectors.toList());

+ 2 - 1
src/main/java/com/example/xiaoshiweixinback/service/OrderService.java

@@ -209,9 +209,10 @@ public class OrderService extends ServiceImpl<OrderMapper, Order> {
     }
 
     public OrderDetailVO getOrderDetail(WeiXinPayDTO weiXinPayDTO) {
+        OrderDetailVO orderDetailVO = new OrderDetailVO();
+        orderDetailVO.setPersonVoucherIds(weiXinPayDTO.getPersonVoucherIds());
         Integer type = weiXinPayDTO.getGoodType();
         Integer activityId = weiXinPayDTO.getActivityId();
-        OrderDetailVO orderDetailVO = new OrderDetailVO();
         List<GoodVO> goodVOS = weiXinPayDTO.getGoods();
         List<Activity> activities = activityService.getActivities(activityId, type, 0);
         PersonnelVO personnelVO = cacheUtil.getLoginUser(LoginUtils.getToken());