Merge remote-tracking branch 'origin/feature/pg' into test

# Conflicts:
#	framework/src/main/java/cn/lili/modules/order/order/serviceimpl/TradeServiceImpl.java
This commit is contained in:
Chopper
2022-01-11 17:39:46 +08:00
20 changed files with 223 additions and 98 deletions

View File

@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
/**
* 管理端,优惠券接口
@@ -91,7 +92,8 @@ public class CouponManagerController {
@ApiOperation(value = "会员优惠券作废")
@PutMapping(value = "/member/cancellation/{id}")
public ResultMessage<Object> cancellation(@PathVariable String id) {
memberCouponService.cancellation(id);
AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser());
memberCouponService.cancellation(currentUser.getId(), id);
return ResultUtil.success(ResultCode.COUPON_CANCELLATION_SUCCESS);
}

View File

@@ -26,7 +26,6 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author paulG
@@ -130,8 +129,6 @@ class EsTest {
List<EsGoodsIndex> esGoodsIndices = new ArrayList<>();
for (GoodsSku goodsSku : list) {
EsGoodsIndex index = new EsGoodsIndex(goodsSku);
Map<String, Object> goodsCurrentPromotionMap = promotionService.getGoodsPromotionMap(index);
index.setPromotionMap(goodsCurrentPromotionMap);
esGoodsIndices.add(index);
cache.put(GoodsSkuService.getStockCacheKey(goodsSku.getId()), goodsSku.getQuantity());
}
@@ -174,7 +171,6 @@ class EsTest {
@Test
void updateIndex() {
EsGoodsIndex byId = esGoodsIndexService.findById("121");
byId.setPromotionMap(null);
esGoodsIndexService.updateIndex(byId);
Assertions.assertTrue(true);
}