注释规范
This commit is contained in:
@@ -58,13 +58,13 @@ class EsTest {
|
||||
@Test
|
||||
void searchGoods() {
|
||||
EsGoodsSearchDTO goodsSearchDTO = new EsGoodsSearchDTO();
|
||||
// goodsSearchDTO.setKeyword("黄");
|
||||
// goodsSearchDTO.setKeyword("黄");
|
||||
goodsSearchDTO.setProp("IETF_HTTP/3");
|
||||
// goodsSearchDTO.setPrice("100_20000");
|
||||
// goodsSearchDTO.setStoreCatId(1L);
|
||||
// goodsSearchDTO.setBrandId(123L);
|
||||
// goodsSearchDTO.setCategoryId(2L);
|
||||
// goodsSearchDTO.setNameIds(Arrays.asList("1344113311566553088", "1344113367694729216"));
|
||||
// goodsSearchDTO.setPrice("100_20000");
|
||||
// goodsSearchDTO.setStoreCatId(1L);
|
||||
// goodsSearchDTO.setBrandId(123L);
|
||||
// goodsSearchDTO.setCategoryId(2L);
|
||||
// goodsSearchDTO.setNameIds(Arrays.asList("1344113311566553088", "1344113367694729216"));
|
||||
PageVO pageVo = new PageVO();
|
||||
pageVo.setPageNumber(0);
|
||||
pageVo.setPageSize(100);
|
||||
@@ -73,25 +73,25 @@ class EsTest {
|
||||
Page<EsGoodsIndex> esGoodsIndices = goodsSearchService.searchGoods(goodsSearchDTO, pageVo);
|
||||
Assertions.assertNotNull(esGoodsIndices);
|
||||
esGoodsIndices.getContent().forEach(System.out::println);
|
||||
// esGoodsIndices.getContent().forEach(i -> {
|
||||
// if (i.getPromotionMap() != null){
|
||||
// String s = i.getPromotionMap().keySet().parallelStream().filter(j -> j.contains(PromotionTypeEnum.FULL_DISCOUNT.name())).findFirst().orElse(null);
|
||||
// if (s != null) {
|
||||
// FullDiscount basePromotion = (FullDiscount) i.getPromotionMap().get(s);
|
||||
// System.out.println(basePromotion);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// esGoodsIndices.getContent().forEach(i -> {
|
||||
// if (i.getPromotionMap() != null){
|
||||
// String s = i.getPromotionMap().keySet().parallelStream().filter(j -> j.contains(PromotionTypeEnum.FULL_DISCOUNT.name())).findFirst().orElse(null);
|
||||
// if (s != null) {
|
||||
// FullDiscount basePromotion = (FullDiscount) i.getPromotionMap().get(s);
|
||||
// System.out.println(basePromotion);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
void aggregationSearch() {
|
||||
EsGoodsSearchDTO goodsSearchDTO = new EsGoodsSearchDTO();
|
||||
// goodsSearchDTO.setKeyword("电脑");
|
||||
// goodsSearchDTO.setProp("颜色_故宫文创@版本_小新Pro13s");
|
||||
// goodsSearchDTO.setCategoryId("2");
|
||||
// goodsSearchDTO.setPrice("100_20000");
|
||||
//goodsSearchDTO.setKeyword("电脑");
|
||||
//goodsSearchDTO.setProp("颜色_故宫文创@版本_小新Pro13s");
|
||||
// goodsSearchDTO.setCategoryId("2");
|
||||
// goodsSearchDTO.setPrice("100_20000");
|
||||
PageVO pageVo = new PageVO();
|
||||
pageVo.setPageNumber(0);
|
||||
pageVo.setPageSize(10);
|
||||
@@ -154,60 +154,60 @@ class EsTest {
|
||||
|
||||
@Test
|
||||
void updateIndex() {
|
||||
// EsGoodsIndex goodsIndex = new EsGoodsIndex();
|
||||
// goodsIndex.setId("121");
|
||||
// goodsIndex.setBrandId("113");
|
||||
// goodsIndex.setGoodsId("113");
|
||||
// goodsIndex.setCategoryPath("0|1");
|
||||
// goodsIndex.setBuyCount(100);
|
||||
// goodsIndex.setCommentNum(100);
|
||||
// goodsIndex.setGoodsName("惠普(HP)战66 三代AMD版14英寸轻薄笔记本电脑(锐龙7nm 六核R5-4500U 16G 512G 400尼特高色域一年上门 )");
|
||||
// goodsIndex.setGrade(100D);
|
||||
// goodsIndex.setHighPraiseNum(100);
|
||||
// goodsIndex.setIntro("I'd like a cup of tea, please");
|
||||
// goodsIndex.setIsAuth("1");
|
||||
// goodsIndex.setMarketEnable("1");
|
||||
// goodsIndex.setMobileIntro("I want something cold to drink");
|
||||
// goodsIndex.setPoint(100);
|
||||
// goodsIndex.setPrice(100D);
|
||||
// goodsIndex.setSelfOperated(true);
|
||||
// goodsIndex.setStoreId("113");
|
||||
// goodsIndex.setStoreName("惠普自营官方旗舰店");
|
||||
// goodsIndex.setStoreCategoryPath("1");
|
||||
// goodsIndex.setThumbnail("picture");
|
||||
// goodsIndex.setSn("A113");
|
||||
// Map<String, BasePromotion> promotionMap = new HashMap<>();
|
||||
// Coupon coupon = new Coupon();
|
||||
// coupon.setStoreId("113");
|
||||
// coupon.setStoreName("惠普自营官方旗舰店");
|
||||
// coupon.setPromotionStatus(PromotionStatusEnum.START.name());
|
||||
// coupon.setReceivedNum(0);
|
||||
// coupon.setConsumeLimit(11D);
|
||||
// coupon.setCouponLimitNum(10);
|
||||
// coupon.setCouponName("满11减10");
|
||||
// coupon.setCouponType(CouponTypeEnum.PRICE.name());
|
||||
// coupon.setGetType(CouponGetEnum.FREE.name());
|
||||
// coupon.setPrice(10D);
|
||||
// promotionMap.put(PromotionTypeEnum.COUPON.name(), coupon);
|
||||
// goodsIndex.setPromotionMap(promotionMap);
|
||||
// List<EsGoodsAttribute> esGoodsAttributeList = new ArrayList<>();
|
||||
// EsGoodsAttribute attribute = new EsGoodsAttribute();
|
||||
// attribute.setType(0);
|
||||
// attribute.setName("颜色");
|
||||
// attribute.setValue("14英寸");
|
||||
// esGoodsAttributeList.add(attribute);
|
||||
// esGoodsAttributeList.add(attribute);
|
||||
// attribute = new EsGoodsAttribute();
|
||||
// attribute.setName("版本");
|
||||
// attribute.setValue("【战66新品】R5-4500 8G 256G");
|
||||
// esGoodsAttributeList.add(attribute);
|
||||
// attribute = new EsGoodsAttribute();
|
||||
// attribute.setName("配置");
|
||||
// attribute.setValue("i5 8G 512G 2G独显");
|
||||
// esGoodsAttributeList.add(attribute);
|
||||
// goodsIndex.setAttrList(esGoodsAttributeList);
|
||||
// GoodsSku goodsSkuByIdFromCache = goodsSkuService.getGoodsSkuByIdFromCache("121");
|
||||
// EsGoodsIndex goodsIndex = new EsGoodsIndex(goodsSkuByIdFromCache);
|
||||
// EsGoodsIndex goodsIndex = new EsGoodsIndex();
|
||||
// goodsIndex.setId("121");
|
||||
// goodsIndex.setBrandId("113");
|
||||
// goodsIndex.setGoodsId("113");
|
||||
// goodsIndex.setCategoryPath("0|1");
|
||||
// goodsIndex.setBuyCount(100);
|
||||
// goodsIndex.setCommentNum(100);
|
||||
// goodsIndex.setGoodsName("惠普(HP)战66 三代AMD版14英寸轻薄笔记本电脑(锐龙7nm 六核R5-4500U 16G 512G 400尼特高色域一年上门 )");
|
||||
// goodsIndex.setGrade(100D);
|
||||
// goodsIndex.setHighPraiseNum(100);
|
||||
// goodsIndex.setIntro("I'd like a cup of tea, please");
|
||||
// goodsIndex.setIsAuth("1");
|
||||
// goodsIndex.setMarketEnable("1");
|
||||
// goodsIndex.setMobileIntro("I want something cold to drink");
|
||||
// goodsIndex.setPoint(100);
|
||||
// goodsIndex.setPrice(100D);
|
||||
// goodsIndex.setSelfOperated(true);
|
||||
// goodsIndex.setStoreId("113");
|
||||
// goodsIndex.setStoreName("惠普自营官方旗舰店");
|
||||
// goodsIndex.setStoreCategoryPath("1");
|
||||
// goodsIndex.setThumbnail("picture");
|
||||
// goodsIndex.setSn("A113");
|
||||
// Map<String, BasePromotion> promotionMap = new HashMap<>();
|
||||
// Coupon coupon = new Coupon();
|
||||
// coupon.setStoreId("113");
|
||||
// coupon.setStoreName("惠普自营官方旗舰店");
|
||||
// coupon.setPromotionStatus(PromotionStatusEnum.START.name());
|
||||
// coupon.setReceivedNum(0);
|
||||
// coupon.setConsumeLimit(11D);
|
||||
// coupon.setCouponLimitNum(10);
|
||||
// coupon.setCouponName("满11减10");
|
||||
// coupon.setCouponType(CouponTypeEnum.PRICE.name());
|
||||
// coupon.setGetType(CouponGetEnum.FREE.name());
|
||||
// coupon.setPrice(10D);
|
||||
// promotionMap.put(PromotionTypeEnum.COUPON.name(), coupon);
|
||||
// goodsIndex.setPromotionMap(promotionMap);
|
||||
// List<EsGoodsAttribute> esGoodsAttributeList = new ArrayList<>();
|
||||
// EsGoodsAttribute attribute = new EsGoodsAttribute();
|
||||
// attribute.setType(0);
|
||||
// attribute.setName("颜色");
|
||||
// attribute.setValue("14英寸");
|
||||
// esGoodsAttributeList.add(attribute);
|
||||
// esGoodsAttributeList.add(attribute);
|
||||
// attribute = new EsGoodsAttribute();
|
||||
// attribute.setName("版本");
|
||||
// attribute.setValue("【战66新品】R5-4500 8G 256G");
|
||||
// esGoodsAttributeList.add(attribute);
|
||||
// attribute = new EsGoodsAttribute();
|
||||
// attribute.setName("配置");
|
||||
// attribute.setValue("i5 8G 512G 2G独显");
|
||||
// esGoodsAttributeList.add(attribute);
|
||||
// goodsIndex.setAttrList(esGoodsAttributeList);
|
||||
// GoodsSku goodsSkuByIdFromCache = goodsSkuService.getGoodsSkuByIdFromCache("121");
|
||||
// EsGoodsIndex goodsIndex = new EsGoodsIndex(goodsSkuByIdFromCache);
|
||||
EsGoodsIndex byId = esGoodsIndexService.findById("121");
|
||||
byId.setPromotionMap(null);
|
||||
esGoodsIndexService.updateIndex(byId);
|
||||
|
||||
@@ -21,12 +21,12 @@ class OrderServiceTest {
|
||||
|
||||
@Test
|
||||
void QueryParam() {
|
||||
// OrderSearchParams orderSearchParams = new OrderSearchParams();
|
||||
// orderSearchParams.setPageSize(0);
|
||||
// orderSearchParams.setPageNumber(10);
|
||||
// IPage<OrderSimpleVO> orderVOIPage = orderService.queryByParams(orderSearchParams);
|
||||
// Assertions.assertNotNull(orderVOIPage);
|
||||
// orderVOIPage.getRecords().forEach(System.out::println);
|
||||
// OrderSearchParams orderSearchParams = new OrderSearchParams();
|
||||
// orderSearchParams.setPageSize(0);
|
||||
// orderSearchParams.setPageNumber(10);
|
||||
// IPage<OrderSimpleVO> orderVOIPage = orderService.queryByParams(orderSearchParams);
|
||||
// Assertions.assertNotNull(orderVOIPage);
|
||||
// orderVOIPage.getRecords().forEach(System.out::println);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,14 +50,14 @@ class CouponTest {
|
||||
couponVO.setDescription(couponVO.getCouponName() + " are expensive");
|
||||
couponVO.setGetType(CouponGetEnum.FREE.name());
|
||||
couponVO.setPromotionStatus(PromotionStatusEnum.NEW.name());
|
||||
// couponVO.setStoreId("0");
|
||||
// couponVO.setStoreName("platform");
|
||||
// couponVO.setStoreId("0");
|
||||
// couponVO.setStoreName("platform");
|
||||
couponVO.setStoreId("131");
|
||||
couponVO.setStoreName("小米自营旗舰店");
|
||||
couponVO.setPublishNum(1000);
|
||||
couponVO.setCouponLimitNum(0);
|
||||
couponVO.setConsumeThreshold(500D);
|
||||
// couponVO.setPrice(200D);
|
||||
// couponVO.setPrice(200D);
|
||||
couponVO.setCouponDiscount(0.1D);
|
||||
|
||||
couponVO.setScopeType(CouponScopeTypeEnum.PORTION_GOODS.name());
|
||||
@@ -71,7 +71,7 @@ class CouponTest {
|
||||
couponVO.setPromotionName(couponVO.getPrice() + "元券");
|
||||
}
|
||||
List<PromotionGoods> promotionGoodsList = new ArrayList<>();
|
||||
// GoodsSku sku121 = goodsSkuService.getGoodsSkuByIdFromCache("121");
|
||||
// GoodsSku sku121 = goodsSkuService.getGoodsSkuByIdFromCache("121");
|
||||
PromotionGoods promotionGoods = new PromotionGoods();
|
||||
promotionGoods.setPrice(0.0);
|
||||
promotionGoods.setLimitNum(0);
|
||||
@@ -85,17 +85,17 @@ class CouponTest {
|
||||
promotionGoods.setPromotionType(PromotionTypeEnum.COUPON.name());
|
||||
promotionGoodsList.add(promotionGoods);
|
||||
//
|
||||
// GoodsSku sku50112 = goodsSkuService.getGoodsSkuByIdFromCache("50112");
|
||||
// promotionGoods = new PromotionGoods(sku50112);
|
||||
// promotionGoods.setPrice(80000d);
|
||||
// promotionGoods.setLimitNum(0);
|
||||
// promotionGoods.setPromotionQuantity(1000);
|
||||
// promotionGoods.setNum(1000);
|
||||
// promotionGoods.setStartTime(couponVO.getStartTime());
|
||||
// promotionGoods.setEndTime(couponVO.getEndTime());
|
||||
// promotionGoods.setTitle(couponVO.getPromotionName());
|
||||
// promotionGoods.setPromotionStatus(couponVO.getPromotionStatus());
|
||||
// promotionGoodsList.add(promotionGoods);
|
||||
// GoodsSku sku50112 = goodsSkuService.getGoodsSkuByIdFromCache("50112");
|
||||
// promotionGoods = new PromotionGoods(sku50112);
|
||||
// promotionGoods.setPrice(80000d);
|
||||
// promotionGoods.setLimitNum(0);
|
||||
// promotionGoods.setPromotionQuantity(1000);
|
||||
// promotionGoods.setNum(1000);
|
||||
// promotionGoods.setStartTime(couponVO.getStartTime());
|
||||
// promotionGoods.setEndTime(couponVO.getEndTime());
|
||||
// promotionGoods.setTitle(couponVO.getPromotionName());
|
||||
// promotionGoods.setPromotionStatus(couponVO.getPromotionStatus());
|
||||
// promotionGoodsList.add(promotionGoods);
|
||||
//
|
||||
couponVO.setPromotionGoodsList(promotionGoodsList);
|
||||
Assertions.assertNotNull(couponService.add(couponVO));
|
||||
@@ -192,7 +192,7 @@ class CouponTest {
|
||||
|
||||
@Test
|
||||
void delete() {
|
||||
// Assertions.assertTrue(couponService.deleteCoupon("1326001296591577088"));
|
||||
// Assertions.assertTrue(couponService.deleteCoupon("1326001296591577088"));
|
||||
GoodsStatusEnum goodsStatusEnum = GoodsStatusEnum.DOWN;
|
||||
System.out.println("name:: " + goodsStatusEnum.name());
|
||||
System.out.println("description:: " + goodsStatusEnum.description());
|
||||
|
||||
@@ -88,7 +88,7 @@ class FullDiscountTest {
|
||||
Assertions.assertNotNull(fullDiscountByPageFromMongo);
|
||||
FullDiscount fullDiscount = JSONUtil.toBean(JSONUtil.parseObj(fullDiscountByPageFromMongo.getPages()), FullDiscount.class);
|
||||
System.out.println(fullDiscount);
|
||||
// fullDiscountByPageFromMongo.forEach(System.out::println);
|
||||
// fullDiscountByPageFromMongo.forEach(System.out::println);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user