Quellcode durchsuchen

Merge branch 'dev' into 'mp-server-test'

优化

See merge request quanshu/mp-server!872
jiang hao vor 2 Jahren
Ursprung
Commit
6cf514604e

+ 8 - 0
mp-service/src/main/java/com/qs/mp/admin/service/impl/TicketBoxServiceImpl.java

@@ -134,6 +134,10 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
 
     // 关联商品
     if (CollectionUtils.isNotEmpty(param.getGoodsList())) {
+      // 设置boxId
+      for (TicketBoxGoods ticketBoxGoods : param.getGoodsList()) {
+        ticketBoxGoods.setBoxId(ticketBox.getBoxId());
+      }
       ticketBoxGoodsService.saveBatch(param.getGoodsList());
     }
 
@@ -338,6 +342,10 @@ public class TicketBoxServiceImpl extends ServiceImpl<TicketBoxMapper, TicketBox
 
     // 关联商品
     if (CollectionUtils.isNotEmpty(param.getGoodsList())) {
+      // 设置boxId
+      for (TicketBoxGoods ticketBoxGoods : param.getGoodsList()) {
+        ticketBoxGoods.setBoxId(ticketBox.getBoxId());
+      }
       ticketBoxGoodsService.saveBatch(param.getGoodsList());
     }