From 7aa25e8342a9497f4434561ada7f1c3455fdc1c2 Mon Sep 17 00:00:00 2001 From: wuwenbin Date: Sun, 26 Jul 2020 10:04:42 +0800 Subject: [PATCH] =?UTF-8?q?fix=20promotion=E4=BC=98=E6=83=A0=E5=88=B8?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E8=BF=81=E7=A7=BB,=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E6=88=90=EF=BC=8C=E5=85=88=E6=8F=90=E4=BA=A4=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/sql/old/mall_promotion.sql | 4 +- .../order/biz/service/CartServiceImpl.java | 2 +- pom.xml | 1 + promotion-service-project/pom.xml | 44 +++++++++++++++++++ .../promotion-service-api/pom.xml | 11 +++++ .../api/enums}/CouponCardStatusEnum.java | 2 +- .../api/enums}/CouponCardTakeTypeEnum.java | 2 +- .../enums}/CouponTemplateDateTypeEnum.java | 2 +- .../api/enums}/CouponTemplateStatusEnum.java | 2 +- .../api/enums}/CouponTemplateTypeEnum.java | 2 +- .../promotion/api/enums}/MeetTypeEnum.java | 2 +- .../api/enums}/PreferentialTypeEnum.java | 2 +- .../api/enums}/ProductRecommendTypeEnum.java | 2 +- .../enums}/PromotionActivityStatusEnum.java | 2 +- .../api/enums}/PromotionActivityTypeEnum.java | 2 +- .../api/enums}/PromotionErrorCodeEnum.java | 2 +- .../promotion/api/enums}/RangeTypeEnum.java | 2 +- .../activity/PromotionActivityService.java | 16 +++++++ .../dto/PromotionActivityPageReqDTO.java | 6 +-- .../dto/PromotionActivityPageRespDTO.java | 4 +- .../dto/PromotionActivityRespDTO.java | 10 ++--- .../api/rpc/banner/BannerService.java | 28 ++++++++++++ .../api/rpc/banner/dto/BannerAddReqDTO.java | 4 +- .../api/rpc/banner}/dto/BannerPageDTO.java | 2 +- .../api/rpc/banner/dto/BannerPageRespDTO.java | 6 +-- .../api/rpc/banner/dto/BannerRespDTO.java | 4 +- .../rpc/banner/dto/BannerUpdateReqDTO.java | 4 +- .../api/rpc/coupon}/CouponService.java | 21 +++++---- .../dto/CouponCardAvailableRespDTO.java | 4 +- .../api/rpc/coupon/dto}/CouponCardBO.java | 2 +- .../rpc/coupon/dto}/CouponCardDetailBO.java | 2 +- .../api/rpc/coupon/dto}/CouponCardPageBO.java | 2 +- .../rpc/coupon/dto/CouponCardPageReqDTO.java | 4 +- .../rpc/coupon/dto/CouponCardSpuRespDTO.java | 7 +-- .../dto/CouponCardTemplateAddReqDTO.java | 10 ++--- .../dto/CouponCardTemplateUpdateReqDTO.java | 20 ++++----- .../dto/CouponCodeTemplateAddReqDTO.java | 4 +- .../dto/CouponCodeTemplateUpdateReqDTO.java | 4 +- .../api/rpc/coupon/dto}/CouponTemplateBO.java | 2 +- .../rpc/coupon/dto}/CouponTemplatePageBO.java | 2 +- .../coupon/dto/CouponTemplatePageReqDTO.java | 4 +- .../recommend/ProductRecommendService.java | 24 ++++++++++ .../dto/ProductRecommendAddReqDTO.java | 6 +-- .../dto/ProductRecommendPageReqDTO.java | 4 +- .../dto/ProductRecommendPageRespDTO.java | 6 +-- .../dto/ProductRecommendRespDTO.java | 6 +-- .../dto/ProductRecommendUpdateReqDTO.java | 6 +-- .../promotion-service-app/pom.xml | 21 +++++++++ .../mall/promotion/api/BannerService.java | 28 ------------ .../api/ProductRecommendService.java | 29 ------------ .../api/PromotionActivityService.java | 20 --------- .../config/ServiceExceptionConfiguration.java | 2 +- .../biz/dataobject/CouponTemplateDO.java | 2 +- .../biz/dataobject/ProductRecommendDO.java | 2 +- .../biz/dataobject/PromotionActivityDO.java | 6 +-- .../biz/service/BannerServiceImpl.java | 2 +- .../biz/service/CouponServiceImpl.java | 2 +- .../service/ProductRecommendServiceImpl.java | 2 +- .../service/PromotionActivityServiceImpl.java | 4 +- .../biz/dao/PromotionActivityMapperTest.java | 8 ++-- .../AdminsPromotionActivityController.java | 2 +- 61 files changed, 254 insertions(+), 186 deletions(-) create mode 100644 promotion-service-project/pom.xml rename {promotion => promotion-service-project}/promotion-service-api/pom.xml (82%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/CouponCardStatusEnum.java (94%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/CouponCardTakeTypeEnum.java (94%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/CouponTemplateDateTypeEnum.java (94%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/CouponTemplateStatusEnum.java (94%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/CouponTemplateTypeEnum.java (92%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/MeetTypeEnum.java (90%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/PreferentialTypeEnum.java (94%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/ProductRecommendTypeEnum.java (95%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/PromotionActivityStatusEnum.java (93%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/PromotionActivityTypeEnum.java (91%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/PromotionErrorCodeEnum.java (97%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums}/RangeTypeEnum.java (95%) create mode 100644 promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/PromotionActivityService.java rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/PromotionActivityPageBO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityPageReqDTO.java (63%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/PromotionActivityPageDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityPageRespDTO.java (83%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/PromotionActivityBO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityRespDTO.java (87%) create mode 100644 promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/BannerService.java rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerAddDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerAddReqDTO.java (90%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner}/dto/BannerPageDTO.java (89%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerPageBO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerPageRespDTO.java (64%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerBO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerRespDTO.java (85%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerUpdateDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerUpdateReqDTO.java (90%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon}/CouponService.java (82%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardAvailableBO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardAvailableRespDTO.java (76%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto}/CouponCardBO.java (97%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto}/CouponCardDetailBO.java (98%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto}/CouponCardPageBO.java (87%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardPageDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardPageReqDTO.java (80%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardSpuDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardSpuRespDTO.java (66%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardTemplateAddDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardTemplateAddReqDTO.java (93%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardTemplateUpdateDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardTemplateUpdateReqDTO.java (88%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCodeTemplateAddDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCodeTemplateAddReqDTO.java (56%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCodeTemplateUpdateDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCodeTemplateUpdateReqDTO.java (56%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto}/CouponTemplateBO.java (98%) rename {promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto}/CouponTemplatePageBO.java (88%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponTemplatePageDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponTemplatePageReqDTO.java (83%) create mode 100644 promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/ProductRecommendService.java rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendAddDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendAddReqDTO.java (79%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendPageDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendPageReqDTO.java (77%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/ProductRecommendPageBO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendPageRespDTO.java (62%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/ProductRecommendBO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendRespDTO.java (79%) rename promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendUpdateDTO.java => promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendUpdateReqDTO.java (80%) create mode 100644 promotion-service-project/promotion-service-app/pom.xml delete mode 100644 promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/BannerService.java delete mode 100644 promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/ProductRecommendService.java delete mode 100644 promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/PromotionActivityService.java diff --git a/docs/sql/old/mall_promotion.sql b/docs/sql/old/mall_promotion.sql index 27e1db005..dc686c429 100644 --- a/docs/sql/old/mall_promotion.sql +++ b/docs/sql/old/mall_promotion.sql @@ -157,8 +157,8 @@ DROP TABLE IF EXISTS `promotion_activity`; CREATE TABLE `promotion_activity` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '活动编号', `title` varchar(50) NOT NULL DEFAULT '' COMMENT '活动标题', - `activity_type` tinyint(4) NOT NULL COMMENT '活动类型\n *\n * 参见 {@link cn.iocoder.mall.promotion.api.constant.PromotionActivityTypeEnum} 枚举', - `status` tinyint(4) NOT NULL DEFAULT '-1' COMMENT '活动状态\n *\n * 参见 {@link cn.iocoder.mall.promotion.api.constant.PromotionActivityStatusEnum} 枚举', + `activity_type` tinyint(4) NOT NULL COMMENT '活动类型\n *\n * 参见 {@link cn.iocoder.mall.promotion.api.enums.PromotionActivityTypeEnum} 枚举', + `status` tinyint(4) NOT NULL DEFAULT '-1' COMMENT '活动状态\n *\n * 参见 {@link cn.iocoder.mall.promotion.api.enums.PromotionActivityStatusEnum} 枚举', `start_time` datetime NOT NULL COMMENT '开始时间', `end_time` datetime NOT NULL COMMENT '结束时间', `invalid_time` datetime DEFAULT NULL COMMENT '失效时间', diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/CartServiceImpl.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/CartServiceImpl.java index bb62f7728..fda65fb97 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/CartServiceImpl.java +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/CartServiceImpl.java @@ -19,7 +19,7 @@ import cn.iocoder.mall.promotion.api.CouponService; import cn.iocoder.mall.promotion.api.PromotionActivityService; import cn.iocoder.mall.promotion.api.bo.CouponCardDetailBO; import cn.iocoder.mall.promotion.api.bo.PromotionActivityBO; -import cn.iocoder.mall.promotion.api.constant.*; +import cn.iocoder.mall.promotion.api.enums.*; import org.apache.dubbo.config.annotation.Reference; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/pom.xml b/pom.xml index 85928c013..ad03db84f 100644 --- a/pom.xml +++ b/pom.xml @@ -30,6 +30,7 @@ management-web-app shop-web-app product-service-project + promotion-service-project pom diff --git a/promotion-service-project/pom.xml b/promotion-service-project/pom.xml new file mode 100644 index 000000000..7d36ed95e --- /dev/null +++ b/promotion-service-project/pom.xml @@ -0,0 +1,44 @@ + + + + onemall + cn.iocoder.mall + 1.0-SNAPSHOT + + 4.0.0 + + promotion-service-project + pom + + promotion-service-api + promotion-service-app + + + + + + + cn.iocoder.mall + mall-dependencies + 1.0-SNAPSHOT + pom + import + + + + cn.iocoder.mall + common-framework + 1.0-SNAPSHOT + + + + + cn.iocoder.mall + promotion-service-api + 1.0-SNAPSHOT + + + + \ No newline at end of file diff --git a/promotion/promotion-service-api/pom.xml b/promotion-service-project/promotion-service-api/pom.xml similarity index 82% rename from promotion/promotion-service-api/pom.xml rename to promotion-service-project/promotion-service-api/pom.xml index e7f74dd1f..caaeda443 100644 --- a/promotion/promotion-service-api/pom.xml +++ b/promotion-service-project/promotion-service-api/pom.xml @@ -33,6 +33,17 @@ org.projectlombok lombok + + + javax.validation + validation-api + + + + org.hibernate + hibernate-validator + true + diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponCardStatusEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponCardStatusEnum.java similarity index 94% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponCardStatusEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponCardStatusEnum.java index 0f1079438..717aa01f8 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponCardStatusEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponCardStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; import cn.iocoder.common.framework.core.IntArrayValuable; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponCardTakeTypeEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponCardTakeTypeEnum.java similarity index 94% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponCardTakeTypeEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponCardTakeTypeEnum.java index 020f3fbb0..3717c74b2 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponCardTakeTypeEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponCardTakeTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; import cn.iocoder.common.framework.core.IntArrayValuable; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponTemplateDateTypeEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponTemplateDateTypeEnum.java similarity index 94% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponTemplateDateTypeEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponTemplateDateTypeEnum.java index da1ffaaa0..784dce778 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponTemplateDateTypeEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponTemplateDateTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; import cn.iocoder.common.framework.core.IntArrayValuable; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponTemplateStatusEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponTemplateStatusEnum.java similarity index 94% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponTemplateStatusEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponTemplateStatusEnum.java index c54c5e8ab..87a27a594 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponTemplateStatusEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponTemplateStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; import cn.iocoder.common.framework.core.IntArrayValuable; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponTemplateTypeEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponTemplateTypeEnum.java similarity index 92% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponTemplateTypeEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponTemplateTypeEnum.java index e213429f3..9d3cc8da4 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/CouponTemplateTypeEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/CouponTemplateTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; import java.util.Arrays; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/MeetTypeEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/MeetTypeEnum.java similarity index 90% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/MeetTypeEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/MeetTypeEnum.java index eef76187e..85a194625 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/MeetTypeEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/MeetTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; /** * 匹配类型枚举 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PreferentialTypeEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PreferentialTypeEnum.java similarity index 94% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PreferentialTypeEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PreferentialTypeEnum.java index fb75cacc6..9af2827cf 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PreferentialTypeEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PreferentialTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; import cn.iocoder.common.framework.core.IntArrayValuable; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/ProductRecommendTypeEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/ProductRecommendTypeEnum.java similarity index 95% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/ProductRecommendTypeEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/ProductRecommendTypeEnum.java index 0b50ae71f..e01a3de6d 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/ProductRecommendTypeEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/ProductRecommendTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; import cn.iocoder.common.framework.core.IntArrayValuable; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PromotionActivityStatusEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PromotionActivityStatusEnum.java similarity index 93% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PromotionActivityStatusEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PromotionActivityStatusEnum.java index 3471ebf72..25786a186 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PromotionActivityStatusEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PromotionActivityStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; /** * 促销活动状态枚举 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PromotionActivityTypeEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PromotionActivityTypeEnum.java similarity index 91% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PromotionActivityTypeEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PromotionActivityTypeEnum.java index d6bae8e6a..01d8a415c 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PromotionActivityTypeEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PromotionActivityTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; /** * 推广活动类型枚举 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PromotionErrorCodeEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PromotionErrorCodeEnum.java similarity index 97% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PromotionErrorCodeEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PromotionErrorCodeEnum.java index 723213adf..7e08132ff 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/PromotionErrorCodeEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/PromotionErrorCodeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; /** * 错误码枚举类 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/RangeTypeEnum.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/RangeTypeEnum.java similarity index 95% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/RangeTypeEnum.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/RangeTypeEnum.java index 5cfbf1318..63bffdae0 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/constant/RangeTypeEnum.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/enums/RangeTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.constant; +package cn.iocoder.mall.promotion.api.enums; import cn.iocoder.common.framework.core.IntArrayValuable; diff --git a/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/PromotionActivityService.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/PromotionActivityService.java new file mode 100644 index 000000000..a8ea7dadd --- /dev/null +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/PromotionActivityService.java @@ -0,0 +1,16 @@ +package cn.iocoder.mall.promotion.api.rpc.activity.dto; + +import java.util.Collection; +import java.util.List; + +public interface PromotionActivityService { + + List getPromotionActivityListBySpuId(Integer spuId, + Collection activityStatuses); + + List getPromotionActivityListBySpuIds(Collection spuIds, + Collection activityStatuses); + + PromotionActivityPageReqDTO getPromotionActivityPage(PromotionActivityPageRespDTO promotionActivityPageDTO); + +} diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/PromotionActivityPageBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityPageReqDTO.java similarity index 63% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/PromotionActivityPageBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityPageReqDTO.java index dfd227fb1..26f7f3be1 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/PromotionActivityPageBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityPageReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.activity.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -10,12 +10,12 @@ import java.util.List; */ @Data @Accessors(chain = true) -public class PromotionActivityPageBO { +public class PromotionActivityPageReqDTO { /** * PromotionActivityBO 数组 */ - private List list; + private List list; /** * 总量 */ diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/PromotionActivityPageDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityPageRespDTO.java similarity index 83% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/PromotionActivityPageDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityPageRespDTO.java index c2f06ff0c..06b39bc48 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/PromotionActivityPageDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityPageRespDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.activity.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -12,7 +12,7 @@ import java.util.Collection; */ @Data @Accessors(chain = true) -public class PromotionActivityPageDTO implements Serializable { +public class PromotionActivityPageRespDTO implements Serializable { /** * 标题 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/PromotionActivityBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityRespDTO.java similarity index 87% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/PromotionActivityBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityRespDTO.java index 42f160893..d268ce73f 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/PromotionActivityBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/activity/dto/PromotionActivityRespDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.activity.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -9,7 +9,7 @@ import java.util.List; @Data @Accessors(chain = true) -public class PromotionActivityBO implements Serializable { +public class PromotionActivityRespDTO implements Serializable { /** * 活动编号 @@ -22,13 +22,13 @@ public class PromotionActivityBO implements Serializable { /** * 活动类型 * - * 参见 {@link cn.iocoder.mall.promotion.api.constant.PromotionActivityTypeEnum} 枚举 + * 参见 {@link cn.iocoder.mall.promotion.api.enums.PromotionActivityTypeEnum} 枚举 */ private Integer activityType; /** * 活动状态 * - * 参见 {@link cn.iocoder.mall.promotion.api.constant.PromotionActivityStatusEnum} 枚举 + * 参见 {@link cn.iocoder.mall.promotion.api.enums.PromotionActivityStatusEnum} 枚举 */ private Integer status; /** @@ -129,7 +129,7 @@ public class PromotionActivityBO implements Serializable { /** * 可用范围的类型 * - * 参见 {@link cn.iocoder.mall.promotion.api.constant.RangeTypeEnum} 枚举 + * 参见 {@link cn.iocoder.mall.promotion.api.enums.RangeTypeEnum} 枚举 * 暂时只用 “所有可用” + “PRODUCT_INCLUDE_PRT” */ private Integer rangeType; diff --git a/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/BannerService.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/BannerService.java new file mode 100644 index 000000000..87a8ba179 --- /dev/null +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/BannerService.java @@ -0,0 +1,28 @@ +package cn.iocoder.mall.promotion.api.rpc.banner; + +import cn.iocoder.common.framework.enums.CommonStatusEnum; +import cn.iocoder.common.framework.validator.InEnum; +import cn.iocoder.mall.promotion.api.rpc.banner.dto.BannerRespDTO; +import cn.iocoder.mall.promotion.api.rpc.banner.dto.BannerPageRespDTO; +import cn.iocoder.mall.promotion.api.rpc.banner.dto.BannerAddReqDTO; +import cn.iocoder.mall.promotion.api.rpc.banner.dto.BannerPageDTO; +import cn.iocoder.mall.promotion.api.rpc.banner.dto.BannerUpdateReqDTO; + +import java.util.List; + +public interface BannerService { + + List getBannerListByStatus(Integer status); + + BannerPageRespDTO getBannerPage(BannerPageDTO bannerPageDTO); + + BannerRespDTO addBanner(Integer adminId, BannerAddReqDTO bannerAddDTO); + + Boolean updateBanner(Integer adminId, BannerUpdateReqDTO bannerUpdateDTO); + + Boolean updateBannerStatus(Integer adminId, Integer bannerId, + @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") Integer status); + + Boolean deleteBanner(Integer adminId, Integer bannerId); + +} diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerAddDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerAddReqDTO.java similarity index 90% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerAddDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerAddReqDTO.java index e9c43a20f..a243d274e 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerAddDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerAddReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.banner.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -14,7 +14,7 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -public class BannerAddDTO implements Serializable { +public class BannerAddReqDTO implements Serializable { @NotEmpty(message = "标题不能为空") @Length(min = 2, max = 32, message = "标题长度为 2-32 位") diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerPageDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerPageDTO.java similarity index 89% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerPageDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerPageDTO.java index bf82ea691..a58a55722 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerPageDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerPageDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.banner.dto; import lombok.Data; import lombok.experimental.Accessors; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerPageBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerPageRespDTO.java similarity index 64% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerPageBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerPageRespDTO.java index 75a16835b..111d19d8e 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerPageBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerPageRespDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.banner.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -11,12 +11,12 @@ import java.util.List; */ @Data @Accessors(chain = true) -public class BannerPageBO implements Serializable { +public class BannerPageRespDTO implements Serializable { /** * Banner 数组 */ - private List list; + private List list; /** * 总量 */ diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerRespDTO.java similarity index 85% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerRespDTO.java index 4a86ec76f..e0f3058a0 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/BannerBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerRespDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.banner.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -11,7 +11,7 @@ import java.util.Date; */ @Data @Accessors(chain = true) -public class BannerBO implements Serializable { +public class BannerRespDTO implements Serializable { /** * 编号 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerUpdateDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerUpdateReqDTO.java similarity index 90% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerUpdateDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerUpdateReqDTO.java index 9582b2c5a..e7d3f3ec1 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/BannerUpdateDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/banner/dto/BannerUpdateReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.banner.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -14,7 +14,7 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -public class BannerUpdateDTO implements Serializable { +public class BannerUpdateReqDTO implements Serializable { @NotNull(message = "编号不能为空") private Integer id; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/CouponService.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/CouponService.java similarity index 82% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/CouponService.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/CouponService.java index 406d2772d..903a6319c 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/CouponService.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/CouponService.java @@ -1,9 +1,8 @@ -package cn.iocoder.mall.promotion.api; +package cn.iocoder.mall.promotion.api.rpc.coupon; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.promotion.api.bo.*; -import cn.iocoder.mall.promotion.api.constant.CouponTemplateStatusEnum; -import cn.iocoder.mall.promotion.api.dto.*; +import cn.iocoder.mall.promotion.api.enums.CouponTemplateStatusEnum; +import cn.iocoder.mall.promotion.api.rpc.coupon.dto.*; import javax.validation.constraints.NotNull; import java.util.List; @@ -14,7 +13,7 @@ public interface CouponService { CouponTemplateBO getCouponTemplate(Integer couponTemplateId); - CouponTemplatePageBO getCouponTemplatePage(CouponTemplatePageDTO couponTemplatePageDTO); + CouponTemplatePageBO getCouponTemplatePage(CouponTemplatePageReqDTO couponTemplatePageDTO); /** * 创建优惠码模板 @@ -22,7 +21,7 @@ public interface CouponService { * @param couponCodeTemplateAddDTO 优惠码模板添加 DTO * @return 优惠码模板 */ - CouponTemplateBO addCouponCodeTemplate(CouponCodeTemplateAddDTO couponCodeTemplateAddDTO); + CouponTemplateBO addCouponCodeTemplate(CouponCodeTemplateAddReqDTO couponCodeTemplateAddDTO); /** * 创建优惠劵模板 @@ -30,7 +29,7 @@ public interface CouponService { * @param couponCardTemplateAddDTO 优惠码模板添加 DTO * @return 优惠劵模板 */ - CouponTemplateBO addCouponCardTemplate(CouponCardTemplateAddDTO couponCardTemplateAddDTO); + CouponTemplateBO addCouponCardTemplate(CouponCardTemplateAddReqDTO couponCardTemplateAddDTO); /** * 更新优惠码模板 @@ -38,7 +37,7 @@ public interface CouponService { * @param couponCodeTemplateUpdateDTO 优惠码模板修改 DTO * @return 是否成功 */ - Boolean updateCouponCodeTemplate(CouponCodeTemplateUpdateDTO couponCodeTemplateUpdateDTO); + Boolean updateCouponCodeTemplate(CouponCodeTemplateUpdateReqDTO couponCodeTemplateUpdateDTO); /** * 更新优惠劵模板 @@ -46,7 +45,7 @@ public interface CouponService { * @param couponCardTemplateUpdateDTO 优惠劵模板修改 DTO * @return 是否成功 */ - Boolean updateCouponCardTemplate(CouponCardTemplateUpdateDTO couponCardTemplateUpdateDTO); + Boolean updateCouponCardTemplate(CouponCardTemplateUpdateReqDTO couponCardTemplateUpdateDTO); /** * 更新优惠劵(码)模板的状态 @@ -61,7 +60,7 @@ public interface CouponService { // ========== 优惠劵 ========== - CouponCardPageBO getCouponCardPage(CouponCardPageDTO couponCardPageDTO); + CouponCardPageBO getCouponCardPage(CouponCardPageReqDTO couponCardPageDTO); /** * 基于优惠劵模板,领取优惠劵 @@ -109,7 +108,7 @@ public interface CouponService { * @param spus 匹配的商品/分类 * @return 优惠劵列表 */ - List getCouponCardList(Integer userId, List spus); + List getCouponCardList(Integer userId, List spus); // ========== 优惠码 ========== diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardAvailableBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardAvailableRespDTO.java similarity index 76% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardAvailableBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardAvailableRespDTO.java index bae8718c8..78a26d08a 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardAvailableBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardAvailableRespDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -10,7 +10,7 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -public class CouponCardAvailableBO extends CouponCardBO { +public class CouponCardAvailableRespDTO extends CouponCardBO { /** * 是否可用 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardBO.java similarity index 97% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardBO.java index a060dceea..9d9a2b8fe 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import lombok.Data; import lombok.experimental.Accessors; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardDetailBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardDetailBO.java similarity index 98% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardDetailBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardDetailBO.java index b1dd75474..2847cbc60 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardDetailBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardDetailBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import lombok.Data; import lombok.experimental.Accessors; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardPageBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardPageBO.java similarity index 87% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardPageBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardPageBO.java index 159e4b8ef..522027732 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponCardPageBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardPageBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import lombok.Data; import lombok.experimental.Accessors; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardPageDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardPageReqDTO.java similarity index 80% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardPageDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardPageReqDTO.java index 1b6d64ec1..273678663 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardPageDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardPageReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -11,7 +11,7 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -public class CouponCardPageDTO implements Serializable { +public class CouponCardPageReqDTO implements Serializable { /** * 用户编号 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardSpuDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardSpuRespDTO.java similarity index 66% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardSpuDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardSpuRespDTO.java index d3799e2dd..46a49468b 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardSpuDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardSpuRespDTO.java @@ -1,5 +1,6 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; +import cn.iocoder.mall.promotion.api.rpc.coupon.CouponService; import lombok.Data; import lombok.experimental.Accessors; @@ -9,11 +10,11 @@ import java.util.List; /** * 优惠劵商品 DTO * - * 主要用于 {@link cn.iocoder.mall.promotion.api.CouponService#getCouponCardList(Integer, List)} + * 主要用于 {@link CouponService#getCouponCardList(Integer, List)} */ @Data @Accessors(chain = true) -public class CouponCardSpuDTO implements Serializable { +public class CouponCardSpuRespDTO implements Serializable { /** * 商品 SPU 编号 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardTemplateAddDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardTemplateAddReqDTO.java similarity index 93% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardTemplateAddDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardTemplateAddReqDTO.java index 1b76cf906..5ec3e0c2a 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardTemplateAddDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardTemplateAddReqDTO.java @@ -1,9 +1,9 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.promotion.api.constant.CouponTemplateDateTypeEnum; -import cn.iocoder.mall.promotion.api.constant.PreferentialTypeEnum; -import cn.iocoder.mall.promotion.api.constant.RangeTypeEnum; +import cn.iocoder.mall.promotion.api.enums.CouponTemplateDateTypeEnum; +import cn.iocoder.mall.promotion.api.enums.PreferentialTypeEnum; +import cn.iocoder.mall.promotion.api.enums.RangeTypeEnum; import lombok.Data; import lombok.experimental.Accessors; import org.hibernate.validator.constraints.Length; @@ -20,7 +20,7 @@ import java.util.Date; */ @Data @Accessors(chain = true) -public class CouponCardTemplateAddDTO implements Serializable { +public class CouponCardTemplateAddReqDTO implements Serializable { // ========== 基本信息 BEGIN ========== /** diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardTemplateUpdateDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardTemplateUpdateReqDTO.java similarity index 88% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardTemplateUpdateDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardTemplateUpdateReqDTO.java index bade48238..8996c5aa9 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCardTemplateUpdateDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCardTemplateUpdateReqDTO.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.promotion.api.constant.RangeTypeEnum; +import cn.iocoder.mall.promotion.api.enums.RangeTypeEnum; import lombok.Data; import lombok.experimental.Accessors; import org.hibernate.validator.constraints.Length; @@ -16,7 +16,7 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -public class CouponCardTemplateUpdateDTO implements Serializable { +public class CouponCardTemplateUpdateReqDTO implements Serializable { @NotNull(message = "编号不能为空") private Integer id; @@ -143,7 +143,7 @@ public class CouponCardTemplateUpdateDTO implements Serializable { return id; } - public CouponCardTemplateUpdateDTO setId(Integer id) { + public CouponCardTemplateUpdateReqDTO setId(Integer id) { this.id = id; return this; } @@ -152,7 +152,7 @@ public class CouponCardTemplateUpdateDTO implements Serializable { return title; } - public CouponCardTemplateUpdateDTO setTitle(String title) { + public CouponCardTemplateUpdateReqDTO setTitle(String title) { this.title = title; return this; } @@ -161,7 +161,7 @@ public class CouponCardTemplateUpdateDTO implements Serializable { return description; } - public CouponCardTemplateUpdateDTO setDescription(String description) { + public CouponCardTemplateUpdateReqDTO setDescription(String description) { this.description = description; return this; } @@ -170,7 +170,7 @@ public class CouponCardTemplateUpdateDTO implements Serializable { return quota; } - public CouponCardTemplateUpdateDTO setQuota(Integer quota) { + public CouponCardTemplateUpdateReqDTO setQuota(Integer quota) { this.quota = quota; return this; } @@ -179,7 +179,7 @@ public class CouponCardTemplateUpdateDTO implements Serializable { return total; } - public CouponCardTemplateUpdateDTO setTotal(Integer total) { + public CouponCardTemplateUpdateReqDTO setTotal(Integer total) { this.total = total; return this; } @@ -188,7 +188,7 @@ public class CouponCardTemplateUpdateDTO implements Serializable { return rangeType; } - public CouponCardTemplateUpdateDTO setRangeType(Integer rangeType) { + public CouponCardTemplateUpdateReqDTO setRangeType(Integer rangeType) { this.rangeType = rangeType; return this; } @@ -197,7 +197,7 @@ public class CouponCardTemplateUpdateDTO implements Serializable { return rangeValues; } - public CouponCardTemplateUpdateDTO setRangeValues(String rangeValues) { + public CouponCardTemplateUpdateReqDTO setRangeValues(String rangeValues) { this.rangeValues = rangeValues; return this; } diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCodeTemplateAddDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCodeTemplateAddReqDTO.java similarity index 56% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCodeTemplateAddDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCodeTemplateAddReqDTO.java index 952f5d2cc..3ba79b1fe 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCodeTemplateAddDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCodeTemplateAddReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -10,5 +10,5 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -public class CouponCodeTemplateAddDTO implements Serializable { +public class CouponCodeTemplateAddReqDTO implements Serializable { } diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCodeTemplateUpdateDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCodeTemplateUpdateReqDTO.java similarity index 56% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCodeTemplateUpdateDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCodeTemplateUpdateReqDTO.java index 797d1117a..75cb85fa8 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponCodeTemplateUpdateDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponCodeTemplateUpdateReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -10,5 +10,5 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -public class CouponCodeTemplateUpdateDTO implements Serializable { +public class CouponCodeTemplateUpdateReqDTO implements Serializable { } diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponTemplateBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponTemplateBO.java similarity index 98% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponTemplateBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponTemplateBO.java index af6dec572..e48f8f2c2 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponTemplateBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponTemplateBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import lombok.Data; import lombok.experimental.Accessors; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponTemplatePageBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponTemplatePageBO.java similarity index 88% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponTemplatePageBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponTemplatePageBO.java index 697ccec3b..15f33570d 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/CouponTemplatePageBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponTemplatePageBO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import lombok.Data; import lombok.experimental.Accessors; diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponTemplatePageDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponTemplatePageReqDTO.java similarity index 83% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponTemplatePageDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponTemplatePageReqDTO.java index 6acb381ed..d8e704dc2 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/CouponTemplatePageDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/coupon/dto/CouponTemplatePageReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.coupon.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -11,7 +11,7 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -public class CouponTemplatePageDTO implements Serializable { +public class CouponTemplatePageReqDTO implements Serializable { /** * 类型 diff --git a/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/ProductRecommendService.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/ProductRecommendService.java new file mode 100644 index 000000000..5d6a2f98f --- /dev/null +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/ProductRecommendService.java @@ -0,0 +1,24 @@ +package cn.iocoder.mall.promotion.api.rpc.recommend.dto; + +import cn.iocoder.common.framework.enums.CommonStatusEnum; +import cn.iocoder.common.framework.exception.ServiceException; +import cn.iocoder.common.framework.validator.InEnum; + +import java.util.List; + +public interface ProductRecommendService { + + List getProductRecommendList(Integer type, Integer status); + + ProductRecommendPageRespDTO getProductRecommendPage(ProductRecommendPageReqDTO productRecommendPageDTO); + + ProductRecommendRespDTO addProductRecommend(Integer adminId, ProductRecommendAddReqDTO productRecommendAddDTO) throws ServiceException; + + Boolean updateProductRecommend(Integer adminId, ProductRecommendUpdateReqDTO productRecommendUpdateDTO) throws ServiceException; + + Boolean updateProductRecommendStatus(Integer adminId, Integer productRecommendId, + @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") Integer status) throws ServiceException; + + Boolean deleteProductRecommend(Integer adminId, Integer productRecommendId); + +} diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendAddDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendAddReqDTO.java similarity index 79% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendAddDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendAddReqDTO.java index d716af359..df3732c90 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendAddDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendAddReqDTO.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.recommend.dto; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.promotion.api.constant.ProductRecommendTypeEnum; +import cn.iocoder.mall.promotion.api.enums.ProductRecommendTypeEnum; import lombok.Data; import lombok.experimental.Accessors; import org.hibernate.validator.constraints.Length; @@ -14,7 +14,7 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -public class ProductRecommendAddDTO implements Serializable { +public class ProductRecommendAddReqDTO implements Serializable { @InEnum(value = ProductRecommendTypeEnum.class, message = "修改推荐类型必须是 {value}") @NotNull(message = "推荐类型不能为空") diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendPageDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendPageReqDTO.java similarity index 77% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendPageDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendPageReqDTO.java index 8994f6b43..f6e6359c1 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendPageDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendPageReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.recommend.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -11,7 +11,7 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -public class ProductRecommendPageDTO implements Serializable { +public class ProductRecommendPageReqDTO implements Serializable { /** * 推荐类型 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/ProductRecommendPageBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendPageRespDTO.java similarity index 62% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/ProductRecommendPageBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendPageRespDTO.java index 8f596526a..07e512c28 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/ProductRecommendPageBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendPageRespDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.recommend.dto; import lombok.Data; import lombok.experimental.Accessors; @@ -11,12 +11,12 @@ import java.util.List; */ @Data @Accessors(chain = true) -public class ProductRecommendPageBO implements Serializable { +public class ProductRecommendPageRespDTO implements Serializable { /** * ProductRecommend 数组 */ - private List list; + private List list; /** * 总量 */ diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/ProductRecommendBO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendRespDTO.java similarity index 79% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/ProductRecommendBO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendRespDTO.java index 1a25869cc..342802715 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/bo/ProductRecommendBO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendRespDTO.java @@ -1,6 +1,6 @@ -package cn.iocoder.mall.promotion.api.bo; +package cn.iocoder.mall.promotion.api.rpc.recommend.dto; -import cn.iocoder.mall.promotion.api.constant.ProductRecommendTypeEnum; +import cn.iocoder.mall.promotion.api.enums.ProductRecommendTypeEnum; import lombok.Data; import lombok.experimental.Accessors; @@ -12,7 +12,7 @@ import java.util.Date; */ @Data @Accessors(chain = true) -public class ProductRecommendBO implements Serializable { +public class ProductRecommendRespDTO implements Serializable { /** * 编号 diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendUpdateDTO.java b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendUpdateReqDTO.java similarity index 80% rename from promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendUpdateDTO.java rename to promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendUpdateReqDTO.java index b44d6dfc7..0dee22b28 100644 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/dto/ProductRecommendUpdateDTO.java +++ b/promotion-service-project/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/rpc/recommend/dto/ProductRecommendUpdateReqDTO.java @@ -1,7 +1,7 @@ -package cn.iocoder.mall.promotion.api.dto; +package cn.iocoder.mall.promotion.api.rpc.recommend.dto; import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.promotion.api.constant.ProductRecommendTypeEnum; +import cn.iocoder.mall.promotion.api.enums.ProductRecommendTypeEnum; import lombok.Data; import lombok.experimental.Accessors; import org.hibernate.validator.constraints.Length; @@ -14,7 +14,7 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -public class ProductRecommendUpdateDTO implements Serializable { +public class ProductRecommendUpdateReqDTO implements Serializable { @NotNull(message = "编号不能为空") private Integer id; diff --git a/promotion-service-project/promotion-service-app/pom.xml b/promotion-service-project/promotion-service-app/pom.xml new file mode 100644 index 000000000..3c61c34ec --- /dev/null +++ b/promotion-service-project/promotion-service-app/pom.xml @@ -0,0 +1,21 @@ + + + + promotion-service-project + cn.iocoder.mall + 1.0-SNAPSHOT + + 4.0.0 + + promotion-service-app + + + + cn.iocoder.mall + promotion-service-api + + + + \ No newline at end of file diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/BannerService.java b/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/BannerService.java deleted file mode 100644 index bf3a05e9f..000000000 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/BannerService.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.mall.promotion.api; - -import cn.iocoder.common.framework.enums.CommonStatusEnum; -import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.promotion.api.bo.BannerBO; -import cn.iocoder.mall.promotion.api.bo.BannerPageBO; -import cn.iocoder.mall.promotion.api.dto.BannerAddDTO; -import cn.iocoder.mall.promotion.api.dto.BannerPageDTO; -import cn.iocoder.mall.promotion.api.dto.BannerUpdateDTO; - -import java.util.List; - -public interface BannerService { - - List getBannerListByStatus(Integer status); - - BannerPageBO getBannerPage(BannerPageDTO bannerPageDTO); - - BannerBO addBanner(Integer adminId, BannerAddDTO bannerAddDTO); - - Boolean updateBanner(Integer adminId, BannerUpdateDTO bannerUpdateDTO); - - Boolean updateBannerStatus(Integer adminId, Integer bannerId, - @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") Integer status); - - Boolean deleteBanner(Integer adminId, Integer bannerId); - -} diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/ProductRecommendService.java b/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/ProductRecommendService.java deleted file mode 100644 index d173ebc3b..000000000 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/ProductRecommendService.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.mall.promotion.api; - -import cn.iocoder.common.framework.enums.CommonStatusEnum; -import cn.iocoder.common.framework.exception.ServiceException; -import cn.iocoder.common.framework.validator.InEnum; -import cn.iocoder.mall.promotion.api.bo.ProductRecommendBO; -import cn.iocoder.mall.promotion.api.bo.ProductRecommendPageBO; -import cn.iocoder.mall.promotion.api.dto.ProductRecommendAddDTO; -import cn.iocoder.mall.promotion.api.dto.ProductRecommendPageDTO; -import cn.iocoder.mall.promotion.api.dto.ProductRecommendUpdateDTO; - -import java.util.List; - -public interface ProductRecommendService { - - List getProductRecommendList(Integer type, Integer status); - - ProductRecommendPageBO getProductRecommendPage(ProductRecommendPageDTO productRecommendPageDTO); - - ProductRecommendBO addProductRecommend(Integer adminId, ProductRecommendAddDTO productRecommendAddDTO) throws ServiceException; - - Boolean updateProductRecommend(Integer adminId, ProductRecommendUpdateDTO productRecommendUpdateDTO) throws ServiceException; - - Boolean updateProductRecommendStatus(Integer adminId, Integer productRecommendId, - @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}") Integer status) throws ServiceException; - - Boolean deleteProductRecommend(Integer adminId, Integer productRecommendId); - -} diff --git a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/PromotionActivityService.java b/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/PromotionActivityService.java deleted file mode 100644 index 94fa9e0eb..000000000 --- a/promotion/promotion-service-api/src/main/java/cn/iocoder/mall/promotion/api/PromotionActivityService.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.mall.promotion.api; - -import cn.iocoder.mall.promotion.api.bo.PromotionActivityBO; -import cn.iocoder.mall.promotion.api.bo.PromotionActivityPageBO; -import cn.iocoder.mall.promotion.api.dto.PromotionActivityPageDTO; - -import java.util.Collection; -import java.util.List; - -public interface PromotionActivityService { - - List getPromotionActivityListBySpuId(Integer spuId, - Collection activityStatuses); - - List getPromotionActivityListBySpuIds(Collection spuIds, - Collection activityStatuses); - - PromotionActivityPageBO getPromotionActivityPage(PromotionActivityPageDTO promotionActivityPageDTO); - -} diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/config/ServiceExceptionConfiguration.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/config/ServiceExceptionConfiguration.java index 632cb9cd2..8435e0fa7 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/config/ServiceExceptionConfiguration.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/config/ServiceExceptionConfiguration.java @@ -1,7 +1,7 @@ package cn.iocoder.mall.promotion.biz.config; import cn.iocoder.common.framework.util.ServiceExceptionUtil; -import cn.iocoder.mall.promotion.api.constant.PromotionErrorCodeEnum; +import cn.iocoder.mall.promotion.api.enums.PromotionErrorCodeEnum; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.annotation.Configuration; import org.springframework.context.event.EventListener; diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponTemplateDO.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponTemplateDO.java index 4a2489a49..5ddc020a2 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponTemplateDO.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/CouponTemplateDO.java @@ -38,7 +38,7 @@ public class CouponTemplateDO extends BaseDO { /** * 优惠码状态 * - * {@link cn.iocoder.mall.promotion.api.constant.CouponTemplateStatusEnum} + * {@link cn.iocoder.mall.promotion.api.enums.CouponTemplateStatusEnum} * * 当优惠劵(码)开启中,可以手动操作,设置禁用中。 */ diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/ProductRecommendDO.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/ProductRecommendDO.java index 7132427e7..be5e47e88 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/ProductRecommendDO.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/ProductRecommendDO.java @@ -2,7 +2,7 @@ package cn.iocoder.mall.promotion.biz.dataobject; import cn.iocoder.mall.mybatis.core.dataobject.DeletableDO; -import cn.iocoder.mall.promotion.api.constant.ProductRecommendTypeEnum; +import cn.iocoder.mall.promotion.api.enums.ProductRecommendTypeEnum; import lombok.Data; import lombok.experimental.Accessors; diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/PromotionActivityDO.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/PromotionActivityDO.java index e8075556a..e987a7871 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/PromotionActivityDO.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/dataobject/PromotionActivityDO.java @@ -25,7 +25,7 @@ public class PromotionActivityDO extends BaseDO { /** * 活动类型 * - * 参见 {@link cn.iocoder.mall.promotion.api.constant.PromotionActivityTypeEnum} 枚举 + * 参见 {@link cn.iocoder.mall.promotion.api.enums.PromotionActivityTypeEnum} 枚举 */ private Integer activityType; // /** @@ -36,7 +36,7 @@ public class PromotionActivityDO extends BaseDO { /** * 活动状态 * - * 参见 {@link cn.iocoder.mall.promotion.api.constant.PromotionActivityStatusEnum} 枚举 + * 参见 {@link cn.iocoder.mall.promotion.api.enums.PromotionActivityStatusEnum} 枚举 */ private Integer status; /** @@ -165,7 +165,7 @@ public class PromotionActivityDO extends BaseDO { /** * 可用范围的类型 * - * 参见 {@link cn.iocoder.mall.promotion.api.constant.RangeTypeEnum} 枚举 + * 参见 {@link cn.iocoder.mall.promotion.api.enums.RangeTypeEnum} 枚举 * 暂时只用 “所有可用” + “PRODUCT_INCLUDE_PRT” */ private Integer rangeType; diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/BannerServiceImpl.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/BannerServiceImpl.java index 280c1b4fd..3092d7e67 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/BannerServiceImpl.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/BannerServiceImpl.java @@ -6,7 +6,7 @@ import cn.iocoder.mall.mybatis.core.enums.DeletedStatusEnum; import cn.iocoder.mall.promotion.api.BannerService; import cn.iocoder.mall.promotion.api.bo.BannerBO; import cn.iocoder.mall.promotion.api.bo.BannerPageBO; -import cn.iocoder.mall.promotion.api.constant.PromotionErrorCodeEnum; +import cn.iocoder.mall.promotion.api.enums.PromotionErrorCodeEnum; import cn.iocoder.mall.promotion.api.dto.BannerAddDTO; import cn.iocoder.mall.promotion.api.dto.BannerPageDTO; import cn.iocoder.mall.promotion.api.dto.BannerUpdateDTO; diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/CouponServiceImpl.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/CouponServiceImpl.java index 53928c5f3..ab857af28 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/CouponServiceImpl.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/CouponServiceImpl.java @@ -6,7 +6,7 @@ import cn.iocoder.common.framework.util.ServiceExceptionUtil; import cn.iocoder.common.framework.util.StringUtil; import cn.iocoder.mall.promotion.api.CouponService; import cn.iocoder.mall.promotion.api.bo.*; -import cn.iocoder.mall.promotion.api.constant.*; +import cn.iocoder.mall.promotion.api.enums.*; import cn.iocoder.mall.promotion.api.dto.*; import cn.iocoder.mall.promotion.biz.convert.CouponCardConvert; import cn.iocoder.mall.promotion.biz.convert.CouponTemplateConvert; diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/ProductRecommendServiceImpl.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/ProductRecommendServiceImpl.java index a32ad6e1b..d79592218 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/ProductRecommendServiceImpl.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/ProductRecommendServiceImpl.java @@ -7,7 +7,7 @@ import cn.iocoder.mall.product.rpc.api.ProductSpuRpc; import cn.iocoder.mall.promotion.api.ProductRecommendService; import cn.iocoder.mall.promotion.api.bo.ProductRecommendBO; import cn.iocoder.mall.promotion.api.bo.ProductRecommendPageBO; -import cn.iocoder.mall.promotion.api.constant.PromotionErrorCodeEnum; +import cn.iocoder.mall.promotion.api.enums.PromotionErrorCodeEnum; import cn.iocoder.mall.promotion.api.dto.ProductRecommendAddDTO; import cn.iocoder.mall.promotion.api.dto.ProductRecommendPageDTO; import cn.iocoder.mall.promotion.api.dto.ProductRecommendUpdateDTO; diff --git a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/PromotionActivityServiceImpl.java b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/PromotionActivityServiceImpl.java index 3e84a1de3..487a3f1e0 100644 --- a/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/PromotionActivityServiceImpl.java +++ b/promotion/promotion-service-impl/src/main/java/cn/iocoder/mall/promotion/biz/service/PromotionActivityServiceImpl.java @@ -3,8 +3,8 @@ package cn.iocoder.mall.promotion.biz.service; import cn.iocoder.mall.promotion.api.PromotionActivityService; import cn.iocoder.mall.promotion.api.bo.PromotionActivityBO; import cn.iocoder.mall.promotion.api.bo.PromotionActivityPageBO; -import cn.iocoder.mall.promotion.api.constant.PromotionActivityTypeEnum; -import cn.iocoder.mall.promotion.api.constant.RangeTypeEnum; +import cn.iocoder.mall.promotion.api.enums.PromotionActivityTypeEnum; +import cn.iocoder.mall.promotion.api.enums.RangeTypeEnum; import cn.iocoder.mall.promotion.api.dto.PromotionActivityPageDTO; import cn.iocoder.mall.promotion.biz.convert.PromotionActivityConvert; import cn.iocoder.mall.promotion.biz.dao.PromotionActivityMapper; diff --git a/promotion/promotion-service-impl/src/test/java/cn/iocoder/mall/promotion/biz/dao/PromotionActivityMapperTest.java b/promotion/promotion-service-impl/src/test/java/cn/iocoder/mall/promotion/biz/dao/PromotionActivityMapperTest.java index fcc8302bd..8a576e88c 100644 --- a/promotion/promotion-service-impl/src/test/java/cn/iocoder/mall/promotion/biz/dao/PromotionActivityMapperTest.java +++ b/promotion/promotion-service-impl/src/test/java/cn/iocoder/mall/promotion/biz/dao/PromotionActivityMapperTest.java @@ -1,10 +1,10 @@ package cn.iocoder.mall.promotion.biz.dao; import cn.iocoder.common.framework.util.DateUtil; -import cn.iocoder.mall.promotion.api.constant.PreferentialTypeEnum; -import cn.iocoder.mall.promotion.api.constant.PromotionActivityStatusEnum; -import cn.iocoder.mall.promotion.api.constant.PromotionActivityTypeEnum; -import cn.iocoder.mall.promotion.api.constant.RangeTypeEnum; +import cn.iocoder.mall.promotion.api.enums.PreferentialTypeEnum; +import cn.iocoder.mall.promotion.api.enums.PromotionActivityStatusEnum; +import cn.iocoder.mall.promotion.api.enums.PromotionActivityTypeEnum; +import cn.iocoder.mall.promotion.api.enums.RangeTypeEnum; import cn.iocoder.mall.promotion.biz.dataobject.PromotionActivityDO; import org.junit.Ignore; import org.junit.Test; diff --git a/promotion/promotion-start/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsPromotionActivityController.java b/promotion/promotion-start/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsPromotionActivityController.java index 13a83ec92..3a90b3692 100644 --- a/promotion/promotion-start/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsPromotionActivityController.java +++ b/promotion/promotion-start/src/main/java/cn/iocoder/mall/promotion/application/controller/admins/AdminsPromotionActivityController.java @@ -3,7 +3,7 @@ package cn.iocoder.mall.promotion.application.controller.admins; import cn.iocoder.common.framework.vo.CommonResult; import cn.iocoder.mall.promotion.api.PromotionActivityService; import cn.iocoder.mall.promotion.api.bo.PromotionActivityPageBO; -import cn.iocoder.mall.promotion.api.constant.PromotionActivityStatusEnum; +import cn.iocoder.mall.promotion.api.enums.PromotionActivityStatusEnum; import cn.iocoder.mall.promotion.api.dto.PromotionActivityPageDTO; import io.swagger.annotations.Api; import org.apache.dubbo.config.annotation.Reference;