2204A-cyj()
parent
ce1b8f30bd
commit
f91f2c5340
|
@ -1,6 +1,6 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 18080
|
||||
port: 8080
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
|
|
|
@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -37,6 +38,7 @@ public class ActivityTeamInfo extends BaseEntity {
|
|||
* 商品ID
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 商品活动图
|
||||
*/
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* 商品活动图
|
||||
|
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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<>();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue