diff --git a/muyu-gateway/src/main/resources/bootstrap.yml b/muyu-gateway/src/main/resources/bootstrap.yml index c0f43fb..99db46b 100644 --- a/muyu-gateway/src/main/resources/bootstrap.yml +++ b/muyu-gateway/src/main/resources/bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 18080 + port: 8080 # Spring spring: diff --git a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamInfo.java b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamInfo.java index 416475f..1ccaec4 100644 --- a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamInfo.java +++ b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/ActivityTeamInfo.java @@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import java.math.BigDecimal; import java.util.Date; /** @@ -37,7 +38,8 @@ public class ActivityTeamInfo extends BaseEntity { * 商品ID */ private Long productId; - /** + + /** * 商品活动图 */ private String productImage; diff --git a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/model/ActivityTeamInfoListModel.java b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/model/ActivityTeamInfoListModel.java index 7aac25d..37b3df9 100644 --- a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/model/ActivityTeamInfoListModel.java +++ b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/model/ActivityTeamInfoListModel.java @@ -49,6 +49,8 @@ public class ActivityTeamInfoListModel { * 拼团商品图片 */ private String productImage; + /** 商品id*/ + private Long productId; /** * 商品价格 */ @@ -72,20 +74,20 @@ public class ActivityTeamInfoListModel { public static ActivityTeamInfoListModel infoBuild(ActivityTeamInfo activityTeamInfo, Function function) { - ActivityTeamInfoListModel activityTeamInfoListModel = ActivityTeamInfoListModel.builder() - .id(activityTeamInfo.getId()) - .name(activityTeamInfo.getName()) -// .openTeamNumber(teamOpenTypeNumber) -// .addTeamNumber(teamInTypeNumber) -// .attendNumber(teamOpenTypeNumber + teamInTypeNumber) - .endTime(activityTeamInfo.getEndTime()) - .productImage(activityTeamInfo.getProductImage()) -// .teamPrice(discountPrice.getTeamPrice()) -// .productPrice(discountPrice.getProductPrice()) -// .teamStock(teamProductStockModel.getTeamStock()) -// .remainStock(teamProductStockModel.getRemainStock()) - .status(activityTeamInfo.getStatus()) - .build(); +// ActivityTeamInfoListModel activityTeamInfoListModel = ActivityTeamInfoListModel.builder() +// .id(activityTeamInfo.getId()) +// .name(activityTeamInfo.getName()) +//// .openTeamNumber(teamOpenTypeNumber) +//// .addTeamNumber(teamInTypeNumber) +//// .attendNumber(teamOpenTypeNumber + teamInTypeNumber) +// .endTime(activityTeamInfo.getEndTime()) +// .productImage(activityTeamInfo.getProductImage()) +//// .teamPrice(discountPrice.getTeamPrice()) +//// .productPrice(discountPrice.getProductPrice()) +//// .teamStock(teamProductStockModel.getTeamStock()) +//// .remainStock(teamProductStockModel.getRemainStock()) +// .status(activityTeamInfo.getStatus()) +// .build(); return function.apply( ActivityTeamInfoListModel.builder() .id(activityTeamInfo.getId()) diff --git a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/resp/ActivityTeamInfoResp.java b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/resp/ActivityTeamInfoResp.java index 9172e46..13addd5 100644 --- a/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/resp/ActivityTeamInfoResp.java +++ b/muyu-modules/muyu-marketing/marketing-common/src/main/java/com/muyu/marketing/domain/resp/ActivityTeamInfoResp.java @@ -14,6 +14,7 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -40,6 +41,10 @@ public class ActivityTeamInfoResp extends BaseEntity { * 商品ID */ private Long productId; + /** + * 商品价格 + */ + private BigDecimal productPrice; /** * 商品活动图 diff --git a/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/MuYuMarketIngApplication.java b/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/MuYuMarketIngApplication.java index de0a3db..7c9fcd9 100644 --- a/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/MuYuMarketIngApplication.java +++ b/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/MuYuMarketIngApplication.java @@ -15,7 +15,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @EnableCustomSwagger2 @EnableMyFeignClients @SpringBootApplication -public class MuYuMarketIngApplication { +public class MuYuMarketIngApplication { public static void main (String[] args) { SpringApplication.run(MuYuMarketIngApplication.class, args); } diff --git a/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/controller/ActivityTeamController.java b/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/controller/ActivityTeamController.java index 283f5a5..5752469 100644 --- a/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/controller/ActivityTeamController.java +++ b/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/controller/ActivityTeamController.java @@ -7,7 +7,6 @@ import com.muyu.common.core.utils.PageUtils; import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel; import com.muyu.marketing.domain.model.ActivityTeamInfoListModel; -import com.muyu.marketing.domain.model.ActivityTeamInfoSelectModel; import com.muyu.marketing.domain.model.ActivityTeamInfoUpdModel; import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq; import com.muyu.marketing.domain.req.ActivityTeamProductSkuInfoUpdReq; @@ -15,12 +14,11 @@ import com.muyu.marketing.domain.req.TeamInfoListReq; import com.muyu.marketing.domain.resp.ActivityTeamInfoResp; import com.muyu.marketing.domain.resp.TeamInfoListResp; import com.muyu.marketing.team.service.ActivityTeamInfoService; -import io.swagger.v3.oas.annotations.security.OAuthScope; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; - import java.util.List; + /** * 营销团购活动控制层 * @@ -97,5 +95,8 @@ public class ActivityTeamController { activityTeamInfoService.updateTeamInfo(activityTeamInfoUpdModel); return Result.success(); + } + + } diff --git a/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/service/impl/ActivityTeamInfoServiceImpl.java b/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/service/impl/ActivityTeamInfoServiceImpl.java index f36aeb5..b80ac57 100644 --- a/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/service/impl/ActivityTeamInfoServiceImpl.java +++ b/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/service/impl/ActivityTeamInfoServiceImpl.java @@ -38,14 +38,42 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl query(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel) { +// LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); +// queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getKeyWord()), ActivityTeamInfo::getName, activityTeamInfoListQueryModel.getKeyWord()); +// queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getStatus()), ActivityTeamInfo::getStatus, activityTeamInfoListQueryModel.getStatus()); +// +// /** +// * Object -> 创建对象的时候进行的占用 +// * Result 以方法返回值为占用 +// */ +// Page activityTeamInfoPage = this.page(activityTeamInfoListQueryModel.buildPage(), queryWrapper); +// List activityTeamInfoList = activityTeamInfoPage.getRecords(); +// List activityTeamInfoListModels = activityTeamInfoList.stream() +// .map(activityTeamInfo -> ActivityTeamInfoListModel.infoBuild(activityTeamInfo, +// (activityTeamInfoListModelBuilder) -> { +// TeamProductDiscountPriceModel discountPrice = activityTeamProductSkuInfoService.getDiscountPrice(activityTeamInfo.getId()); +// TeamProductStockModel teamProductStockModel = activityTeamProductSkuInfoService.getStock(activityTeamInfo.getId()); +// Long teamOpenTypeNumber = activityTeamOpenInfoService.getTeamOpenTypeNumberByTeamId(activityTeamInfo.getId()); +// Long teamInTypeNumber = activityTeamOpenInfoService.getTeamInTypeNumberByTeamId(activityTeamInfo.getId()); +// +// return activityTeamInfoListModelBuilder +// .openTeamNumber(teamOpenTypeNumber) +// .addTeamNumber(teamInTypeNumber) +// .attendNumber(teamOpenTypeNumber + teamInTypeNumber) +// .teamPrice(discountPrice.getTeamPrice()) +// .productPrice(discountPrice.getProductPrice()) +// .teamStock(teamProductStockModel.getTeamStock()) +// .remainStock(teamProductStockModel.getRemainStock()) +// .build(); +// })).toList(); +// TableDataInfo tableDataInfo = new TableDataInfo<>(); +// tableDataInfo.setTotal(activityTeamInfoPage.getTotal()); +// tableDataInfo.setRows(activityTeamInfoListModels); +// return tableDataInfo; LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getKeyWord()), ActivityTeamInfo::getName, activityTeamInfoListQueryModel.getKeyWord()); queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getStatus()), ActivityTeamInfo::getStatus, activityTeamInfoListQueryModel.getStatus()); - /** - * Object -> 创建对象的时候进行的占用 - * Result 以方法返回值为占用 - */ Page activityTeamInfoPage = this.page(activityTeamInfoListQueryModel.buildPage(), queryWrapper); List activityTeamInfoList = activityTeamInfoPage.getRecords(); List activityTeamInfoListModels = activityTeamInfoList.stream() @@ -64,6 +92,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl tableDataInfo = new TableDataInfo<>(); diff --git a/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/service/impl/ActivityTeamProductSkuInfoServiceImpl.java b/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/service/impl/ActivityTeamProductSkuInfoServiceImpl.java index 89c25ee..5af4940 100644 --- a/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/service/impl/ActivityTeamProductSkuInfoServiceImpl.java +++ b/muyu-modules/muyu-marketing/marketing-server/src/main/java/com/muyu/marketing/team/service/impl/ActivityTeamProductSkuInfoServiceImpl.java @@ -121,11 +121,13 @@ public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl activityTeamProductSkuUpdModelList) { + return false; }