Browse Source

[fix]
1.测试bug处理

limeng 2 months ago
parent
commit
0be0d0efeb

+ 1 - 1
application-webadmin/src/main/java/com/tourism/webadmin/back/dao/TourOrderMapper.java

@@ -35,6 +35,6 @@ public interface TourOrderMapper extends BaseDaoMapper<TourOrder> {
 
     @Select("select tu.show_name,tu.head_image_url,to1.create_time, to1.adult_number + to1.children_number as people_number from tour_user tu " +
             "inner join tour_order to1 on tu.user_id = to1.create_user_id " +
-            "where to1.group_purchase_progress_id = #{projectId} and to1.type = 1")
+            "where to1.group_purchase_progress_id = #{projectId} and to1.type = 1 and to1.order_status != 3")
     List<TourUser> getTourUserList(@Param("projectId") Long projectId);
 }

+ 2 - 2
application-webadmin/src/main/java/com/tourism/webadmin/back/service/impl/TourProjectGroupPurchaseServiceImpl.java

@@ -215,12 +215,12 @@ public class TourProjectGroupPurchaseServiceImpl extends BaseService<TourProject
         tourOrder.setType(1);
         // 计算订单价格
         BigDecimal adultTotalPrice = groupPurchase.getNowPrice().multiply(BigDecimal.valueOf(tourOrder.getAdultNumber() == null? 0 : tourOrder.getAdultNumber()));
-        BigDecimal childTotalPrice = groupPurchase.getChildrenPrice().multiply(BigDecimal.valueOf(tourOrder.getChildrenNumber() == null ? 0 : tourOrder.getChildrenNumber()));
+        BigDecimal childTotalPrice = groupPurchase.getNowChildPrice().multiply(BigDecimal.valueOf(tourOrder.getChildrenNumber() == null ? 0 : tourOrder.getChildrenNumber()));
 
         tourOrder.setTotalAmount(adultTotalPrice.add(childTotalPrice));
         tourOrder.setCurrency(groupPurchase.getPriceUnit());
         tourOrder.setAdultPrice(groupPurchase.getNowPrice());
-        tourOrder.setChildrenPrice(groupPurchase.getChildrenPrice());
+        tourOrder.setChildrenPrice(groupPurchase.getNowChildPrice());
         tourOrder.setGroupPurchaseProgressId(groupPurchase.getId());
         return groupPurchase;
     }