2204A-cyj()

1127/chengyingjie
成英杰 2024-12-02 20:59:33 +08:00
parent ce1b8f30bd
commit f91f2c5340
8 changed files with 65 additions and 24 deletions

View File

@ -1,6 +1,6 @@
# Tomcat
server:
port: 18080
port: 8080
# Spring
spring:

View File

@ -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;

View File

@ -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<ActivityTeamInfoListModelBuilder, ActivityTeamInfoListModel> 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())

View File

@ -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;
/**
*

View File

@ -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);
}

View File

@ -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();
}
}

View File

@ -38,14 +38,42 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
@Override
public TableDataInfo<ActivityTeamInfoListModel> query(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel) {
// LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
// queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getKeyWord()), ActivityTeamInfo::getName, activityTeamInfoListQueryModel.getKeyWord());
// queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getStatus()), ActivityTeamInfo::getStatus, activityTeamInfoListQueryModel.getStatus());
//
// /**
// * Object<T> -> 创建对象的时候进行的占用
// * <T> Result<T> 以方法返回值为占用
// */
// Page<ActivityTeamInfo> activityTeamInfoPage = this.page(activityTeamInfoListQueryModel.buildPage(), queryWrapper);
// List<ActivityTeamInfo> activityTeamInfoList = activityTeamInfoPage.getRecords();
// List<ActivityTeamInfoListModel> 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<ActivityTeamInfoListModel> tableDataInfo = new TableDataInfo<>();
// tableDataInfo.setTotal(activityTeamInfoPage.getTotal());
// tableDataInfo.setRows(activityTeamInfoListModels);
// return tableDataInfo;
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getKeyWord()), ActivityTeamInfo::getName, activityTeamInfoListQueryModel.getKeyWord());
queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getStatus()), ActivityTeamInfo::getStatus, activityTeamInfoListQueryModel.getStatus());
/**
* Object<T> ->
* <T> Result<T>
*/
Page<ActivityTeamInfo> activityTeamInfoPage = this.page(activityTeamInfoListQueryModel.buildPage(), queryWrapper);
List<ActivityTeamInfo> activityTeamInfoList = activityTeamInfoPage.getRecords();
List<ActivityTeamInfoListModel> activityTeamInfoListModels = activityTeamInfoList.stream()
@ -64,6 +92,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
.productPrice(discountPrice.getProductPrice())
.teamStock(teamProductStockModel.getTeamStock())
.remainStock(teamProductStockModel.getRemainStock())
.productId(activityTeamInfo.getProductId())
.build();
})).toList();
TableDataInfo<ActivityTeamInfoListModel> tableDataInfo = new TableDataInfo<>();

View File

@ -121,11 +121,13 @@ public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityT
@Override
public boolean update(ActivityTeamProductSkuUpdModel activityTeamProductSkuUpdModel) {
return false;
}
@Override
public boolean batchUpdate(List<ActivityTeamProductSkuUpdModel> activityTeamProductSkuUpdModelList) {
return false;
}