chore: seed demo group buy delivery order

This commit is contained in:
王鹏
2026-07-07 17:51:26 +08:00
parent 4658b35aaf
commit c4b32da54d
3 changed files with 32 additions and 4 deletions

View File

@@ -2,6 +2,8 @@ package com.linhelp.dev;
import com.linhelp.delivery.DeliveryUserService;
import com.linhelp.delivery.DeliveryAssignmentService;
import com.linhelp.common.enums.GroupBuyOrderStatus;
import com.linhelp.groupbuy.GroupBuyOrderService;
import com.linhelp.groupbuy.GroupBuyService;
import com.linhelp.notice.BannerService;
import com.linhelp.notice.NoticeService;
@@ -23,6 +25,8 @@ class DevDataInitializerTests {
@Autowired
private GroupBuyService groupBuyService;
@Autowired
private GroupBuyOrderService groupBuyOrderService;
@Autowired
private NoticeService noticeService;
@Autowired
private BannerService bannerService;
@@ -38,6 +42,9 @@ class DevDataInitializerTests {
assertThat(productService.listCategories(1L, true)).hasSize(6);
assertThat(productService.listMini(1L, null)).hasSizeGreaterThanOrEqualTo(10);
assertThat(groupBuyService.listMini(1L)).hasSize(1);
assertThat(groupBuyOrderService.listByGroupBuy(groupBuyService.listMini(1L).get(0).getId()))
.extracting("status")
.containsExactly(GroupBuyOrderStatus.PENDING_DELIVERY);
assertThat(noticeService.listPublished(1L)).hasSize(2);
assertThat(bannerService.listEnabled(1L)).hasSize(1);
assertThat(secondGoodsService.listPublic(1L, null)).hasSize(1);