Compare commits
1 Commits
master
...
1125/mengf
Author | SHA1 | Date |
---|---|---|
|
3dff9951a6 |
|
@ -1,24 +1,26 @@
|
||||||
$.{
|
{
|
||||||
"活动ID": "Long",
|
"主键":"id",
|
||||||
"商品ID": "Long", //activity_team_info.product_id
|
"活动名称":"name",
|
||||||
"商品图片": "String",
|
|
||||||
"活动名称": "String",
|
"商品活动图":"productImage",
|
||||||
"活动简介": "String",
|
"活动简介":"introduction",
|
||||||
"商品单位": "String",
|
"单位":"unit",
|
||||||
"商品的轮播图": [
|
"轮播图":"imageList",
|
||||||
"String", "String"
|
"活动详情":"content",
|
||||||
],
|
"活动结束时间":"end_time",
|
||||||
"活动时间": "date",
|
"策略类型":"strategyType",
|
||||||
"策略类型": "String",
|
"策略":{
|
||||||
"策略ID": "Long",
|
"持续时间":"duration"
|
||||||
"商品规格List": [ // activity_team_product_sku_info
|
"免单人数":"exemption_number"
|
||||||
|
"最大购买量":"max_buy"
|
||||||
|
"单次购买量":"one_buy"
|
||||||
|
},
|
||||||
|
"sku":[
|
||||||
{
|
{
|
||||||
"活动商品规格ID": "Long",
|
"规格id":"id",
|
||||||
"规格SKU": "String", // activity_team_product_sku_info.product_sku
|
"商品SKU":"product_sku",
|
||||||
"拼团价格": "BigDecimal",
|
"剩余库存":"remain_stock",
|
||||||
"拼团库存": "Long"
|
"拼团价格":"team_price",
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"排序": "Integer",
|
}
|
||||||
"详情": "String"
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
"活动ID": "Long",
|
|
||||||
"商品ID": "Long",
|
|
||||||
"活动名称": "String",
|
|
||||||
"商品名称": "String",
|
|
||||||
"商品图片": "String",
|
|
||||||
"活动简介": "String",
|
|
||||||
"商品单位": "String",
|
|
||||||
"商品的轮播图": [
|
|
||||||
"String", "String"
|
|
||||||
],
|
|
||||||
"活动时间": "date",
|
|
||||||
"策略类型": "String",
|
|
||||||
"商品规格": {
|
|
||||||
"修改商品规格List": [ // 修改
|
|
||||||
{
|
|
||||||
"团购规格ID": "Long",
|
|
||||||
"拼团价格": "BigDecimal",
|
|
||||||
"拼团库存": "Long"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"删除商品规格IdList" : ["Long", "Long"],
|
|
||||||
"添加商品规格List": [
|
|
||||||
"商品SKU": "String",
|
|
||||||
"商品价格": "BigDecimal",
|
|
||||||
"拼团价格": "BigDecimal",
|
|
||||||
"拼团库存": "Long"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
"详情": "String"
|
|
||||||
}
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
@ -33,7 +35,8 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
ds1:
|
ds1:
|
||||||
nacos:
|
nacos:
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: 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: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -5,8 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoSaveModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoEditModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoUpdModel;
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@ -96,37 +95,25 @@ public class ActivityTeamInfo extends BaseEntity {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ActivityTeamInfo teamSaveBuild(ActivityTeamInfoSaveModel activityTeamInfoSaveModel) {
|
/**
|
||||||
return ActivityTeamInfo.builder()
|
* 公共修改模型 转换成修改对象
|
||||||
.name(activityTeamInfoSaveModel.getName())
|
* @param activityTeamInfoEditModel
|
||||||
.productId(activityTeamInfoSaveModel.getProductId())
|
*/
|
||||||
.productImage(activityTeamInfoSaveModel.getProductImage())
|
public static ActivityTeamInfo editBuild(ActivityTeamInfoEditModel activityTeamInfoEditModel) {
|
||||||
.introduction(activityTeamInfoSaveModel.getIntroduction())
|
return ActivityTeamInfo.builder()
|
||||||
.unit(activityTeamInfoSaveModel.getUnit())
|
.name(activityTeamInfoEditModel.getName())
|
||||||
.imageList(activityTeamInfoSaveModel.getImageList())
|
.unit(activityTeamInfoEditModel.getUnit())
|
||||||
.endTime(activityTeamInfoSaveModel.getEndTime())
|
.status(activityTeamInfoEditModel.getStatus())
|
||||||
.sort(activityTeamInfoSaveModel.getSort())
|
.productId(activityTeamInfoEditModel.getProductId())
|
||||||
.content(activityTeamInfoSaveModel.getContent())
|
.strategyType(activityTeamInfoEditModel.getStrategyType())
|
||||||
.status(activityTeamInfoSaveModel.getStatus())
|
.strategyId(activityTeamInfoEditModel.getStrategyId())
|
||||||
.strategyType(activityTeamInfoSaveModel.getStrategyType())
|
.productImage(activityTeamInfoEditModel.getProductImage())
|
||||||
.strategyId(activityTeamInfoSaveModel.getStrategyId())
|
.introduction(activityTeamInfoEditModel.getIntroduction())
|
||||||
.build();
|
.imageList(activityTeamInfoEditModel.getImageList())
|
||||||
}
|
.endTime(activityTeamInfoEditModel.getEndTime())
|
||||||
public static ActivityTeamInfo TeamUpdateBuild (ActivityTeamInfoUpdModel activityTeamInfoUpdModel){
|
.id(activityTeamInfoEditModel.getTeamId())
|
||||||
return ActivityTeamInfo.builder()
|
.content(activityTeamInfoEditModel.getContent())
|
||||||
.id(activityTeamInfoUpdModel.getId())
|
.sort(activityTeamInfoEditModel.getSort())
|
||||||
.name(activityTeamInfoUpdModel.getName())
|
|
||||||
.productId(activityTeamInfoUpdModel.getProductId())
|
|
||||||
.productImage(activityTeamInfoUpdModel.getProductImage())
|
|
||||||
.introduction(activityTeamInfoUpdModel.getIntroduction())
|
|
||||||
.unit(activityTeamInfoUpdModel.getUnit())
|
|
||||||
.imageList(activityTeamInfoUpdModel.getImageList())
|
|
||||||
.endTime(activityTeamInfoUpdModel.getEndTime())
|
|
||||||
.sort(activityTeamInfoUpdModel.getSort())
|
|
||||||
.content(activityTeamInfoUpdModel.getContent())
|
|
||||||
.status(activityTeamInfoUpdModel.getStatus())
|
|
||||||
.strategyType(activityTeamInfoUpdModel.getStrategyType())
|
|
||||||
.strategyId(activityTeamInfoUpdModel.getStrategyId())
|
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,9 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuModel;
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuEditModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuReqModel;
|
import com.muyu.marketing.domain.resp.ActivityTeamSkuInfoDetail;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuUpdModel;
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@ -61,28 +60,23 @@ public class ActivityTeamProductSkuInfo extends BaseEntity {
|
||||||
.productId(activityTeamProductSkuAddModel.getProductId())
|
.productId(activityTeamProductSkuAddModel.getProductId())
|
||||||
.teamId(activityTeamProductSkuAddModel.getTeamId())
|
.teamId(activityTeamProductSkuAddModel.getTeamId())
|
||||||
.teamStock(activityTeamProductSkuAddModel.getTeamStock())
|
.teamStock(activityTeamProductSkuAddModel.getTeamStock())
|
||||||
.productSku(activityTeamProductSkuAddModel.getSku())
|
|
||||||
.remainStock(activityTeamProductSkuAddModel.getTeamStock())
|
.remainStock(activityTeamProductSkuAddModel.getTeamStock())
|
||||||
.teamPrice(activityTeamProductSkuAddModel.getTeamPrice())
|
.teamPrice(activityTeamProductSkuAddModel.getTeamPrice())
|
||||||
|
.productSku(activityTeamProductSkuAddModel.getSku())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
public static ActivityTeamProductSkuInfo updateModelBuild(ActivityTeamProductSkuReqModel activityTeamProductSkuReqModel) {
|
/**
|
||||||
|
* 将model模型转换成修改对象
|
||||||
|
*/
|
||||||
|
public static ActivityTeamProductSkuInfo skuInfoBuild(ActivityTeamProductSkuEditModel activityTeamProductSkuEditModel){
|
||||||
return ActivityTeamProductSkuInfo.builder()
|
return ActivityTeamProductSkuInfo.builder()
|
||||||
.id(activityTeamProductSkuReqModel.getId())
|
.id(activityTeamProductSkuEditModel.getId())
|
||||||
.productId(activityTeamProductSkuReqModel.getProductId())
|
.teamId(activityTeamProductSkuEditModel.getTeamId())
|
||||||
.teamStock(activityTeamProductSkuReqModel.getTeamStock())
|
.productSku(activityTeamProductSkuEditModel.getSku())
|
||||||
.productSku(activityTeamProductSkuReqModel.getProductSku())
|
.teamPrice(activityTeamProductSkuEditModel.getTeamPrice())
|
||||||
.teamPrice(activityTeamProductSkuReqModel.getTeamPrice())
|
.teamStock(activityTeamProductSkuEditModel.getTeamStock())
|
||||||
|
.productId(activityTeamProductSkuEditModel.getProductId())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ActivityTeamProductSkuInfo updModelBuild(ActivityTeamProductSkuUpdModel teamProductSkuUpdModel){
|
|
||||||
return ActivityTeamProductSkuInfo.builder()
|
|
||||||
.id(teamProductSkuUpdModel.getId())
|
|
||||||
.teamPrice(teamProductSkuUpdModel.getTeamPrice())
|
|
||||||
.teamStock(teamProductSkuUpdModel.getTeamStock())
|
|
||||||
.remainStock(teamProductSkuUpdModel.getTeamStock())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ import lombok.experimental.SuperBuilder;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName(value = "team_strategy_exemption_hundred", autoResultMap = true)
|
@TableName(value = "team_strategy_exemption_hundred", autoResultMap = true)
|
||||||
public class TeamStrategyHundred extends BaseEntity {
|
public class TeamStrategyExemptionHundred extends BaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
|
@ -13,7 +13,7 @@ import lombok.experimental.SuperBuilder;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName(value = "team_strategy_exemption_ordinary", autoResultMap = true)
|
@TableName(value = "team_strategy_exemption_ordinary", autoResultMap = true)
|
||||||
public class TeamStrategyOrdinary extends BaseEntity {
|
public class TeamStrategyExemptionOrdinary extends BaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
|
@ -2,7 +2,7 @@ package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
|
import com.muyu.marketing.domain.req.ProjectSkuInfoAddReq;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -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;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 团购活动添加模型
|
* 团购活动添加模型
|
||||||
|
@ -58,7 +57,7 @@ public class ActivityTeamInfoAddModel {
|
||||||
/**
|
/**
|
||||||
* 活动排序
|
* 活动排序
|
||||||
*/
|
*/
|
||||||
private Long sort;
|
private Integer sort;
|
||||||
/**
|
/**
|
||||||
* 商品SkU集合
|
* 商品SkU集合
|
||||||
*/
|
*/
|
||||||
|
@ -80,25 +79,4 @@ public class ActivityTeamInfoAddModel {
|
||||||
*/
|
*/
|
||||||
private Long strategyId;
|
private Long strategyId;
|
||||||
|
|
||||||
public static ActivityTeamInfoAddModel addReqBuild (ActivityTeamInfoSaveReq activityTeamInfoSaveReq){
|
|
||||||
return ActivityTeamInfoAddModel.builder()
|
|
||||||
.name(activityTeamInfoSaveReq.getName())
|
|
||||||
.productId(activityTeamInfoSaveReq.getProductId())
|
|
||||||
.productImage(activityTeamInfoSaveReq.getProductImage())
|
|
||||||
.introduction(activityTeamInfoSaveReq.getIntroduction())
|
|
||||||
.unit(activityTeamInfoSaveReq.getUnit())
|
|
||||||
.imageList(activityTeamInfoSaveReq.getImageList())
|
|
||||||
.endTime(activityTeamInfoSaveReq.getEndTime())
|
|
||||||
.sort(activityTeamInfoSaveReq.getSort())
|
|
||||||
.content(activityTeamInfoSaveReq.getContent())
|
|
||||||
.status(activityTeamInfoSaveReq.getStatus())
|
|
||||||
.strategyType(activityTeamInfoSaveReq.getStrategyType())
|
|
||||||
.strategyId(activityTeamInfoSaveReq.getStrategyId())
|
|
||||||
.activityTeamProductSkuAddModelList(
|
|
||||||
activityTeamInfoSaveReq.getTeamProjectSkuInfoAddReqList()
|
|
||||||
.stream()
|
|
||||||
.map(addReq -> ActivityTeamProductSkuAddModel.addReqBuild(addReq, activityTeamInfoSaveReq::getProductId))
|
|
||||||
.toList()
|
|
||||||
).build();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,28 @@
|
||||||
package com.muyu.marketing.domain.resp;
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
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.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团购活动添加模型
|
||||||
|
*
|
||||||
|
* @author DongZeLiang
|
||||||
|
* @date 2024-11-26 09:38
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
@SuperBuilder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EqualsAndHashCode(callSuper = true)
|
public class ActivityTeamInfoEditModel {
|
||||||
public class ActivityTeamDetailResp extends BaseEntity {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 团购ID
|
* id
|
||||||
*/
|
*/
|
||||||
private Long teamId;
|
private Long teamId;
|
||||||
/**
|
/**
|
||||||
|
@ -61,7 +63,7 @@ public class ActivityTeamDetailResp extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 商品SkU集合
|
* 商品SkU集合
|
||||||
*/
|
*/
|
||||||
private List<ActivityTeamProjectSkuResp> activityTeamProjectSkuList;
|
private List<ActivityTeamProductSkuEditModel> activityTeamProductSkuEditModels;
|
||||||
/**
|
/**
|
||||||
* 活动详情
|
* 活动详情
|
||||||
*/
|
*/
|
||||||
|
@ -78,4 +80,5 @@ public class ActivityTeamDetailResp extends BaseEntity {
|
||||||
* 策略ID
|
* 策略ID
|
||||||
*/
|
*/
|
||||||
private Long strategyId;
|
private Long strategyId;
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,31 +1,34 @@
|
||||||
package com.muyu.marketing.domain.model;
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamOpenInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @program: 2204a-cloud-server
|
* @program: 2204a-cloud-server
|
||||||
* @description: 活动回显总模型
|
* @description: 团购活动商品信息规格模型
|
||||||
* @author: AoCi Tian
|
* @author: MengFanKuo
|
||||||
* @create: 2024-11-26 16:00
|
* @create: 2024-11-26 14:22
|
||||||
**/
|
* *
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Builder
|
public class ActivityTeamInfoProductSkuDetailModel {
|
||||||
public class ActivityTeamDetailModel {
|
|
||||||
/**
|
/**
|
||||||
* 拼团id
|
* 主键
|
||||||
*/
|
*/
|
||||||
private Long id;
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private long id;
|
||||||
/**
|
/**
|
||||||
* 拼团名称
|
* 拼团名称
|
||||||
*/
|
*/
|
||||||
|
@ -33,7 +36,7 @@ public class ActivityTeamDetailModel {
|
||||||
/**
|
/**
|
||||||
* 商品ID
|
* 商品ID
|
||||||
*/
|
*/
|
||||||
private Long productId;
|
private long productId;
|
||||||
/**
|
/**
|
||||||
* 商品活动图
|
* 商品活动图
|
||||||
*/
|
*/
|
||||||
|
@ -45,26 +48,19 @@ public class ActivityTeamDetailModel {
|
||||||
/**
|
/**
|
||||||
* 单位
|
* 单位
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private String unit;
|
private String unit;
|
||||||
/**
|
/**
|
||||||
* 轮播图
|
* 轮播图
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private String imageList;
|
private String imageList;
|
||||||
/**
|
/**
|
||||||
* 活动结束时间
|
* 活动结束时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
/**
|
/**
|
||||||
* 活动排序
|
* 活动排序
|
||||||
*/
|
*/
|
||||||
private Long sort;
|
private long sort;
|
||||||
/**
|
|
||||||
* 商品SkU集合
|
|
||||||
*/
|
|
||||||
private List<ActivityTeamProductSkuModel> projectSkuInfoAddReqList;
|
|
||||||
/**
|
/**
|
||||||
* 活动详情
|
* 活动详情
|
||||||
*/
|
*/
|
||||||
|
@ -80,23 +76,26 @@ public class ActivityTeamDetailModel {
|
||||||
/**
|
/**
|
||||||
* 策略ID
|
* 策略ID
|
||||||
*/
|
*/
|
||||||
private Long strategyId;
|
private long strategyId;
|
||||||
public static ActivityTeamDetailModel findSkuSumList (ActivityTeamInfo activityTeamInfo,
|
/**
|
||||||
Function<ActivityTeamDetailModel.ActivityTeamDetailModelBuilder, ActivityTeamDetailModel> function){
|
* 规格
|
||||||
return function.apply(ActivityTeamDetailModel.builder()
|
*/
|
||||||
|
private List<ActivityTeamSkuInfoDetailModel> projectSkuInfoAddReqList;
|
||||||
|
public static ActivityTeamInfoProductSkuDetailModel skuInfoDetailBuild(ActivityTeamInfo activityTeamInfo, List<ActivityTeamSkuInfoDetailModel> infoServiceByListSkuInfo){
|
||||||
|
return ActivityTeamInfoProductSkuDetailModel.builder()
|
||||||
.id(activityTeamInfo.getId())
|
.id(activityTeamInfo.getId())
|
||||||
.name(activityTeamInfo.getName())
|
.name(activityTeamInfo.getName())
|
||||||
.productId(activityTeamInfo.getProductId())
|
.productId(activityTeamInfo.getProductId())
|
||||||
.productImage(activityTeamInfo.getProductImage())
|
.productImage(activityTeamInfo.getProductImage())
|
||||||
.introduction(activityTeamInfo.getIntroduction())
|
|
||||||
.unit(activityTeamInfo.getUnit())
|
|
||||||
.imageList(activityTeamInfo.getImageList())
|
|
||||||
.endTime(activityTeamInfo.getEndTime())
|
|
||||||
.sort(activityTeamInfo.getSort())
|
|
||||||
.content(activityTeamInfo.getContent())
|
.content(activityTeamInfo.getContent())
|
||||||
|
.endTime(activityTeamInfo.getEndTime())
|
||||||
|
.imageList(activityTeamInfo.getImageList())
|
||||||
|
.introduction(activityTeamInfo.getIntroduction())
|
||||||
|
.projectSkuInfoAddReqList(infoServiceByListSkuInfo)
|
||||||
|
.sort(activityTeamInfo.getSort())
|
||||||
.status(activityTeamInfo.getStatus())
|
.status(activityTeamInfo.getStatus())
|
||||||
.strategyType(activityTeamInfo.getStrategyType())
|
|
||||||
.strategyId(activityTeamInfo.getStrategyId())
|
.strategyId(activityTeamInfo.getStrategyId())
|
||||||
);
|
.strategyType(activityTeamInfo.getStrategyType())
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,92 +0,0 @@
|
||||||
package com.muyu.marketing.domain.model;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @program: 2204a-cloud-server
|
|
||||||
* @description: 添加活动模型
|
|
||||||
* @author: AoCi Tian
|
|
||||||
* @create: 2024-11-26 10:59
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Builder
|
|
||||||
public class ActivityTeamInfoSaveModel {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团名称
|
|
||||||
*/
|
|
||||||
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;
|
|
||||||
/**
|
|
||||||
* 活动详情
|
|
||||||
*/
|
|
||||||
private String content;
|
|
||||||
/**
|
|
||||||
* 活动状态
|
|
||||||
*/
|
|
||||||
private String status;
|
|
||||||
/**
|
|
||||||
* 策略类型
|
|
||||||
*/
|
|
||||||
private String strategyType;
|
|
||||||
/**
|
|
||||||
* 策略ID
|
|
||||||
*/
|
|
||||||
private Long strategyId;
|
|
||||||
public static ActivityTeamInfoSaveModel activityTeamInfoSaveModelBuild (ActivityTeamInfoAddModel activityTeamInfoAddModel){
|
|
||||||
return ActivityTeamInfoSaveModel.builder()
|
|
||||||
.name(activityTeamInfoAddModel.getName())
|
|
||||||
.productId(activityTeamInfoAddModel.getProductId())
|
|
||||||
.productImage(activityTeamInfoAddModel.getProductImage())
|
|
||||||
.introduction(activityTeamInfoAddModel.getIntroduction())
|
|
||||||
.unit(activityTeamInfoAddModel.getUnit())
|
|
||||||
.imageList(activityTeamInfoAddModel.getImageList())
|
|
||||||
.endTime(activityTeamInfoAddModel.getEndTime())
|
|
||||||
.sort(activityTeamInfoAddModel.getSort())
|
|
||||||
.content(activityTeamInfoAddModel.getContent())
|
|
||||||
.status(activityTeamInfoAddModel.getStatus())
|
|
||||||
.strategyType(activityTeamInfoAddModel.getStrategyType())
|
|
||||||
.strategyId(activityTeamInfoAddModel.getStrategyId())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,65 +0,0 @@
|
||||||
package com.muyu.marketing.domain.model;
|
|
||||||
|
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamInfoUpdReq;
|
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamProductSkuSettingReq;
|
|
||||||
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
|
||||||
import com.muyu.marketing.domain.req.TeamProjectSkuInfoUpdReq;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @program: 2204a-cloud-server
|
|
||||||
* @description: 活动商品规格修改模型
|
|
||||||
* @author: AoCi Tian
|
|
||||||
* @create: 2024-11-26 19:25
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Builder
|
|
||||||
public class ActivityTeamInfoUpdModel {
|
|
||||||
private Long id;
|
|
||||||
private String name;
|
|
||||||
private Long productId;
|
|
||||||
private String productImage;
|
|
||||||
private String introduction;
|
|
||||||
private String unit;
|
|
||||||
private String imageList;
|
|
||||||
private Date endTime;
|
|
||||||
private Long sort;
|
|
||||||
private String content;
|
|
||||||
private String status;
|
|
||||||
private String strategyType;
|
|
||||||
private Long strategyId;
|
|
||||||
private ActivityTeamProductSkuSettingModel activityTeamProductSkuSettingModel;
|
|
||||||
|
|
||||||
public static ActivityTeamInfoUpdModel activityTeamInfoUpdReqModelBuild (ActivityTeamInfoUpdReq activityTeamInfoUpdReq){
|
|
||||||
return ActivityTeamInfoUpdModel.builder()
|
|
||||||
.id(activityTeamInfoUpdReq.getId())
|
|
||||||
.name(activityTeamInfoUpdReq.getName())
|
|
||||||
.productId(activityTeamInfoUpdReq.getProductId())
|
|
||||||
.productImage(activityTeamInfoUpdReq.getProductImage())
|
|
||||||
.introduction(activityTeamInfoUpdReq.getIntroduction())
|
|
||||||
.unit(activityTeamInfoUpdReq.getUnit())
|
|
||||||
.imageList(activityTeamInfoUpdReq.getImageList())
|
|
||||||
.endTime(activityTeamInfoUpdReq.getEndTime())
|
|
||||||
.sort(activityTeamInfoUpdReq.getSort())
|
|
||||||
.content(activityTeamInfoUpdReq.getContent())
|
|
||||||
.status(activityTeamInfoUpdReq.getStatus())
|
|
||||||
.strategyType(activityTeamInfoUpdReq.getStrategyType())
|
|
||||||
.strategyId(activityTeamInfoUpdReq.getStrategyId())
|
|
||||||
.activityTeamProductSkuSettingModel(
|
|
||||||
ActivityTeamProductSkuSettingModel.settingReqModel(
|
|
||||||
activityTeamInfoUpdReq.getActivityTeamProductSkuSettingReq(),
|
|
||||||
activityTeamInfoUpdReq::getProductId
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.muyu.marketing.domain.model;
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
import com.muyu.marketing.domain.req.ProjectSkuInfoAddReq;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -47,13 +47,12 @@ public class ActivityTeamProductSkuAddModel {
|
||||||
* 拼团库存
|
* 拼团库存
|
||||||
*/
|
*/
|
||||||
private Long teamStock;
|
private Long teamStock;
|
||||||
|
public static ActivityTeamProductSkuAddModel teamProductSkuAddBuild(ProjectSkuInfoAddReq projectSkuInfoAddReq,Supplier<Long> productId){
|
||||||
public static ActivityTeamProductSkuAddModel addReqBuild(TeamProjectSkuInfoAddReq teamProjectSkuInfoAddReq, Supplier<Long> productId){
|
|
||||||
return ActivityTeamProductSkuAddModel.builder()
|
return ActivityTeamProductSkuAddModel.builder()
|
||||||
|
.sku(projectSkuInfoAddReq.getSku())
|
||||||
|
.teamStock(projectSkuInfoAddReq.getTeamStock())
|
||||||
|
.teamPrice(projectSkuInfoAddReq.getTeamPrice())
|
||||||
.productId(productId.get())
|
.productId(productId.get())
|
||||||
.sku(teamProjectSkuInfoAddReq.getSku())
|
|
||||||
.teamStock(teamProjectSkuInfoAddReq.getTeamStock())
|
|
||||||
.teamPrice(teamProjectSkuInfoAddReq.getTeamPrice())
|
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
|
||||||
|
import com.muyu.marketing.domain.req.ProjectSkuInfoAddReq;
|
||||||
|
import com.muyu.marketing.domain.req.ProjectSkuInfoEditReq;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团购spu库存添加模型
|
||||||
|
*
|
||||||
|
* @author DongZeLiang
|
||||||
|
* @date 2024-11-26 09:36
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ActivityTeamProductSkuEditModel {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 团购活动ID
|
||||||
|
*/
|
||||||
|
private Long teamId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格SKU
|
||||||
|
*/
|
||||||
|
private String sku;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团价格
|
||||||
|
*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
public static ActivityTeamProductSkuEditModel teamSkuEditBuild(ProjectSkuInfoEditReq projectSkuInfoEditReq, Supplier<Long> productId){
|
||||||
|
return ActivityTeamProductSkuEditModel.builder()
|
||||||
|
.id(projectSkuInfoEditReq.getProductSkuId())
|
||||||
|
.sku(projectSkuInfoEditReq.getSku())
|
||||||
|
.teamStock(projectSkuInfoEditReq.getTeamStock())
|
||||||
|
.teamPrice(projectSkuInfoEditReq.getTeamPrice())
|
||||||
|
.productId(productId.get())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,51 +0,0 @@
|
||||||
package com.muyu.marketing.domain.model;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品活动SKU信息模型
|
|
||||||
*
|
|
||||||
* @author DongZeLiang
|
|
||||||
* @date 2024-11-26 15:35
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class ActivityTeamProductSkuInfoModel {
|
|
||||||
/**
|
|
||||||
* 团购商品SKU的ID
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 团ID
|
|
||||||
*/
|
|
||||||
private Long teamId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品ID
|
|
||||||
*/
|
|
||||||
private Long productId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规格SKU
|
|
||||||
*/
|
|
||||||
private String sku;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团价格
|
|
||||||
*/
|
|
||||||
private BigDecimal teamPrice;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团库存
|
|
||||||
*/
|
|
||||||
private Long teamStock;
|
|
||||||
}
|
|
|
@ -1,50 +0,0 @@
|
||||||
package com.muyu.marketing.domain.model;
|
|
||||||
|
|
||||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
|
||||||
import com.muyu.marketing.domain.resp.ProjectFindSkuInfoResp;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @program: 2204a-cloud-server
|
|
||||||
* @description: 回显sku模型
|
|
||||||
* @author: AoCi Tian
|
|
||||||
* @create: 2024-11-26 16:03
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Builder
|
|
||||||
public class ActivityTeamProductSkuModel {
|
|
||||||
/**
|
|
||||||
* 规格id
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
/**
|
|
||||||
* 规格SKU
|
|
||||||
*/
|
|
||||||
private String sku;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团价格
|
|
||||||
*/
|
|
||||||
private BigDecimal teamPrice;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团库存
|
|
||||||
*/
|
|
||||||
private Long teamStock;
|
|
||||||
|
|
||||||
public static ActivityTeamProductSkuModel FindBuild(ActivityTeamProductSkuInfo activityTeamProductSkuInfo) {
|
|
||||||
return ActivityTeamProductSkuModel.builder()
|
|
||||||
.id(activityTeamProductSkuInfo.getId())
|
|
||||||
.sku(activityTeamProductSkuInfo.getProductSku())
|
|
||||||
.teamStock(activityTeamProductSkuInfo.getTeamStock())
|
|
||||||
.teamPrice(activityTeamProductSkuInfo.getTeamPrice())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,40 +0,0 @@
|
||||||
package com.muyu.marketing.domain.model;
|
|
||||||
|
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamProductSkuReq;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @program: 2204a-cloud-server
|
|
||||||
* @description: sku修改模型
|
|
||||||
* @author: AoCi Tian
|
|
||||||
* @create: 2024-11-26 19:45
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Builder
|
|
||||||
public class ActivityTeamProductSkuReqModel {
|
|
||||||
private Long id;
|
|
||||||
private Long teamId;
|
|
||||||
private Long productId;
|
|
||||||
private String productSku;
|
|
||||||
private Long teamStock;
|
|
||||||
private Long remainStock;
|
|
||||||
private BigDecimal teamPrice;
|
|
||||||
public static ActivityTeamProductSkuReqModel activityTeamProductSkuReqModelBuild(ActivityTeamProductSkuReq activityTeamProductSkuReq){
|
|
||||||
return ActivityTeamProductSkuReqModel.builder()
|
|
||||||
.id(activityTeamProductSkuReq.getId())
|
|
||||||
.productId(activityTeamProductSkuReq.getProductId())
|
|
||||||
.teamId(activityTeamProductSkuReq.getTeamId())
|
|
||||||
.productSku(activityTeamProductSkuReq.getProductSku())
|
|
||||||
.remainStock(activityTeamProductSkuReq.getRemainStock())
|
|
||||||
.teamStock(activityTeamProductSkuReq.getTeamStock())
|
|
||||||
.teamPrice(activityTeamProductSkuReq.getTeamPrice())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,59 +0,0 @@
|
||||||
package com.muyu.marketing.domain.model;
|
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamProductSkuSettingReq;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 团购商品规格一键设置
|
|
||||||
*
|
|
||||||
* @author DongZeLiang
|
|
||||||
* @date 2024-11-28 11:15
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class ActivityTeamProductSkuSettingModel {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 活动ID
|
|
||||||
*/
|
|
||||||
private Long teamId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除的ID集合
|
|
||||||
*/
|
|
||||||
private List<Long> removeIds;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加的规格集合
|
|
||||||
*/
|
|
||||||
private List<ActivityTeamProductSkuAddModel> activityTeamProductSkuAddModelList;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改的规格集合
|
|
||||||
*/
|
|
||||||
private List<ActivityTeamProductSkuUpdModel> activityTeamProductSkuUpdModelList;
|
|
||||||
|
|
||||||
public static ActivityTeamProductSkuSettingModel settingReqModel(ActivityTeamProductSkuSettingReq activityTeamProductSkuSettingReq, Supplier<Long> productId) {
|
|
||||||
return ActivityTeamProductSkuSettingModel.builder()
|
|
||||||
.removeIds(activityTeamProductSkuSettingReq.getRemoveIds())
|
|
||||||
.activityTeamProductSkuAddModelList(
|
|
||||||
activityTeamProductSkuSettingReq.getTeamProjectSkuInfoAddReqList().stream()
|
|
||||||
.map(teamProjectSkuInfoAddReq -> ActivityTeamProductSkuAddModel.addReqBuild(teamProjectSkuInfoAddReq, productId))
|
|
||||||
.toList()
|
|
||||||
)
|
|
||||||
.activityTeamProductSkuUpdModelList(
|
|
||||||
activityTeamProductSkuSettingReq.getTeamProjectSkuInfoUpdReqList().stream()
|
|
||||||
.map(ActivityTeamProductSkuUpdModel::updReqBuild)
|
|
||||||
.toList()
|
|
||||||
).build();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,46 +0,0 @@
|
||||||
package com.muyu.marketing.domain.model;
|
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.marketing.domain.req.TeamProjectSkuInfoUpdReq;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团活动商品SKU
|
|
||||||
*
|
|
||||||
* @author DongZeLiang
|
|
||||||
* @date 2024-11-27 14:18
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class ActivityTeamProductSkuUpdModel {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品规格ID
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 团购价格
|
|
||||||
*/
|
|
||||||
private BigDecimal teamPrice;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 团购库存
|
|
||||||
*/
|
|
||||||
private Long teamStock;
|
|
||||||
|
|
||||||
public static ActivityTeamProductSkuUpdModel updReqBuild(TeamProjectSkuInfoUpdReq teamProjectSkuInfoUpdReq){
|
|
||||||
return ActivityTeamProductSkuUpdModel.builder()
|
|
||||||
.id(teamProjectSkuInfoUpdReq.getId())
|
|
||||||
.teamStock(teamProjectSkuInfoUpdReq.getTeamStock())
|
|
||||||
.teamPrice(teamProjectSkuInfoUpdReq.getTeamPrice())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||||
|
import com.muyu.marketing.domain.resp.ActivityTeamSkuInfoDetail;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName(value = "activity_team_product_sku_info", autoResultMap = true)
|
||||||
|
public class ActivityTeamSkuInfoDetailModel extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private long id;
|
||||||
|
/**
|
||||||
|
* 活动ID
|
||||||
|
*/
|
||||||
|
private long teamId;
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
private Long productId;
|
||||||
|
/**
|
||||||
|
* 商品SKU
|
||||||
|
*/
|
||||||
|
private String productSku;
|
||||||
|
/**
|
||||||
|
* 拼团库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
/**
|
||||||
|
* 拼团价格
|
||||||
|
*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过拼团商品sku构建模型
|
||||||
|
*/
|
||||||
|
public static ActivityTeamSkuInfoDetailModel productSkuInfoEachBuild(ActivityTeamProductSkuInfo activityTeamProductSkuInfo){
|
||||||
|
return ActivityTeamSkuInfoDetailModel.builder()
|
||||||
|
.id(activityTeamProductSkuInfo.getId())
|
||||||
|
.teamId(activityTeamProductSkuInfo.getTeamId())
|
||||||
|
.productId(activityTeamProductSkuInfo.getProductId())
|
||||||
|
.productSku(activityTeamProductSkuInfo.getProductSku())
|
||||||
|
.teamPrice(activityTeamProductSkuInfo.getTeamPrice())
|
||||||
|
.teamStock(activityTeamProductSkuInfo.getTeamStock())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.muyu.marketing.domain.resp;
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -8,19 +8,21 @@ import lombok.experimental.SuperBuilder;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加的
|
* @program: 2204a-cloud-server
|
||||||
|
* @description: 拼团商品sku模型
|
||||||
|
* @author: MengFanKuo
|
||||||
|
* @create: 2024-11-26 15:53
|
||||||
|
* *
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@SuperBuilder
|
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ActivityTeamProjectSkuResp {
|
@SuperBuilder
|
||||||
|
public class ActivityTeamSkuInfoModel {
|
||||||
/**
|
/**
|
||||||
* 团购商品SKU的ID
|
* id
|
||||||
*/
|
*/
|
||||||
private Long productSkuId;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格SKU
|
* 规格SKU
|
||||||
*/
|
*/
|
|
@ -5,6 +5,7 @@ import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
|
@ -16,7 +17,7 @@ import java.math.RoundingMode;
|
||||||
* @date 2024-11-21 11:57
|
* @date 2024-11-21 11:57
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@SuperBuilder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class TeamProductDiscountPriceModel {
|
public class TeamProductDiscountPriceModel {
|
||||||
|
@ -44,7 +45,7 @@ public class TeamProductDiscountPriceModel {
|
||||||
* @return 优惠力度
|
* @return 优惠力度
|
||||||
*/
|
*/
|
||||||
public static TeamProductDiscountPriceModel of(BigDecimal productPrice, BigDecimal teamPrice) {
|
public static TeamProductDiscountPriceModel of(BigDecimal productPrice, BigDecimal teamPrice) {
|
||||||
return TeamProductDiscountPriceModel.builder()
|
return TeamProductDiscountPriceModel.builder()
|
||||||
.productPrice(productPrice)
|
.productPrice(productPrice)
|
||||||
.teamPrice(teamPrice)
|
.teamPrice(teamPrice)
|
||||||
.discount(
|
.discount(
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
package com.muyu.marketing.domain.req;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoEditModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuEditModel;
|
||||||
|
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 ActivityTeamInfoEditReq 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 Integer sort;
|
||||||
|
/**
|
||||||
|
* 商品SkU集合
|
||||||
|
*/
|
||||||
|
private List<ProjectSkuInfoEditReq> projectSkuInfoEditReqList;
|
||||||
|
/**
|
||||||
|
* 活动详情
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
/**
|
||||||
|
* 活动状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 策略类型
|
||||||
|
*/
|
||||||
|
private String strategyType;
|
||||||
|
/**
|
||||||
|
* 策略ID
|
||||||
|
*/
|
||||||
|
private Long strategyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求入参转换为修改模型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ActivityTeamInfoEditModel activityTeamInfoEditBuild(){
|
||||||
|
return ActivityTeamInfoEditModel.builder()
|
||||||
|
.activityTeamProductSkuEditModels(this.projectSkuInfoEditReqList.stream().map(projectSkuInfoEditReq -> {
|
||||||
|
return ActivityTeamProductSkuEditModel.teamSkuEditBuild(projectSkuInfoEditReq,()-> productId);
|
||||||
|
}).toList())
|
||||||
|
.teamId(this.id)
|
||||||
|
.content(this.content)
|
||||||
|
.endTime(this.endTime)
|
||||||
|
.imageList(this.imageList)
|
||||||
|
.introduction(this.introduction)
|
||||||
|
.name(this.name)
|
||||||
|
.productImage(this.productImage)
|
||||||
|
.status(this.status)
|
||||||
|
.strategyId(this.strategyId)
|
||||||
|
.strategyType(this.strategyType)
|
||||||
|
.unit(this.unit)
|
||||||
|
.sort(this.sort)
|
||||||
|
.productId(this.productId)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,8 @@ package com.muyu.marketing.domain.req;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
@ -36,12 +38,10 @@ public class ActivityTeamInfoSaveReq extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 单位
|
* 单位
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private String unit;
|
private String unit;
|
||||||
/**
|
/**
|
||||||
* 轮播图
|
* 轮播图
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private String imageList;
|
private String imageList;
|
||||||
/**
|
/**
|
||||||
* 活动结束时间
|
* 活动结束时间
|
||||||
|
@ -51,11 +51,11 @@ public class ActivityTeamInfoSaveReq extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 活动排序
|
* 活动排序
|
||||||
*/
|
*/
|
||||||
private Long sort;
|
private Integer sort;
|
||||||
/**
|
/**
|
||||||
* 商品SkU集合
|
* 商品SkU集合
|
||||||
*/
|
*/
|
||||||
private List<TeamProjectSkuInfoAddReq> teamProjectSkuInfoAddReqList;
|
private List<ProjectSkuInfoAddReq> projectSkuInfoAddReqList;
|
||||||
/**
|
/**
|
||||||
* 活动详情
|
* 活动详情
|
||||||
*/
|
*/
|
||||||
|
@ -72,4 +72,29 @@ public class ActivityTeamInfoSaveReq extends BaseEntity {
|
||||||
* 策略ID
|
* 策略ID
|
||||||
*/
|
*/
|
||||||
private Long strategyId;
|
private Long strategyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求入参转换为添加模型
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ActivityTeamInfoAddModel activityTeamInfoReqBuild(){
|
||||||
|
return ActivityTeamInfoAddModel.builder()
|
||||||
|
.unit(this.unit)
|
||||||
|
.activityTeamProductSkuAddModelList(
|
||||||
|
this.projectSkuInfoAddReqList.stream().map(projectSkuInfoAddReq -> {
|
||||||
|
return ActivityTeamProductSkuAddModel.teamProductSkuAddBuild(projectSkuInfoAddReq,()->productId);
|
||||||
|
}).toList())
|
||||||
|
.strategyType(this.strategyType)
|
||||||
|
.status(this.status)
|
||||||
|
.name(this.name)
|
||||||
|
.strategyId(this.strategyId)
|
||||||
|
.endTime(this.endTime)
|
||||||
|
.imageList(this.imageList)
|
||||||
|
.introduction(this.introduction)
|
||||||
|
.productId(this.productId)
|
||||||
|
.productImage(this.productImage)
|
||||||
|
.sort(this.sort)
|
||||||
|
.content(this.content)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
package com.muyu.marketing.domain.req;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @program: 2204a-cloud-server
|
|
||||||
* @description: 活动商品规格修改入参
|
|
||||||
* @author: AoCi Tian
|
|
||||||
* @create: 2024-11-26 19:25
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Builder
|
|
||||||
public class ActivityTeamInfoUpdReq {
|
|
||||||
private Long id;
|
|
||||||
private String name;
|
|
||||||
private Long productId;
|
|
||||||
private String productImage;
|
|
||||||
private String introduction;
|
|
||||||
private String unit;
|
|
||||||
private String imageList;
|
|
||||||
private Date endTime;
|
|
||||||
private Long sort;
|
|
||||||
private String content;
|
|
||||||
private String status;
|
|
||||||
private String strategyType;
|
|
||||||
private Long strategyId;
|
|
||||||
private ActivityTeamProductSkuSettingReq activityTeamProductSkuSettingReq;
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
package com.muyu.marketing.domain.req;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @program: 2204a-cloud-server
|
|
||||||
* @description: sku修改入参
|
|
||||||
* @author: AoCi Tian
|
|
||||||
* @create: 2024-11-26 19:45
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Builder
|
|
||||||
public class ActivityTeamProductSkuReq {
|
|
||||||
private Long id;
|
|
||||||
private Long teamId;
|
|
||||||
private Long productId;
|
|
||||||
private String productSku;
|
|
||||||
private Long teamStock;
|
|
||||||
private Long remainStock;
|
|
||||||
private BigDecimal teamPrice;
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
package com.muyu.marketing.domain.req;
|
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 团购商品规格设置
|
|
||||||
*
|
|
||||||
* @author DongZeLiang
|
|
||||||
* @date 2024-11-28 11:27
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class ActivityTeamProductSkuSettingReq {
|
|
||||||
/**
|
|
||||||
* 删除的ID集合
|
|
||||||
*/
|
|
||||||
private List<Long> removeIds;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加的规格集合
|
|
||||||
*/
|
|
||||||
private List<TeamProjectSkuInfoAddReq> teamProjectSkuInfoAddReqList;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加的规格集合
|
|
||||||
*/
|
|
||||||
private List<TeamProjectSkuInfoUpdReq> teamProjectSkuInfoUpdReqList;
|
|
||||||
}
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.muyu.marketing.domain.req;
|
package com.muyu.marketing.domain.req;
|
||||||
|
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
@ -14,12 +16,12 @@ import java.math.BigDecimal;
|
||||||
@SuperBuilder
|
@SuperBuilder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class TeamProjectSkuInfoUpdReq {
|
public class ProjectSkuInfoAddReq {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格SKU
|
* 规格SKU
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String sku;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼团价格
|
* 拼团价格
|
||||||
|
@ -30,4 +32,6 @@ public class TeamProjectSkuInfoUpdReq {
|
||||||
* 拼团库存
|
* 拼团库存
|
||||||
*/
|
*/
|
||||||
private Long teamStock;
|
private Long teamStock;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -14,13 +14,15 @@ import java.math.BigDecimal;
|
||||||
@SuperBuilder
|
@SuperBuilder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class TeamProjectSkuInfoAddReq {
|
public class ProjectSkuInfoEditReq {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long productSkuId;
|
||||||
/**
|
/**
|
||||||
* 规格SKU
|
* 规格SKU
|
||||||
*/
|
*/
|
||||||
private String sku;
|
private String sku;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼团价格
|
* 拼团价格
|
||||||
*/
|
*/
|
||||||
|
@ -30,4 +32,6 @@ public class TeamProjectSkuInfoAddReq {
|
||||||
* 拼团库存
|
* 拼团库存
|
||||||
*/
|
*/
|
||||||
private Long teamStock;
|
private Long teamStock;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.muyu.marketing.domain.resp;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoProductSkuDetailModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @program: 2204a-cloud-server
|
||||||
|
* @description: 团购活动商品信息规格表
|
||||||
|
* @author: MengFanKuo
|
||||||
|
* @create: 2024-11-26 14:22
|
||||||
|
* *
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ActivityTeamInfoProductSkuDetailResp {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private long id;
|
||||||
|
/**
|
||||||
|
* 拼团名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
private long productId;
|
||||||
|
/**
|
||||||
|
* 商品活动图
|
||||||
|
*/
|
||||||
|
private String productImage;
|
||||||
|
/**
|
||||||
|
* 活动简介
|
||||||
|
*/
|
||||||
|
private String introduction;
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
private String unit;
|
||||||
|
/**
|
||||||
|
* 轮播图
|
||||||
|
*/
|
||||||
|
private String imageList;
|
||||||
|
/**
|
||||||
|
* 活动结束时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
/**
|
||||||
|
* 活动排序
|
||||||
|
*/
|
||||||
|
private long sort;
|
||||||
|
/**
|
||||||
|
* 活动详情
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
/**
|
||||||
|
* 策略类型
|
||||||
|
*/
|
||||||
|
private String strategyType;
|
||||||
|
/**
|
||||||
|
* 策略ID
|
||||||
|
*/
|
||||||
|
private long strategyId;
|
||||||
|
/**
|
||||||
|
* 规格
|
||||||
|
*/
|
||||||
|
private List<ActivityTeamSkuInfoDetail> projectSkuInfoEachRespList;
|
||||||
|
public static ActivityTeamInfoProductSkuDetailResp productSkuDetailBuild(ActivityTeamInfoProductSkuDetailModel activityTeamInfoProductSkuDetailModel){
|
||||||
|
return ActivityTeamInfoProductSkuDetailResp.builder()
|
||||||
|
.id(activityTeamInfoProductSkuDetailModel.getId())
|
||||||
|
.productImage(activityTeamInfoProductSkuDetailModel.getProductImage())
|
||||||
|
.productId(activityTeamInfoProductSkuDetailModel.getProductId())
|
||||||
|
.name(activityTeamInfoProductSkuDetailModel.getName())
|
||||||
|
.endTime(activityTeamInfoProductSkuDetailModel.getEndTime())
|
||||||
|
.content(activityTeamInfoProductSkuDetailModel.getContent())
|
||||||
|
.imageList(activityTeamInfoProductSkuDetailModel.getImageList())
|
||||||
|
.introduction(activityTeamInfoProductSkuDetailModel.getIntroduction())
|
||||||
|
.projectSkuInfoEachRespList(activityTeamInfoProductSkuDetailModel.getProjectSkuInfoAddReqList().stream().map(activityTeamSkuInfoDetailModel -> {
|
||||||
|
return ActivityTeamSkuInfoDetail.infoDetailBuild(activityTeamSkuInfoDetailModel);
|
||||||
|
}).toList())
|
||||||
|
.sort(activityTeamInfoProductSkuDetailModel.getSort())
|
||||||
|
.strategyId(activityTeamInfoProductSkuDetailModel.getStrategyId())
|
||||||
|
.strategyType(activityTeamInfoProductSkuDetailModel.getStrategyType())
|
||||||
|
.unit(activityTeamInfoProductSkuDetailModel.getUnit())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.muyu.marketing.domain.resp;
|
||||||
|
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoProductSkuDetailModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuEditModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamSkuInfoDetailModel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @program: 2204a-cloud-server
|
||||||
|
* @description: 商品规格回显表
|
||||||
|
* @author: MengFanKuo
|
||||||
|
* @create: 2024-11-26 15:20
|
||||||
|
* *
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@SuperBuilder
|
||||||
|
public class ActivityTeamSkuInfoDetail {
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 活动ID
|
||||||
|
*/
|
||||||
|
private long teamId;
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
private Long productId;
|
||||||
|
/**
|
||||||
|
* 规格SKU
|
||||||
|
*/
|
||||||
|
private String sku;
|
||||||
|
/**
|
||||||
|
* 拼团价格
|
||||||
|
*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
/**
|
||||||
|
* 拼团库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
|
||||||
|
public static ActivityTeamSkuInfoDetail infoDetailBuild(ActivityTeamSkuInfoDetailModel activityTeamInfoProductSkuDetailModel){
|
||||||
|
return ActivityTeamSkuInfoDetail.builder()
|
||||||
|
.id(activityTeamInfoProductSkuDetailModel.getId())
|
||||||
|
.sku(activityTeamInfoProductSkuDetailModel.getProductSku())
|
||||||
|
.teamId(activityTeamInfoProductSkuDetailModel.getTeamId())
|
||||||
|
.productId(activityTeamInfoProductSkuDetailModel.getProductId())
|
||||||
|
.teamPrice(activityTeamInfoProductSkuDetailModel.getTeamPrice())
|
||||||
|
.teamStock(activityTeamInfoProductSkuDetailModel.getTeamStock())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,48 +0,0 @@
|
||||||
package com.muyu.marketing.domain.resp;
|
|
||||||
|
|
||||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuModel;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 回显resp
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@SuperBuilder
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class ProjectFindSkuInfoResp {
|
|
||||||
/**
|
|
||||||
* 规格id
|
|
||||||
*/
|
|
||||||
private Long id;
|
|
||||||
/**
|
|
||||||
* 规格SKU
|
|
||||||
*/
|
|
||||||
private String sku;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团价格
|
|
||||||
*/
|
|
||||||
private BigDecimal teamPrice;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团库存
|
|
||||||
*/
|
|
||||||
private Long teamStock;
|
|
||||||
|
|
||||||
public static ProjectFindSkuInfoResp projectFindSkuInfoBuild (ActivityTeamProductSkuModel activityTeamProductSkuModel) {
|
|
||||||
return ProjectFindSkuInfoResp.builder()
|
|
||||||
.teamStock(activityTeamProductSkuModel.getTeamStock())
|
|
||||||
.teamPrice(activityTeamProductSkuModel.getTeamPrice())
|
|
||||||
.id(activityTeamProductSkuModel.getId())
|
|
||||||
.sku(activityTeamProductSkuModel.getSku())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,107 +0,0 @@
|
||||||
package com.muyu.marketing.domain.resp;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamDetailModel;
|
|
||||||
import com.muyu.marketing.domain.req.ProjectSkuInfoAddReq;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @program: 2204a-cloud-server
|
|
||||||
* @description: 团购活动回显响应
|
|
||||||
* @author: AoCi Tian
|
|
||||||
* @create: 2024-11-26 15:19
|
|
||||||
**/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@Builder
|
|
||||||
public class TeamInfoFindByIdResp {
|
|
||||||
/**
|
|
||||||
* 拼团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<ProjectFindSkuInfoResp> projectSkuInfoAddList;
|
|
||||||
/**
|
|
||||||
* 活动详情
|
|
||||||
*/
|
|
||||||
private String content;
|
|
||||||
/**
|
|
||||||
* 活动状态
|
|
||||||
*/
|
|
||||||
private String status;
|
|
||||||
/**
|
|
||||||
* 策略类型
|
|
||||||
*/
|
|
||||||
private String strategyType;
|
|
||||||
/**
|
|
||||||
* 策略ID
|
|
||||||
*/
|
|
||||||
private Long strategyId;
|
|
||||||
|
|
||||||
public static TeamInfoFindByIdResp teamInfoFindByIdBuild (ActivityTeamDetailModel activityTeamDetailModel){
|
|
||||||
return TeamInfoFindByIdResp.builder()
|
|
||||||
.id(activityTeamDetailModel.getId())
|
|
||||||
.name(activityTeamDetailModel.getName())
|
|
||||||
.productId(activityTeamDetailModel.getProductId())
|
|
||||||
.productImage(activityTeamDetailModel.getProductImage())
|
|
||||||
.introduction(activityTeamDetailModel.getIntroduction())
|
|
||||||
.unit(activityTeamDetailModel.getUnit())
|
|
||||||
.imageList(activityTeamDetailModel.getImageList())
|
|
||||||
.endTime(activityTeamDetailModel.getEndTime())
|
|
||||||
.sort(activityTeamDetailModel.getSort())
|
|
||||||
.projectSkuInfoAddList(activityTeamDetailModel.getProjectSkuInfoAddReqList().stream().map(ProjectFindSkuInfoResp::projectFindSkuInfoBuild).toList())
|
|
||||||
// .projectSkuInfoAddList(
|
|
||||||
// teamInfoFindByIdRespModel.getProjectSkuInfoAddReqList().stream().map(activityTeamProductSkuModel ->
|
|
||||||
// ProjectFindSkuInfoResp.projectFindSkuInfoBuild(activityTeamProductSkuModel)).toList()
|
|
||||||
// )
|
|
||||||
.content(activityTeamDetailModel.getContent())
|
|
||||||
.status(activityTeamDetailModel.getStatus())
|
|
||||||
.strategyType(activityTeamDetailModel.getStrategyType())
|
|
||||||
.strategyId(activityTeamDetailModel.getStrategyId())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -3,13 +3,12 @@ package com.muyu.marketing.team.controller;
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
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.ActivityTeamInfoListModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoUpdModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoProductSkuDetailModel;
|
||||||
|
import com.muyu.marketing.domain.req.ActivityTeamInfoEditReq;
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
|
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamInfoUpdReq;
|
|
||||||
import com.muyu.marketing.domain.req.TeamInfoListReq;
|
import com.muyu.marketing.domain.req.TeamInfoListReq;
|
||||||
import com.muyu.marketing.domain.resp.TeamInfoFindByIdResp;
|
import com.muyu.marketing.domain.resp.ActivityTeamInfoProductSkuDetailResp;
|
||||||
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 org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -46,26 +45,28 @@ public class ActivityTeamController {
|
||||||
}}
|
}}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加团购活动
|
* 添加团购活动
|
||||||
* @param activityTeamInfoSaveReq 添加请求对象
|
|
||||||
* @return 结果集
|
|
||||||
*/
|
*/
|
||||||
@PostMapping
|
@PostMapping("/activityTeamInfoAdd")
|
||||||
public Result<String> save(@RequestBody ActivityTeamInfoSaveReq activityTeamInfoSaveReq) {
|
public void activityTeamInfoAdd(@RequestBody ActivityTeamInfoSaveReq activityTeamInfoSaveReq){
|
||||||
activityTeamInfoService.save(ActivityTeamInfoAddModel.addReqBuild(activityTeamInfoSaveReq));
|
activityTeamInfoService.save(activityTeamInfoSaveReq.activityTeamInfoReqBuild());
|
||||||
return Result.success();
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
@PostMapping("/findById/{id}")
|
* 根据id查询拼团商品信息
|
||||||
public Result<TeamInfoFindByIdResp> findTeamById(@PathVariable Long id){
|
*/
|
||||||
return Result.success(TeamInfoFindByIdResp.teamInfoFindByIdBuild(activityTeamInfoService.findDetailById(id)));
|
@PostMapping("/inquireActivityTeam/{id}")
|
||||||
|
public Result<ActivityTeamInfoProductSkuDetailResp> inquireActivityTeam(@PathVariable Long id){
|
||||||
|
ActivityTeamInfoProductSkuDetailModel detailModel = activityTeamInfoService.echo(id);
|
||||||
|
ActivityTeamInfoProductSkuDetailResp productSkuDetailBuild = ActivityTeamInfoProductSkuDetailResp.productSkuDetailBuild(detailModel);
|
||||||
|
return Result.success(productSkuDetailBuild);
|
||||||
}
|
}
|
||||||
@PutMapping("/updateByTeamId")
|
/**
|
||||||
public Result updateByTeamId(@RequestBody ActivityTeamInfoUpdReq activityTeamInfoUpdReq){
|
*修改团购活动
|
||||||
activityTeamInfoService.update(ActivityTeamInfoUpdModel.activityTeamInfoUpdReqModelBuild(activityTeamInfoUpdReq));
|
*/
|
||||||
|
@PostMapping("/activityTeamEdit")
|
||||||
|
public Result<String> activityTeamEdit(@RequestBody ActivityTeamInfoEditReq activityTeamInfoEditReq){
|
||||||
|
activityTeamInfoService.edit(activityTeamInfoEditReq.activityTeamInfoEditBuild());
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.muyu.marketing.team.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.muyu.marketing.team.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemption;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TeamStrategyExemptionHundredMapper extends BaseMapper<TeamStrategyExemptionHundred> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com.muyu.marketing.team.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionOrdinary;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface TeamStrategyExemptionOrdinaryMapper extends BaseMapper<TeamStrategyExemptionOrdinary> {
|
||||||
|
|
||||||
|
}
|
|
@ -1,10 +0,0 @@
|
||||||
package com.muyu.marketing.team.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.muyu.marketing.domain.TeamStrategyHundred;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface TeamStrategyHundredMapper extends BaseMapper<TeamStrategyHundred> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
package com.muyu.marketing.team.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.muyu.marketing.domain.TeamStrategyOrdinary;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface TeamStrategyOrdinaryMapper extends BaseMapper<TeamStrategyOrdinary> {
|
|
||||||
|
|
||||||
}
|
|
|
@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
import com.muyu.marketing.domain.model.*;
|
import com.muyu.marketing.domain.model.*;
|
||||||
|
import com.muyu.marketing.domain.req.ActivityTeamInfoEditReq;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface ActivityTeamInfoService extends IService<ActivityTeamInfo> {
|
public interface ActivityTeamInfoService extends IService<ActivityTeamInfo> {
|
||||||
|
|
||||||
|
@ -20,20 +23,15 @@ public interface ActivityTeamInfoService extends IService<ActivityTeamInfo> {
|
||||||
* @param activityTeamInfoAddModel 团购添加模型
|
* @param activityTeamInfoAddModel 团购添加模型
|
||||||
*/
|
*/
|
||||||
public void save(ActivityTeamInfoAddModel activityTeamInfoAddModel);
|
public void save(ActivityTeamInfoAddModel activityTeamInfoAddModel);
|
||||||
|
/**
|
||||||
|
* 同过活动id回显团购活动信息
|
||||||
|
*/
|
||||||
|
public ActivityTeamInfoProductSkuDetailModel echo(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询商品的详情
|
* 通过修改模型 去进行商品拼团活动的操作
|
||||||
* @param id 团购活动ID
|
* @param activityTeamInfoEditModel
|
||||||
* @return 团购详情
|
|
||||||
*/
|
*/
|
||||||
ActivityTeamDetailModel findDetailById(Long id);
|
void edit(ActivityTeamInfoEditModel activityTeamInfoEditModel);
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改团购活动信息
|
|
||||||
* @param activityTeamInfoUpdModel 团购活动信息
|
|
||||||
* @return 是否成功
|
|
||||||
*/
|
|
||||||
boolean update(ActivityTeamInfoUpdModel activityTeamInfoUpdModel);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,60 +14,32 @@ public interface ActivityTeamProductSkuInfoService extends IService<ActivityTeam
|
||||||
lambdaQueryWrapper.eq(ActivityTeamProductSkuInfo::getTeamId, teamId);
|
lambdaQueryWrapper.eq(ActivityTeamProductSkuInfo::getTeamId, teamId);
|
||||||
return this.list(lambdaQueryWrapper);
|
return this.list(lambdaQueryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过团购活动ID获取团购中最优惠的价格
|
* 通过团购活动ID获取团购中最优惠的价格
|
||||||
* @param teamId 团购ID
|
* @param teamId 团购ID
|
||||||
* @return 优惠价格
|
* @return 优惠价格
|
||||||
*/
|
*/
|
||||||
public TeamProductDiscountPriceModel getDiscountPrice(Long teamId);
|
public TeamProductDiscountPriceModel getDiscountPrice(Long teamId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过活动ID获取 剩余库存
|
* 通过活动ID获取 剩余库存
|
||||||
* @param teamId 活动ID
|
* @param teamId 活动ID
|
||||||
* @return 库存
|
* @return 库存
|
||||||
*/
|
*/
|
||||||
public TeamProductStockModel getStock(Long teamId);
|
public TeamProductStockModel getStock(Long teamId);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加团购商品SKU
|
* 添加团购商品SKU
|
||||||
* @param activityTeamProductSkuAddModelList 团购商品SKU添加模型集合
|
* @param activityTeamProductSkuAddModelList 团购商品SKU添加模型集合
|
||||||
*/
|
*/
|
||||||
public void batchSave(List<ActivityTeamProductSkuAddModel> activityTeamProductSkuAddModelList);
|
public void batchSave(List<ActivityTeamProductSkuAddModel> activityTeamProductSkuAddModelList);
|
||||||
|
/**
|
||||||
|
* 根据团购id查询商品详细信息
|
||||||
|
*/
|
||||||
|
public List<ActivityTeamSkuInfoDetailModel> findByListSkuInfo(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过拼团活动ID获取拼团下商品SKU集合
|
* 修改
|
||||||
* @param teamId 活动ID
|
* @param activityTeamProductSkuEditModelList
|
||||||
* @return 拼团商品SKU集合
|
|
||||||
*/
|
*/
|
||||||
public List<ActivityTeamProductSkuModel> findListByTeamId(Long teamId);
|
void editSku(List<ActivityTeamProductSkuEditModel> activityTeamProductSkuEditModelList);
|
||||||
|
|
||||||
public boolean updateBath(List<ActivityTeamProductSkuReqModel> activityTeamProductSkuReqModelList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据 业务模型 进行 团购商品修改
|
|
||||||
* @param activityTeamProductSkuUpdModel 修改业务模型
|
|
||||||
* @return 修改结果
|
|
||||||
*/
|
|
||||||
public boolean update(ActivityTeamProductSkuUpdModel activityTeamProductSkuUpdModel);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据 业务模型 进行 团购商品批量修改
|
|
||||||
* @param activityTeamProductSkuUpdModelList 修改业务模型
|
|
||||||
* @return 修改结果
|
|
||||||
*/
|
|
||||||
public boolean batchUpdate(List<ActivityTeamProductSkuUpdModel> activityTeamProductSkuUpdModelList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 一键设置
|
|
||||||
* @param activityTeamProductSkuSettingModel 整体修改模型
|
|
||||||
*/
|
|
||||||
public default void setting(ActivityTeamProductSkuSettingModel activityTeamProductSkuSettingModel){
|
|
||||||
this.batchSave(activityTeamProductSkuSettingModel.getActivityTeamProductSkuAddModelList());
|
|
||||||
this.batchUpdate(activityTeamProductSkuSettingModel.getActivityTeamProductSkuUpdModelList());
|
|
||||||
this.removeByIds(activityTeamProductSkuSettingModel.getRemoveIds());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.muyu.marketing.team.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionOrdinary;
|
||||||
|
|
||||||
|
public interface TeamStrategyExemptionHundredService extends IService<TeamStrategyExemptionHundred> {
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.muyu.marketing.team.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionOrdinary;
|
||||||
|
|
||||||
|
public interface TeamStrategyExemptionOrdinaryService extends IService<TeamStrategyExemptionOrdinary> {
|
||||||
|
}
|
|
@ -2,10 +2,7 @@ package com.muyu.marketing.team.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.marketing.domain.TeamStrategyExemption;
|
import com.muyu.marketing.domain.TeamStrategyExemption;
|
||||||
import com.muyu.marketing.team.strategy.ActivityTeamStrategy;
|
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||||
|
|
||||||
/**
|
public interface TeamStrategyExemptionService extends IService<TeamStrategyExemption> {
|
||||||
* 免单
|
|
||||||
*/
|
|
||||||
public interface TeamStrategyExemptionService extends ActivityTeamStrategy, IService<TeamStrategyExemption> {
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
package com.muyu.marketing.team.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.muyu.marketing.domain.TeamStrategyHundred;
|
|
||||||
import com.muyu.marketing.team.strategy.ActivityTeamStrategy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 百人
|
|
||||||
*/
|
|
||||||
public interface TeamStrategyHundredService extends ActivityTeamStrategy, IService<TeamStrategyHundred> {
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
package com.muyu.marketing.team.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.muyu.marketing.domain.TeamStrategyOrdinary;
|
|
||||||
import com.muyu.marketing.team.strategy.ActivityTeamStrategy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 普通
|
|
||||||
*/
|
|
||||||
public interface TeamStrategyOrdinaryService extends ActivityTeamStrategy, IService<TeamStrategyOrdinary> {
|
|
||||||
}
|
|
|
@ -6,14 +6,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamOpenInfo;
|
||||||
import com.muyu.marketing.domain.model.*;
|
import com.muyu.marketing.domain.model.*;
|
||||||
import com.muyu.marketing.team.mapper.ActivityTeamInfoMapper;
|
import com.muyu.marketing.team.mapper.ActivityTeamInfoMapper;
|
||||||
import com.muyu.marketing.team.service.ActivityTeamInfoService;
|
import com.muyu.marketing.team.service.ActivityTeamInfoService;
|
||||||
import com.muyu.marketing.team.service.ActivityTeamOpenInfoService;
|
import com.muyu.marketing.team.service.ActivityTeamOpenInfoService;
|
||||||
import com.muyu.marketing.team.service.ActivityTeamProductSkuInfoService;
|
import com.muyu.marketing.team.service.ActivityTeamProductSkuInfoService;
|
||||||
|
import io.jsonwebtoken.lang.Assert;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.Assert;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -30,11 +31,9 @@ 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<>();
|
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> -> 创建对象的时候进行的占用
|
* Object<T> -> 创建对象的时候进行的占用
|
||||||
* <T> Result<T> 以方法返回值为占用
|
* <T> Result<T> 以方法返回值为占用
|
||||||
|
@ -73,36 +72,38 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
||||||
@Override
|
@Override
|
||||||
public void save(ActivityTeamInfoAddModel activityTeamInfoAddModel) {
|
public void save(ActivityTeamInfoAddModel activityTeamInfoAddModel) {
|
||||||
ActivityTeamInfo activityTeamInfo = ActivityTeamInfo.addModelBuild(activityTeamInfoAddModel);
|
ActivityTeamInfo activityTeamInfo = ActivityTeamInfo.addModelBuild(activityTeamInfoAddModel);
|
||||||
Assert.isTrue(this.save(activityTeamInfo), StringUtils.format("团购活动添加失败:[{}]", activityTeamInfoAddModel));
|
Assert.isTrue(this.save(activityTeamInfo),StringUtils.format("团购活动添加失败:[{}]", activityTeamInfoAddModel));
|
||||||
List<ActivityTeamProductSkuAddModel> teamProductSkuAddModelList = activityTeamInfoAddModel.getActivityTeamProductSkuAddModelList();
|
List<ActivityTeamProductSkuAddModel> productSkuAddModels = activityTeamInfoAddModel.getActivityTeamProductSkuAddModelList();
|
||||||
teamProductSkuAddModelList.forEach(activityTeamProductSkuAddModel -> activityTeamProductSkuAddModel.setTeamId(activityTeamInfo.getId()));
|
productSkuAddModels.forEach(activityTeamProductSkuAddModel -> {activityTeamProductSkuAddModel.setTeamId(activityTeamInfo.getId());});
|
||||||
this.activityTeamProductSkuInfoService.batchSave(teamProductSkuAddModelList);
|
activityTeamProductSkuInfoService.batchSave(productSkuAddModels);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询商品的详情
|
* 根据团购活动id查询详情
|
||||||
* @param id 团购活动ID
|
* @param id
|
||||||
* @return 团购详情
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ActivityTeamDetailModel findDetailById(Long id) {
|
public ActivityTeamInfoProductSkuDetailModel echo(Long id) {
|
||||||
ActivityTeamInfo activityTeamInfo = this.getById(id);
|
ActivityTeamInfo activityTeamInfo = this.getById(id);
|
||||||
List<ActivityTeamProductSkuModel> activityTeamProductSkuModelList = activityTeamProductSkuInfoService.findListByTeamId(id);
|
List<ActivityTeamSkuInfoDetailModel> infoServiceByListSkuInfo = activityTeamProductSkuInfoService.findByListSkuInfo(id);
|
||||||
return ActivityTeamDetailModel.findSkuSumList(activityTeamInfo,
|
return ActivityTeamInfoProductSkuDetailModel.skuInfoDetailBuild(activityTeamInfo,infoServiceByListSkuInfo);
|
||||||
(teamInfoFindByIdRespModelBuilder) -> teamInfoFindByIdRespModelBuilder.projectSkuInfoAddReqList(activityTeamProductSkuModelList).build()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改团购活动信息
|
* 通过修改模型,去进行商品拼团活动的操作
|
||||||
* @param activityTeamInfoUpdModel 团购活动信息
|
* @param activityTeamInfoEditModel 修改模型
|
||||||
* @return 是否成功
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean update(ActivityTeamInfoUpdModel activityTeamInfoUpdModel) {
|
public void edit(ActivityTeamInfoEditModel activityTeamInfoEditModel) {
|
||||||
boolean update = this.updateById(ActivityTeamInfo.TeamUpdateBuild(activityTeamInfoUpdModel));
|
//修改拼团活动
|
||||||
Assert.isTrue(update,"修改失败");
|
ActivityTeamInfo activityTeamInfo = ActivityTeamInfo.editBuild(activityTeamInfoEditModel);
|
||||||
activityTeamProductSkuInfoService.setting(activityTeamInfoUpdModel.getActivityTeamProductSkuSettingModel());
|
this.updateById(activityTeamInfo);
|
||||||
return update;
|
List<ActivityTeamProductSkuEditModel> activityTeamProductSkuEditModelList = activityTeamInfoEditModel.getActivityTeamProductSkuEditModels();
|
||||||
|
activityTeamProductSkuEditModelList.forEach(activityTeamProductSkuEditModel -> {
|
||||||
|
activityTeamProductSkuEditModel.setTeamId(activityTeamInfo.getId());
|
||||||
|
activityTeamProductSkuEditModel.setProductId(activityTeamInfo.getProductId());
|
||||||
|
});
|
||||||
|
activityTeamProductSkuInfoService.editSku(activityTeamProductSkuEditModelList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,26 @@
|
||||||
package com.muyu.marketing.team.service.impl;
|
package com.muyu.marketing.team.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.common.core.exception.ServiceException;
|
import com.muyu.common.core.exception.ServiceException;
|
||||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||||
import com.muyu.marketing.domain.model.*;
|
import com.muyu.marketing.domain.model.*;
|
||||||
|
import com.muyu.marketing.domain.resp.ActivityTeamSkuInfoDetail;
|
||||||
import com.muyu.marketing.team.mapper.ActivityTeamProductSkuInfoMapper;
|
import com.muyu.marketing.team.mapper.ActivityTeamProductSkuInfoMapper;
|
||||||
import com.muyu.marketing.team.service.ActivityTeamProductSkuInfoService;
|
import com.muyu.marketing.team.service.ActivityTeamProductSkuInfoService;
|
||||||
import com.muyu.product.cache.ProjectSkuCache;
|
import com.muyu.product.cache.ProjectSkuCache;
|
||||||
import com.muyu.product.domain.ProjectSkuInfo;
|
import com.muyu.product.domain.ProjectSkuInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.math.RoundingMode;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityTeamProductSkuInfoMapper, ActivityTeamProductSkuInfo>
|
public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityTeamProductSkuInfoMapper, ActivityTeamProductSkuInfo>
|
||||||
implements ActivityTeamProductSkuInfoService {
|
implements ActivityTeamProductSkuInfoService {
|
||||||
|
@Autowired
|
||||||
|
private ActivityTeamProductSkuInfoService activityTeamProductSkuInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectSkuCache projectSkuCache;
|
private ProjectSkuCache projectSkuCache;
|
||||||
|
|
||||||
|
@ -76,63 +72,34 @@ public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityT
|
||||||
if (activityTeamProductSkuAddModelList == null || activityTeamProductSkuAddModelList.isEmpty()) {
|
if (activityTeamProductSkuAddModelList == null || activityTeamProductSkuAddModelList.isEmpty()) {
|
||||||
throw new ServiceException("入参添加商品规格模型,不可为空");
|
throw new ServiceException("入参添加商品规格模型,不可为空");
|
||||||
}
|
}
|
||||||
this.saveBatch(
|
List<ActivityTeamProductSkuInfo> teamProductSkuInfoList = activityTeamProductSkuAddModelList.stream().map(ActivityTeamProductSkuInfo::modelBuild).toList();
|
||||||
activityTeamProductSkuAddModelList.stream().map(ActivityTeamProductSkuInfo::modelBuild).toList()
|
this.saveBatch(teamProductSkuInfoList);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过拼团活动ID获取拼团下商品SKU集合
|
* 根据团购活动id查找商品sku
|
||||||
*
|
* @param id
|
||||||
* @param teamId 活动ID
|
* @return
|
||||||
* @return 拼团商品SKU集合
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<ActivityTeamProductSkuModel> findListByTeamId(Long teamId) {
|
public List<ActivityTeamSkuInfoDetailModel> findByListSkuInfo(Long id) {
|
||||||
LambdaQueryWrapper<ActivityTeamProductSkuInfo> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ActivityTeamProductSkuInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ActivityTeamProductSkuInfo::getTeamId,teamId);
|
queryWrapper.eq(ActivityTeamProductSkuInfo::getTeamId,id);
|
||||||
List<ActivityTeamProductSkuInfo> list = this.list(queryWrapper);
|
List<ActivityTeamProductSkuInfo> productSkuInfoList = activityTeamProductSkuInfoService.list(queryWrapper);
|
||||||
return list.stream().map(ActivityTeamProductSkuModel::FindBuild).toList();
|
List<ActivityTeamSkuInfoDetailModel> detailModelList = productSkuInfoList.stream().map(activityTeamProductSkuInfo -> {
|
||||||
// return list.stream().map(activityTeamProductSkuInfo -> ActivityTeamProductSkuModel.FindBuild(activityTeamProductSkuInfo)).toList();
|
return ActivityTeamSkuInfoDetailModel.productSkuInfoEachBuild(activityTeamProductSkuInfo);
|
||||||
}
|
}).toList();
|
||||||
|
return detailModelList;
|
||||||
@Transactional
|
|
||||||
@Override
|
|
||||||
public boolean updateBath(List<ActivityTeamProductSkuReqModel> activityTeamProductSkuReqModelList) {
|
|
||||||
return this.updateBatchById(activityTeamProductSkuReqModelList.stream().map(ActivityTeamProductSkuInfo::updateModelBuild).toList());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据 业务模型 进行 团购商品修改
|
* 修改团购商品sku表
|
||||||
*
|
* @param activityTeamProductSkuEditModelList
|
||||||
* @param activityTeamProductSkuUpdModel 修改业务模型
|
|
||||||
* @return 修改结果
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean update(ActivityTeamProductSkuUpdModel activityTeamProductSkuUpdModel) {
|
public void editSku(List<ActivityTeamProductSkuEditModel> activityTeamProductSkuEditModelList) {
|
||||||
// update set where
|
List<ActivityTeamProductSkuInfo> activityTeamProductSkuInfoList = activityTeamProductSkuEditModelList.stream().map(activityTeamProductSkuEditModel -> {
|
||||||
LambdaUpdateWrapper<ActivityTeamProductSkuInfo> updateWrapper = new LambdaUpdateWrapper<>();
|
return ActivityTeamProductSkuInfo.skuInfoBuild(activityTeamProductSkuEditModel);
|
||||||
// 字段=值
|
}).toList();
|
||||||
updateWrapper.set(ActivityTeamProductSkuInfo::getTeamStock,activityTeamProductSkuUpdModel.getTeamStock());
|
this.updateBatchById(activityTeamProductSkuInfoList);
|
||||||
updateWrapper.set(ActivityTeamProductSkuInfo::getRemainStock,activityTeamProductSkuUpdModel.getTeamStock());
|
|
||||||
updateWrapper.set(ActivityTeamProductSkuInfo::getTeamPrice,activityTeamProductSkuUpdModel.getTeamPrice());
|
|
||||||
// id=?
|
|
||||||
updateWrapper.eq(ActivityTeamProductSkuInfo::getId,activityTeamProductSkuUpdModel.getId());
|
|
||||||
return this.update(updateWrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据 业务模型 进行 团购商品批量修改
|
|
||||||
*
|
|
||||||
* @param activityTeamProductSkuUpdModelList 修改业务模型
|
|
||||||
* @return 修改结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public boolean batchUpdate(List<ActivityTeamProductSkuUpdModel> activityTeamProductSkuUpdModelList) {
|
|
||||||
return this.updateBatchById(
|
|
||||||
activityTeamProductSkuUpdModelList.stream()
|
|
||||||
.map(ActivityTeamProductSkuInfo::updModelBuild)
|
|
||||||
.toList()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.muyu.marketing.team.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemption;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||||
|
import com.muyu.marketing.team.mapper.TeamStrategyExemptionHundredMapper;
|
||||||
|
import com.muyu.marketing.team.mapper.TeamStrategyExemptionMapper;
|
||||||
|
import com.muyu.marketing.team.service.TeamStrategyExemptionHundredService;
|
||||||
|
import com.muyu.marketing.team.service.TeamStrategyExemptionService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class TeamStrategyExemptionHundredServiceImpl extends ServiceImpl<TeamStrategyExemptionHundredMapper, TeamStrategyExemptionHundred>
|
||||||
|
implements TeamStrategyExemptionHundredService {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.muyu.marketing.team.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemptionOrdinary;
|
||||||
|
import com.muyu.marketing.team.mapper.TeamStrategyExemptionOrdinaryMapper;
|
||||||
|
import com.muyu.marketing.team.service.TeamStrategyExemptionOrdinaryService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class TeamStrategyExemptionOrdinaryServiceImpl extends ServiceImpl<TeamStrategyExemptionOrdinaryMapper, TeamStrategyExemptionOrdinary>
|
||||||
|
implements TeamStrategyExemptionOrdinaryService {
|
||||||
|
|
||||||
|
}
|
|
@ -4,62 +4,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.marketing.domain.TeamStrategyExemption;
|
import com.muyu.marketing.domain.TeamStrategyExemption;
|
||||||
import com.muyu.marketing.team.mapper.TeamStrategyExemptionMapper;
|
import com.muyu.marketing.team.mapper.TeamStrategyExemptionMapper;
|
||||||
import com.muyu.marketing.team.service.TeamStrategyExemptionService;
|
import com.muyu.marketing.team.service.TeamStrategyExemptionService;
|
||||||
import lombok.extern.log4j.Log4j2;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Log4j2
|
@Service
|
||||||
@Service("team-strategy-exemption")
|
|
||||||
public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption>
|
public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption>
|
||||||
implements TeamStrategyExemptionService {
|
implements TeamStrategyExemptionService {
|
||||||
|
|
||||||
/**
|
|
||||||
* 开团
|
|
||||||
*
|
|
||||||
* @param activityTeamId 团购活动ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void openTeam(Long activityTeamId) {
|
|
||||||
log.info("参加 - 免单团 - [{}]", activityTeamId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 申请加团
|
|
||||||
*
|
|
||||||
* @param teamId 团ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void applyTeam(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参团
|
|
||||||
*
|
|
||||||
* @param teamId 加团ID
|
|
||||||
* @param orderNumber 订单编号
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void addTeam(Long teamId, String orderNumber) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退团
|
|
||||||
*
|
|
||||||
* @param teamId 团购ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void backTeam(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结算团
|
|
||||||
*
|
|
||||||
* @param teamId 团购ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void settle(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
package com.muyu.marketing.team.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.muyu.marketing.domain.TeamStrategyHundred;
|
|
||||||
import com.muyu.marketing.team.mapper.TeamStrategyHundredMapper;
|
|
||||||
import com.muyu.marketing.team.service.TeamStrategyHundredService;
|
|
||||||
import lombok.extern.log4j.Log4j2;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Log4j2
|
|
||||||
@Service("team-strategy-hundred")
|
|
||||||
public class TeamStrategyHundredServiceImpl extends ServiceImpl<TeamStrategyHundredMapper, TeamStrategyHundred>
|
|
||||||
implements TeamStrategyHundredService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开团
|
|
||||||
*
|
|
||||||
* @param activityTeamId 团购活动ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void openTeam(Long activityTeamId) {
|
|
||||||
|
|
||||||
log.info("参加 - 百人团 - [{}]", activityTeamId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 申请加团
|
|
||||||
*
|
|
||||||
* @param teamId 团ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void applyTeam(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参团
|
|
||||||
*
|
|
||||||
* @param teamId 加团ID
|
|
||||||
* @param orderNumber 订单编号
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void addTeam(Long teamId, String orderNumber) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退团
|
|
||||||
*
|
|
||||||
* @param teamId 团购ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void backTeam(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结算团
|
|
||||||
*
|
|
||||||
* @param teamId 团购ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void settle(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,66 +0,0 @@
|
||||||
package com.muyu.marketing.team.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.muyu.marketing.domain.TeamStrategyOrdinary;
|
|
||||||
import com.muyu.marketing.team.mapper.TeamStrategyOrdinaryMapper;
|
|
||||||
import com.muyu.marketing.team.service.TeamStrategyOrdinaryService;
|
|
||||||
import lombok.extern.log4j.Log4j2;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Log4j2
|
|
||||||
@Service("team-strategy-ordinary")
|
|
||||||
public class TeamStrategyOrdinaryServiceImpl extends ServiceImpl<TeamStrategyOrdinaryMapper, TeamStrategyOrdinary>
|
|
||||||
implements TeamStrategyOrdinaryService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开团
|
|
||||||
*
|
|
||||||
* @param activityTeamId 团购活动ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void openTeam(Long activityTeamId) {
|
|
||||||
|
|
||||||
log.info("参加 - 普通团 - [{}]", activityTeamId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 申请加团
|
|
||||||
*
|
|
||||||
* @param teamId 团ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void applyTeam(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参团
|
|
||||||
*
|
|
||||||
* @param teamId 加团ID
|
|
||||||
* @param orderNumber 订单编号
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void addTeam(Long teamId, String orderNumber) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退团
|
|
||||||
*
|
|
||||||
* @param teamId 团购ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void backTeam(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结算团
|
|
||||||
*
|
|
||||||
* @param teamId 团购ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void settle(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
package com.muyu.marketing.team.strategy;
|
|
||||||
|
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 团活动策略
|
|
||||||
*
|
|
||||||
* @author DongZeLiang
|
|
||||||
* @date 2024-11-29 15:03
|
|
||||||
*/
|
|
||||||
public interface ActivityTeamStrategy {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 开团
|
|
||||||
* @param activityTeamId 团购活动ID
|
|
||||||
*/
|
|
||||||
public void openTeam(Long activityTeamId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 申请加团
|
|
||||||
* @param teamId 团ID
|
|
||||||
*/
|
|
||||||
public void applyTeam(Long teamId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参团
|
|
||||||
* @param teamId 加团ID
|
|
||||||
* @param orderNumber 订单编号
|
|
||||||
*/
|
|
||||||
public void addTeam(Long teamId, String orderNumber);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退团
|
|
||||||
* @param teamId 团购ID
|
|
||||||
*/
|
|
||||||
public void backTeam(Long teamId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结算团
|
|
||||||
* @param teamId 团购ID
|
|
||||||
*/
|
|
||||||
public void settle(Long teamId);
|
|
||||||
}
|
|
|
@ -1,85 +0,0 @@
|
||||||
package com.muyu.marketing.team.strategy.impl;
|
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.common.core.exception.ServiceException;
|
|
||||||
import com.muyu.common.core.utils.SpringUtils;
|
|
||||||
import com.muyu.marketing.team.strategy.ActivityTeamStrategy;
|
|
||||||
import org.springframework.context.annotation.Primary;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 团购执行器
|
|
||||||
*
|
|
||||||
* @author DongZeLiang
|
|
||||||
* @date 2024-11-29 15:28
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@Primary
|
|
||||||
public class ActivityTeamStrategyImpl implements ActivityTeamStrategy {
|
|
||||||
/**
|
|
||||||
* 开团
|
|
||||||
*
|
|
||||||
* @param activityTeamId 团购活动ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void openTeam(Long activityTeamId) {
|
|
||||||
// 假设这里是通过方法获取的type,activityTeamId.toString()
|
|
||||||
// "team-strategy-exemption"
|
|
||||||
// "team-strategy-hundred"
|
|
||||||
// "team-strategy-ordinary"
|
|
||||||
|
|
||||||
String activityTeamType = null;
|
|
||||||
if (activityTeamId == null) {
|
|
||||||
throw new ServiceException("activityTeamId is null");
|
|
||||||
}else if (activityTeamId == 0) {
|
|
||||||
activityTeamType = "team-strategy-exemption";
|
|
||||||
}else if (activityTeamId == 1) {
|
|
||||||
activityTeamType = "team-strategy-hundred";
|
|
||||||
}else if (activityTeamId == 2) {
|
|
||||||
activityTeamType = "team-strategy-ordinary";
|
|
||||||
}
|
|
||||||
ActivityTeamStrategy activityTeamStrategy = SpringUtils.getBean(activityTeamType);
|
|
||||||
activityTeamStrategy.openTeam(activityTeamId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 申请加团
|
|
||||||
*
|
|
||||||
* @param teamId 团ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void applyTeam(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参团
|
|
||||||
*
|
|
||||||
* @param teamId 加团ID
|
|
||||||
* @param orderNumber 订单编号
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void addTeam(Long teamId, String orderNumber) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退团
|
|
||||||
*
|
|
||||||
* @param teamId 团购ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void backTeam(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 结算团
|
|
||||||
*
|
|
||||||
* @param teamId 团购ID
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void settle(Long teamId) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -6,18 +6,22 @@ server:
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: muyu-buy
|
name: muyu-marketing
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
active: dev
|
active: dev
|
||||||
|
main:
|
||||||
|
allow-circular-references: true
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
@ -26,3 +30,4 @@ spring:
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
com.muyu.marketing.mapper: DEBUG
|
com.muyu.marketing.mapper: DEBUG
|
||||||
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
package com.muyu.test;
|
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.marketing.MuYuMarketIngApplication;
|
|
||||||
import com.muyu.marketing.team.strategy.ActivityTeamStrategy;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 测试
|
|
||||||
*
|
|
||||||
* @author DongZeLiang
|
|
||||||
* @date 2024-11-29 15:40
|
|
||||||
*/
|
|
||||||
@SpringBootTest(classes = MuYuMarketIngApplication.class)
|
|
||||||
public class TeamStrategyTest {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ActivityTeamStrategy activityTeamStrategy;
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testStrategy() {
|
|
||||||
activityTeamStrategy.openTeam(0L);
|
|
||||||
activityTeamStrategy.openTeam(1L);
|
|
||||||
activityTeamStrategy.openTeam(2L);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -16,10 +16,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 123.249.122.74:8848
|
||||||
|
namespace: mall
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
Loading…
Reference in New Issue