2204A-cyj()
parent
ce1b8f30bd
commit
f91f2c5340
|
@ -1,6 +1,6 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 18080
|
port: 8080
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
|
|
@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,6 +38,7 @@ public class ActivityTeamInfo extends BaseEntity {
|
||||||
* 商品ID
|
* 商品ID
|
||||||
*/
|
*/
|
||||||
private Long productId;
|
private Long productId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品活动图
|
* 商品活动图
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -49,6 +49,8 @@ public class ActivityTeamInfoListModel {
|
||||||
* 拼团商品图片
|
* 拼团商品图片
|
||||||
*/
|
*/
|
||||||
private String productImage;
|
private String productImage;
|
||||||
|
/** 商品id*/
|
||||||
|
private Long productId;
|
||||||
/**
|
/**
|
||||||
* 商品价格
|
* 商品价格
|
||||||
*/
|
*/
|
||||||
|
@ -72,20 +74,20 @@ public class ActivityTeamInfoListModel {
|
||||||
|
|
||||||
|
|
||||||
public static ActivityTeamInfoListModel infoBuild(ActivityTeamInfo activityTeamInfo, Function<ActivityTeamInfoListModelBuilder, ActivityTeamInfoListModel> function) {
|
public static ActivityTeamInfoListModel infoBuild(ActivityTeamInfo activityTeamInfo, Function<ActivityTeamInfoListModelBuilder, ActivityTeamInfoListModel> function) {
|
||||||
ActivityTeamInfoListModel activityTeamInfoListModel = ActivityTeamInfoListModel.builder()
|
// ActivityTeamInfoListModel activityTeamInfoListModel = ActivityTeamInfoListModel.builder()
|
||||||
.id(activityTeamInfo.getId())
|
// .id(activityTeamInfo.getId())
|
||||||
.name(activityTeamInfo.getName())
|
// .name(activityTeamInfo.getName())
|
||||||
// .openTeamNumber(teamOpenTypeNumber)
|
//// .openTeamNumber(teamOpenTypeNumber)
|
||||||
// .addTeamNumber(teamInTypeNumber)
|
//// .addTeamNumber(teamInTypeNumber)
|
||||||
// .attendNumber(teamOpenTypeNumber + teamInTypeNumber)
|
//// .attendNumber(teamOpenTypeNumber + teamInTypeNumber)
|
||||||
.endTime(activityTeamInfo.getEndTime())
|
// .endTime(activityTeamInfo.getEndTime())
|
||||||
.productImage(activityTeamInfo.getProductImage())
|
// .productImage(activityTeamInfo.getProductImage())
|
||||||
// .teamPrice(discountPrice.getTeamPrice())
|
//// .teamPrice(discountPrice.getTeamPrice())
|
||||||
// .productPrice(discountPrice.getProductPrice())
|
//// .productPrice(discountPrice.getProductPrice())
|
||||||
// .teamStock(teamProductStockModel.getTeamStock())
|
//// .teamStock(teamProductStockModel.getTeamStock())
|
||||||
// .remainStock(teamProductStockModel.getRemainStock())
|
//// .remainStock(teamProductStockModel.getRemainStock())
|
||||||
.status(activityTeamInfo.getStatus())
|
// .status(activityTeamInfo.getStatus())
|
||||||
.build();
|
// .build();
|
||||||
return function.apply(
|
return function.apply(
|
||||||
ActivityTeamInfoListModel.builder()
|
ActivityTeamInfoListModel.builder()
|
||||||
.id(activityTeamInfo.getId())
|
.id(activityTeamInfo.getId())
|
||||||
|
|
|
@ -14,6 +14,7 @@ import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -40,6 +41,10 @@ public class ActivityTeamInfoResp extends BaseEntity {
|
||||||
* 商品ID
|
* 商品ID
|
||||||
*/
|
*/
|
||||||
private Long productId;
|
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.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
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.model.ActivityTeamInfoUpdModel;
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
|
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamProductSkuInfoUpdReq;
|
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.ActivityTeamInfoResp;
|
||||||
import com.muyu.marketing.domain.resp.TeamInfoListResp;
|
import com.muyu.marketing.domain.resp.TeamInfoListResp;
|
||||||
import com.muyu.marketing.team.service.ActivityTeamInfoService;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 营销团购活动控制层
|
* 营销团购活动控制层
|
||||||
*
|
*
|
||||||
|
@ -97,5 +95,8 @@ public class ActivityTeamController {
|
||||||
activityTeamInfoService.updateTeamInfo(activityTeamInfoUpdModel);
|
activityTeamInfoService.updateTeamInfo(activityTeamInfoUpdModel);
|
||||||
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,14 +38,42 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<ActivityTeamInfoListModel> query(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel) {
|
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<>();
|
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getKeyWord()), ActivityTeamInfo::getName, activityTeamInfoListQueryModel.getKeyWord());
|
queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getKeyWord()), ActivityTeamInfo::getName, activityTeamInfoListQueryModel.getKeyWord());
|
||||||
queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getStatus()), ActivityTeamInfo::getStatus, activityTeamInfoListQueryModel.getStatus());
|
queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getStatus()), ActivityTeamInfo::getStatus, activityTeamInfoListQueryModel.getStatus());
|
||||||
|
|
||||||
/**
|
|
||||||
* Object<T> -> 创建对象的时候进行的占用
|
|
||||||
* <T> Result<T> 以方法返回值为占用
|
|
||||||
*/
|
|
||||||
Page<ActivityTeamInfo> activityTeamInfoPage = this.page(activityTeamInfoListQueryModel.buildPage(), queryWrapper);
|
Page<ActivityTeamInfo> activityTeamInfoPage = this.page(activityTeamInfoListQueryModel.buildPage(), queryWrapper);
|
||||||
List<ActivityTeamInfo> activityTeamInfoList = activityTeamInfoPage.getRecords();
|
List<ActivityTeamInfo> activityTeamInfoList = activityTeamInfoPage.getRecords();
|
||||||
List<ActivityTeamInfoListModel> activityTeamInfoListModels = activityTeamInfoList.stream()
|
List<ActivityTeamInfoListModel> activityTeamInfoListModels = activityTeamInfoList.stream()
|
||||||
|
@ -64,6 +92,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
||||||
.productPrice(discountPrice.getProductPrice())
|
.productPrice(discountPrice.getProductPrice())
|
||||||
.teamStock(teamProductStockModel.getTeamStock())
|
.teamStock(teamProductStockModel.getTeamStock())
|
||||||
.remainStock(teamProductStockModel.getRemainStock())
|
.remainStock(teamProductStockModel.getRemainStock())
|
||||||
|
.productId(activityTeamInfo.getProductId())
|
||||||
.build();
|
.build();
|
||||||
})).toList();
|
})).toList();
|
||||||
TableDataInfo<ActivityTeamInfoListModel> tableDataInfo = new TableDataInfo<>();
|
TableDataInfo<ActivityTeamInfoListModel> tableDataInfo = new TableDataInfo<>();
|
||||||
|
|
|
@ -121,11 +121,13 @@ public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityT
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean update(ActivityTeamProductSkuUpdModel activityTeamProductSkuUpdModel) {
|
public boolean update(ActivityTeamProductSkuUpdModel activityTeamProductSkuUpdModel) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean batchUpdate(List<ActivityTeamProductSkuUpdModel> activityTeamProductSkuUpdModelList) {
|
public boolean batchUpdate(List<ActivityTeamProductSkuUpdModel> activityTeamProductSkuUpdModelList) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue