feat(shop): 优化商品与优惠券逻辑;修复礼品相关映射;补充接口测试

This commit is contained in:
irving
2025-11-01 23:55:41 -04:00
parent 0faa7f2988
commit 60b4b0bd49
5 changed files with 23 additions and 6 deletions

View File

@@ -210,6 +210,7 @@ class PlayCommodityInfoApiTest extends WxCustomOrderApiTestSupport {
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value(200));
ensureTenantContext();
PlayCommodityAndLevelInfoEntity pricing = commodityAndLevelInfoService.lambdaQuery()
.eq(PlayCommodityAndLevelInfoEntity::getCommodityId, child.getId())
.eq(PlayCommodityAndLevelInfoEntity::getLevelId, ApiTestDataSeeder.DEFAULT_CLERK_LEVEL_ID)
@@ -266,6 +267,7 @@ class PlayCommodityInfoApiTest extends WxCustomOrderApiTestSupport {
.andExpect(status().isOk())
.andExpect(jsonPath("$.code").value(200));
ensureTenantContext();
PlayCommodityInfoEntity updated = commodityInfoService.getById(child.getId());
assertThat(updated.getAutomaticSettlementDuration())
.isEqualTo(AutomaticSettlementPolicy.TEN_MINUTES.getSeconds());