Compare commits
8 Commits
master
...
1127/wanwe
Author | SHA1 | Date |
---|---|---|
|
f67ba1f1a7 | |
|
2ebe6221c4 | |
|
dd88dad4f2 | |
|
30b6a2bf67 | |
|
49be23d2b6 | |
|
e8a433bacd | |
|
e0f9840709 | |
|
090cf65bbe |
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
{
|
||||||
|
"商品ID": "Long",
|
||||||
|
"商品活动图片": "String",
|
||||||
|
"活动名称": "String",
|
||||||
|
"活动简介": "String",
|
||||||
|
"商品单位": "String",
|
||||||
|
"商品的轮播图": [
|
||||||
|
"String", "String"
|
||||||
|
],
|
||||||
|
"活动结束时间": "date",
|
||||||
|
"活动状态": "String",
|
||||||
|
"策略类型": "String",
|
||||||
|
"策略ID": "Long",
|
||||||
|
"商品规格List": [
|
||||||
|
{
|
||||||
|
"规格ID": "Long",
|
||||||
|
"商品ID": "Long",
|
||||||
|
"规格SKU": "String",
|
||||||
|
"拼团价格": "BigDecimal",
|
||||||
|
"拼团库存": "Long"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"排序": "Integer",
|
||||||
|
"详情": "String"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,3 +45,30 @@ activity_team_product_sku_info.product_sku(商品SKU) <- ActivityTeamProductSkuI
|
||||||
activity_team_product_sku_info.team_stock(拼团库存) <- ActivityTeamProductSkuInfo.teamStock <- @商品规格.拼团库存
|
activity_team_product_sku_info.team_stock(拼团库存) <- ActivityTeamProductSkuInfo.teamStock <- @商品规格.拼团库存
|
||||||
activity_team_product_sku_info.remain_stock(剩余库存) <- ActivityTeamProductSkuInfo.remainStock <- @商品规格.拼团库存
|
activity_team_product_sku_info.remain_stock(剩余库存) <- ActivityTeamProductSkuInfo.remainStock <- @商品规格.拼团库存
|
||||||
activity_team_product_sku_info.team_price(拼团价格) <- ActivityTeamProductSkuInfo.teamPrice <- @商品规格.拼团价格
|
activity_team_product_sku_info.team_price(拼团价格) <- ActivityTeamProductSkuInfo.teamPrice <- @商品规格.拼团价格
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"code": 0,
|
||||||
|
"msg": "string",
|
||||||
|
"data": {
|
||||||
|
"rows": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"name": "string",
|
||||||
|
"productImage": "string",
|
||||||
|
"productPrice": "string",
|
||||||
|
"teamPrice": "string",
|
||||||
|
"attendNumber": "string",
|
||||||
|
"openTeamNumber": "string",
|
||||||
|
"teamStock": "string",
|
||||||
|
"remainStock": "string",
|
||||||
|
"endTime": "string",
|
||||||
|
"status": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"total": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 8080
|
port: 18080
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
@ -28,12 +30,13 @@ spring:
|
||||||
eager: true
|
eager: true
|
||||||
transport:
|
transport:
|
||||||
# 控制台地址
|
# 控制台地址
|
||||||
dashboard: 127.0.0.1:8718
|
dashboard: 113.44.45.42:8718
|
||||||
# nacos配置持久化
|
# nacos配置持久化
|
||||||
datasource:
|
datasource:
|
||||||
ds1:
|
ds1:
|
||||||
nacos:
|
nacos:
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
dataId: sentinel-muyu-gateway
|
dataId: sentinel-muyu-gateway
|
||||||
groupId: DEFAULT_GROUP
|
groupId: DEFAULT_GROUP
|
||||||
data-type: json
|
data-type: json
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -74,11 +74,6 @@ public class ActivityTeamInfo extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private long strategyId;
|
private long strategyId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 公共添加模型,转换成添加对象
|
|
||||||
* @param activityTeamInfoAddModel 添加模型
|
|
||||||
* @return 添加对象
|
|
||||||
*/
|
|
||||||
public static ActivityTeamInfo addModelBuild(ActivityTeamInfoAddModel activityTeamInfoAddModel){
|
public static ActivityTeamInfo addModelBuild(ActivityTeamInfoAddModel activityTeamInfoAddModel){
|
||||||
return ActivityTeamInfo.builder()
|
return ActivityTeamInfo.builder()
|
||||||
.name(activityTeamInfoAddModel.getName())
|
.name(activityTeamInfoAddModel.getName())
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class ActivityTeamProductSkuInfo extends BaseEntity {
|
||||||
private BigDecimal teamPrice;
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过模型钢构件对象
|
* 通过模型钢构件对象taskkill /t /f /im
|
||||||
* @param activityTeamProductSkuAddModel 模型
|
* @param activityTeamProductSkuAddModel 模型
|
||||||
* @return 对象
|
* @return 对象
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -10,7 +10,6 @@ import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 团购活动添加模型
|
* 团购活动添加模型
|
||||||
|
@ -80,7 +79,7 @@ public class ActivityTeamInfoAddModel {
|
||||||
*/
|
*/
|
||||||
private Long strategyId;
|
private Long strategyId;
|
||||||
|
|
||||||
public static ActivityTeamInfoAddModel addReqBuild (ActivityTeamInfoSaveReq activityTeamInfoSaveReq){
|
public static ActivityTeamInfoAddModel saveTeamInfoBuild(ActivityTeamInfoSaveReq activityTeamInfoSaveReq){
|
||||||
return ActivityTeamInfoAddModel.builder()
|
return ActivityTeamInfoAddModel.builder()
|
||||||
.name(activityTeamInfoSaveReq.getName())
|
.name(activityTeamInfoSaveReq.getName())
|
||||||
.productId(activityTeamInfoSaveReq.getProductId())
|
.productId(activityTeamInfoSaveReq.getProductId())
|
||||||
|
@ -95,10 +94,14 @@ public class ActivityTeamInfoAddModel {
|
||||||
.strategyType(activityTeamInfoSaveReq.getStrategyType())
|
.strategyType(activityTeamInfoSaveReq.getStrategyType())
|
||||||
.strategyId(activityTeamInfoSaveReq.getStrategyId())
|
.strategyId(activityTeamInfoSaveReq.getStrategyId())
|
||||||
.activityTeamProductSkuAddModelList(
|
.activityTeamProductSkuAddModelList(
|
||||||
activityTeamInfoSaveReq.getTeamProjectSkuInfoAddReqList()
|
activityTeamInfoSaveReq.getProjectSkuInfoAddReqList()
|
||||||
.stream()
|
.stream()
|
||||||
.map(addReq -> ActivityTeamProductSkuAddModel.addReqBuild(addReq, activityTeamInfoSaveReq::getProductId))
|
.map(projectSkuInfoAddReq ->ActivityTeamProductSkuAddModel.addReqBulid(projectSkuInfoAddReq, activityTeamInfoSaveReq::getProductId)).toList()
|
||||||
.toList()
|
|
||||||
).build();
|
).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,101 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
||||||
|
import com.muyu.marketing.domain.resp.ActivityTeamInfoDaitlResp;
|
||||||
|
import com.muyu.marketing.domain.resp.TeamProjectSkuInfoResp;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class ActivityTeamInfoDaitlRespModel extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 活动id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 拼团名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
private Long productId;
|
||||||
|
/**
|
||||||
|
* 商品活动图
|
||||||
|
*/
|
||||||
|
private String productImage;
|
||||||
|
/**
|
||||||
|
* 活动简介
|
||||||
|
*/
|
||||||
|
private String introduction;
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
private String unit;
|
||||||
|
/**
|
||||||
|
* 轮播图
|
||||||
|
*/
|
||||||
|
private String imageList;
|
||||||
|
/**
|
||||||
|
* 活动结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||||
|
private Date endTime;
|
||||||
|
/**
|
||||||
|
* 活动排序
|
||||||
|
*/
|
||||||
|
private Long sort;
|
||||||
|
/**
|
||||||
|
* 商品SkU集合
|
||||||
|
*/
|
||||||
|
private List<TeamProjectSkuInfoResp> projectSkuInfoAddReqList;
|
||||||
|
/**
|
||||||
|
* 活动详情
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
/**
|
||||||
|
* 活动状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 策略类型
|
||||||
|
*/
|
||||||
|
private String strategyType;
|
||||||
|
/**
|
||||||
|
* 策略ID
|
||||||
|
*/
|
||||||
|
private Long strategyId;
|
||||||
|
//
|
||||||
|
// public static ActivityTeamInfoDaitlRespModel findById(ActivityTeamInfo activityTeamInfo, List<ActivityTeamProductSkuInfoModel> teamProductSkuInfoModelList){
|
||||||
|
// return ActivityTeamInfoDaitlRespModel.builder()
|
||||||
|
// .id(activityTeamInfo.getId())
|
||||||
|
// .name(activityTeamInfo.getName())
|
||||||
|
// .productId(activityTeamInfo.getProductId())
|
||||||
|
// .productImage(activityTeamInfo.getProductImage())
|
||||||
|
// .introduction(activityTeamInfo.getIntroduction())
|
||||||
|
// .unit(activityTeamInfo.getUnit())
|
||||||
|
// .imageList(activityTeamInfo.getImageList())
|
||||||
|
// .endTime(activityTeamInfo.getEndTime())
|
||||||
|
// .sort(activityTeamInfo.getSort())
|
||||||
|
// .projectSkuInfoAddReqList(teamProductSkuInfoModelList)
|
||||||
|
// .content(activityTeamInfo.getContent())
|
||||||
|
// .status(activityTeamInfo.getStatus())
|
||||||
|
// .strategyType(activityTeamInfo.getStrategyType())
|
||||||
|
// .strategyId(activityTeamInfo.getStrategyId())
|
||||||
|
// .build();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -8,7 +8,6 @@ import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,12 +47,12 @@ public class ActivityTeamProductSkuAddModel {
|
||||||
*/
|
*/
|
||||||
private Long teamStock;
|
private Long teamStock;
|
||||||
|
|
||||||
public static ActivityTeamProductSkuAddModel addReqBuild(TeamProjectSkuInfoAddReq teamProjectSkuInfoAddReq, Supplier<Long> productId){
|
public static ActivityTeamProductSkuAddModel addReqBulid(TeamProjectSkuInfoAddReq teamProjectSkuInfoAddReq, Supplier<Long> productId){
|
||||||
return ActivityTeamProductSkuAddModel.builder()
|
return ActivityTeamProductSkuAddModel.builder()
|
||||||
.productId(productId.get())
|
.productId(productId.get())
|
||||||
.sku(teamProjectSkuInfoAddReq.getSku())
|
.sku(teamProjectSkuInfoAddReq.getSku())
|
||||||
.teamStock(teamProjectSkuInfoAddReq.getTeamStock())
|
|
||||||
.teamPrice(teamProjectSkuInfoAddReq.getTeamPrice())
|
.teamPrice(teamProjectSkuInfoAddReq.getTeamPrice())
|
||||||
|
.teamStock(teamProjectSkuInfoAddReq.getTeamStock())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class ActivityTeamInfoSaveReq extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 商品SkU集合
|
* 商品SkU集合
|
||||||
*/
|
*/
|
||||||
private List<TeamProjectSkuInfoAddReq> teamProjectSkuInfoAddReqList;
|
private List<TeamProjectSkuInfoAddReq> projectSkuInfoAddReqList;
|
||||||
/**
|
/**
|
||||||
* 活动详情
|
* 活动详情
|
||||||
*/
|
*/
|
||||||
|
@ -72,4 +72,11 @@ public class ActivityTeamInfoSaveReq extends BaseEntity {
|
||||||
* 策略ID
|
* 策略ID
|
||||||
*/
|
*/
|
||||||
private Long strategyId;
|
private Long strategyId;
|
||||||
|
|
||||||
|
public static ActivityTeamInfoSaveReq saveSkuInfosBuild(ActivityTeamInfoSaveReq activityTeamInfoSaveReq){
|
||||||
|
return ActivityTeamInfoSaveReq.builder()
|
||||||
|
.projectSkuInfoAddReqList(activityTeamInfoSaveReq.getProjectSkuInfoAddReqList())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,15 +3,10 @@ package com.muyu.marketing.domain.req;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加的
|
|
||||||
*/
|
|
||||||
@Data
|
@Data
|
||||||
@SuperBuilder
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class TeamProjectSkuInfoAddReq {
|
public class TeamProjectSkuInfoAddReq {
|
||||||
|
@ -21,6 +16,7 @@ public class TeamProjectSkuInfoAddReq {
|
||||||
*/
|
*/
|
||||||
private String sku;
|
private String sku;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼团价格
|
* 拼团价格
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
package com.muyu.marketing.domain.resp;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class ActivityTeamInfoDaitlResp extends BaseEntity {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动id
|
||||||
|
*/
|
||||||
|
private Long teamId;
|
||||||
|
/**
|
||||||
|
* 拼团名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
private Long productId;
|
||||||
|
/**
|
||||||
|
* 商品活动图
|
||||||
|
*/
|
||||||
|
private String productImage;
|
||||||
|
/**
|
||||||
|
* 活动简介
|
||||||
|
*/
|
||||||
|
private String introduction;
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String unit;
|
||||||
|
/**
|
||||||
|
* 轮播图
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String imageList;
|
||||||
|
/**
|
||||||
|
* 活动结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||||
|
private Date endTime;
|
||||||
|
/**
|
||||||
|
* 活动排序
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
/**
|
||||||
|
* 商品SkU集合
|
||||||
|
*/
|
||||||
|
private List<TeamProjectSkuInfoAddReq> projectSkuInfoAddReqList;
|
||||||
|
/**
|
||||||
|
* 活动详情
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
/**
|
||||||
|
* 活动状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 策略类型
|
||||||
|
*/
|
||||||
|
private String strategyType;
|
||||||
|
/**
|
||||||
|
* 策略ID
|
||||||
|
*/
|
||||||
|
private Long strategyId;
|
||||||
|
|
||||||
|
public static ActivityTeamInfoDaitlResp saveSkuInfosBuild(ActivityTeamInfoDaitlResp activityTeamInfoSaveReq){
|
||||||
|
return ActivityTeamInfoDaitlResp.builder()
|
||||||
|
.projectSkuInfoAddReqList(activityTeamInfoSaveReq.getProjectSkuInfoAddReqList())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.muyu.marketing.domain.resp;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TeamProjectSkuInfoResp {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动id
|
||||||
|
*/
|
||||||
|
private Long teamId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格SKU
|
||||||
|
*/
|
||||||
|
private String sku;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团价格
|
||||||
|
*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
}
|
|
@ -12,6 +12,7 @@ import com.muyu.marketing.domain.req.TeamInfoListReq;
|
||||||
import com.muyu.marketing.domain.resp.TeamInfoFindByIdResp;
|
import com.muyu.marketing.domain.resp.TeamInfoFindByIdResp;
|
||||||
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 lombok.extern.slf4j.Slf4j;
|
||||||
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.*;
|
||||||
|
|
||||||
|
@ -23,6 +24,7 @@ import java.util.List;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-11-20 14:25
|
* @date 2024-11-20 14:25
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/team")
|
@RequestMapping("/team")
|
||||||
public class ActivityTeamController {
|
public class ActivityTeamController {
|
||||||
|
@ -47,15 +49,9 @@ public class ActivityTeamController {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/save")
|
||||||
/**
|
public Result save(@RequestBody ActivityTeamInfoSaveReq activityTeamInfoSaveReq){
|
||||||
* 添加团购活动
|
activityTeamInfoService.save(ActivityTeamInfoAddModel.saveTeamInfoBuild(activityTeamInfoSaveReq));
|
||||||
* @param activityTeamInfoSaveReq 添加请求对象
|
|
||||||
* @return 结果集
|
|
||||||
*/
|
|
||||||
@PostMapping
|
|
||||||
public Result<String> save(@RequestBody ActivityTeamInfoSaveReq activityTeamInfoSaveReq) {
|
|
||||||
activityTeamInfoService.save(ActivityTeamInfoAddModel.addReqBuild(activityTeamInfoSaveReq));
|
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
||||||
return tableDataInfo;
|
return tableDataInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过添加模型,去进行商品拼团活动的操作
|
* 通过添加模型,去进行商品拼团活动的操作
|
||||||
*
|
*
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -16,10 +16,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 113.44.45.42:8848
|
||||||
|
namespace: www-mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
Loading…
Reference in New Issue