批量添加,删除,修改
parent
47def732f2
commit
6301303502
|
@ -30,3 +30,38 @@
|
||||||
|
|
||||||
"详情": "String"
|
"详情": "String"
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
"id": "Long",//活动ID
|
||||||
|
"productId": "Long",//商品ID
|
||||||
|
"name": "String",//活动名称
|
||||||
|
"pname": "String",//商品名称
|
||||||
|
"productImage": "String",//商品图片
|
||||||
|
"introduction": "String",//活动简介
|
||||||
|
"unit": "String",//商品单位
|
||||||
|
"imageList": [//商品的轮播图
|
||||||
|
"String", "String"
|
||||||
|
],
|
||||||
|
"endTime": "date",//活动时间
|
||||||
|
"strategyType": "String",//策略类型
|
||||||
|
"ActivityTeamProductSkuUpdDelAddModel": {// 商品规格
|
||||||
|
"ActivityTeamProductSkuUpdListModel": [ // 修改商品规格List
|
||||||
|
{
|
||||||
|
"id": "Long",//团购规格ID
|
||||||
|
"teamPrice": "BigDecimal",//拼团价格
|
||||||
|
"teamStock": "Long"//拼团库存
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ActivityTeamProductSkuDelListModel" : ["id", "id"],//删除商品规格IdList
|
||||||
|
"ActivityTeamProductSkuAddListModel": [//添加商品规格List
|
||||||
|
{
|
||||||
|
|
||||||
|
"sku": "String",//商品SKU
|
||||||
|
"productPrice": "BigDecimal",//商品价格
|
||||||
|
"teamPrice": "BigDecimal",//拼团价格
|
||||||
|
"teamStock": "Long"// 拼团库存
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"content": "String"//详情
|
||||||
|
}
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
@ -33,7 +35,8 @@ spring:
|
||||||
datasource:
|
datasource:
|
||||||
ds1:
|
ds1:
|
||||||
nacos:
|
nacos:
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
dataId: sentinel-muyu-gateway
|
dataId: sentinel-muyu-gateway
|
||||||
groupId: DEFAULT_GROUP
|
groupId: DEFAULT_GROUP
|
||||||
data-type: json
|
data-type: json
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -5,6 +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.ActivityTeamProductSkuAddModel;
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuReqModel;
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuReqModel;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
@ -73,4 +74,13 @@ public class ActivityTeamProductSkuInfo extends BaseEntity {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ActivityTeamProductSkuInfo updModelBuild(ActivityTeamProductSkuModel activityTeamProductSkuModel){
|
||||||
|
return ActivityTeamProductSkuInfo.builder()
|
||||||
|
.id(activityTeamProductSkuModel.getId())
|
||||||
|
.teamPrice(activityTeamProductSkuModel.getTeamPrice())
|
||||||
|
.teamStock(activityTeamProductSkuModel.getTeamStock())
|
||||||
|
.remainStock(activityTeamProductSkuModel.getTeamStock())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class ActivityTeamInfoSaveModel {
|
||||||
.unit(activityTeamInfoAddModel.getUnit())
|
.unit(activityTeamInfoAddModel.getUnit())
|
||||||
.imageList(activityTeamInfoAddModel.getImageList())
|
.imageList(activityTeamInfoAddModel.getImageList())
|
||||||
.endTime(activityTeamInfoAddModel.getEndTime())
|
.endTime(activityTeamInfoAddModel.getEndTime())
|
||||||
.sort(activityTeamInfoAddModel.getSort())
|
.sort(Long.valueOf(activityTeamInfoAddModel.getSort()))
|
||||||
.content(activityTeamInfoAddModel.getContent())
|
.content(activityTeamInfoAddModel.getContent())
|
||||||
.status(activityTeamInfoAddModel.getStatus())
|
.status(activityTeamInfoAddModel.getStatus())
|
||||||
.strategyType(activityTeamInfoAddModel.getStrategyType())
|
.strategyType(activityTeamInfoAddModel.getStrategyType())
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
|
||||||
|
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
||||||
|
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 ActivityTeamProductSkuAddListModel {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格SKU
|
||||||
|
*/
|
||||||
|
private String sku;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品价格
|
||||||
|
*/
|
||||||
|
private BigDecimal productPrice;
|
||||||
|
/**
|
||||||
|
* 拼团价格
|
||||||
|
*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.muyu.marketing.domain.model;/**
|
||||||
|
* @Author:尚志豪
|
||||||
|
* @Package:com.muyu.marketing.domain.model
|
||||||
|
* @Project:2204a-cloud-server-DongZeLiang
|
||||||
|
* @name:ActivityTeamProductSkuDelModel
|
||||||
|
* @Date:2024/11/27 17:03
|
||||||
|
*/
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @program: 2204a-cloud-server-DongZeLiang
|
||||||
|
* @description: 删除商品规格
|
||||||
|
* @author: CuiFu Bo
|
||||||
|
* @create: 2024-11-27 17:03
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ActivityTeamProductSkuDelListModel {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品活动,修改,删除,添加,模型
|
||||||
|
*
|
||||||
|
* @author DongZeLiang
|
||||||
|
* @date 2024-11-26 15:35
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ActivityTeamProductSkuUpdDelAddModel {
|
||||||
|
/**
|
||||||
|
* 修改商品规格LIST
|
||||||
|
*/
|
||||||
|
private List<ActivityTeamProductSkuUpdListModel> activityTeamProductSkuUpdModelList;
|
||||||
|
/**
|
||||||
|
* 删除商品规格LIST
|
||||||
|
*/
|
||||||
|
private List<ActivityTeamProductSkuDelListModel> activityTeamProductSkuDelModelList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加商品规格LIST
|
||||||
|
*/
|
||||||
|
private List<ActivityTeamProductSkuAddListModel> ActivityTeamProductSkuAddListModelList;
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
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-27 14:18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ActivityTeamProductSkuUpdListModel {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团购价格
|
||||||
|
*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团购库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @program: 2204a-cloud-server
|
||||||
|
* @description: 活动回显总模型
|
||||||
|
* @author: AoCi Tian
|
||||||
|
* @create: 2024-11-26 16:00
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class ActivityTeamUpdateModel {
|
||||||
|
/**
|
||||||
|
* 拼团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;
|
||||||
|
/**
|
||||||
|
* 商品规格
|
||||||
|
*/
|
||||||
|
private List<ActivityTeamProductSkuUpdDelAddModel> activityTeamProductSkuUpdDelAddModelList;
|
||||||
|
/**
|
||||||
|
* 活动详情
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
/**
|
||||||
|
* 活动状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 策略类型
|
||||||
|
*/
|
||||||
|
private String strategyType;
|
||||||
|
/**
|
||||||
|
* 策略ID
|
||||||
|
*/
|
||||||
|
private Long strategyId;
|
||||||
|
|
||||||
|
}
|
|
@ -2,7 +2,6 @@ package com.muyu.marketing.domain.resp;
|
||||||
|
|
||||||
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.req.TeamProjectSkuInfoAddReq;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package com.muyu.marketing.domain.resp;
|
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 com.muyu.marketing.domain.model.ActivityTeamProductSkuModel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package com.muyu.marketing.domain.resp;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamDetailModel;
|
import com.muyu.marketing.domain.model.ActivityTeamDetailModel;
|
||||||
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;
|
||||||
|
|
|
@ -3,17 +3,14 @@ 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.*;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
|
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
|
||||||
import com.muyu.marketing.domain.req.TeamInfoListReq;
|
import com.muyu.marketing.domain.req.TeamInfoListReq;
|
||||||
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 com.muyu.marketing.team.service.ActivityTeamProductSkuInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -28,7 +25,9 @@ import java.util.List;
|
||||||
public class ActivityTeamController {
|
public class ActivityTeamController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ActivityTeamInfoService activityTeamInfoService;;
|
private ActivityTeamInfoService activityTeamInfoService;
|
||||||
|
@Autowired
|
||||||
|
private ActivityTeamProductSkuInfoService skuInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询营销团购活动列表
|
* 查询营销团购活动列表
|
||||||
|
@ -53,9 +52,40 @@ public class ActivityTeamController {
|
||||||
* @param activityTeamInfoSaveReq 添加请求对象
|
* @param activityTeamInfoSaveReq 添加请求对象
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
@PostMapping
|
@PostMapping("/save")
|
||||||
public Result<String> save(@RequestBody ActivityTeamInfoSaveReq activityTeamInfoSaveReq) {
|
public Result<String> save(@RequestBody ActivityTeamInfoSaveReq activityTeamInfoSaveReq) {
|
||||||
activityTeamInfoService.save(ActivityTeamInfoAddModel.addReqBuild(activityTeamInfoSaveReq));
|
activityTeamInfoService.save(ActivityTeamInfoAddModel.addReqBuild(activityTeamInfoSaveReq));
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
@PostMapping("/detail")
|
||||||
|
public List<ActivityTeamProductSkuModel> findListByTeamId(Long teamId){
|
||||||
|
List<ActivityTeamProductSkuModel> list = skuInfoService.findListByTeamId(teamId);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
@PostMapping("/delBatch")
|
||||||
|
public boolean delBatch(@RequestBody List<Long> ids){
|
||||||
|
return skuInfoService.delBatch(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量添加用户
|
||||||
|
*/
|
||||||
|
@PostMapping("/batchAdd")
|
||||||
|
public boolean batchAdd(@RequestBody List<ActivityTeamProductSkuAddListModel> activityTeamProductSkuAddListModelList) {
|
||||||
|
return skuInfoService.saveBatch(activityTeamProductSkuAddListModelList);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 批量修改用户
|
||||||
|
*/
|
||||||
|
@PostMapping("/batchUpd")
|
||||||
|
public boolean batchUp(@RequestBody List<ActivityTeamProductSkuUpdListModel> activityTeamProductSkuUpdListModels) {
|
||||||
|
return skuInfoService.updateBatch(activityTeamProductSkuUpdListModels);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,4 +48,23 @@ public interface ActivityTeamProductSkuInfoService extends IService<ActivityTeam
|
||||||
|
|
||||||
public boolean updateBath(List<ActivityTeamProductSkuReqModel> activityTeamProductSkuReqModelList);
|
public boolean updateBath(List<ActivityTeamProductSkuReqModel> activityTeamProductSkuReqModelList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据 业务模型 运行团购商品修改
|
||||||
|
*/
|
||||||
|
public boolean update(ActivityTeamProductSkuUpdModel activityTeamProductSkuUpdModel);
|
||||||
|
|
||||||
|
public boolean batchUpdate(List<ActivityTeamProductSkuModel> activityTeamProductSkuModelList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
public boolean delBatch(List<Long> ids);
|
||||||
|
/**
|
||||||
|
* 批量添加用户
|
||||||
|
*/
|
||||||
|
boolean saveBatch(List<ActivityTeamProductSkuAddListModel> activityTeamProductSkuAddListModelList);
|
||||||
|
/**
|
||||||
|
* 批量修改用户
|
||||||
|
*/
|
||||||
|
boolean updateBatch(List<ActivityTeamProductSkuUpdListModel> activityTeamProductSkuUpdListModels);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
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;
|
||||||
|
@ -100,4 +101,51 @@ public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityT
|
||||||
public boolean updateBath(List<ActivityTeamProductSkuReqModel> activityTeamProductSkuReqModelList) {
|
public boolean updateBath(List<ActivityTeamProductSkuReqModel> activityTeamProductSkuReqModelList) {
|
||||||
return this.updateBatchById(activityTeamProductSkuReqModelList.stream().map(ActivityTeamProductSkuInfo::updateModelBuild).toList());
|
return this.updateBatchById(activityTeamProductSkuReqModelList.stream().map(ActivityTeamProductSkuInfo::updateModelBuild).toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean update(ActivityTeamProductSkuUpdModel activityTeamProductSkuUpdModel) {
|
||||||
|
|
||||||
|
LambdaUpdateWrapper<ActivityTeamProductSkuInfo> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
updateWrapper.set(ActivityTeamProductSkuInfo::getTeamStock,activityTeamProductSkuUpdModel.getTeamStock());
|
||||||
|
updateWrapper.set(ActivityTeamProductSkuInfo::getRemainStock,activityTeamProductSkuUpdModel.getTeamStock());
|
||||||
|
updateWrapper.set(ActivityTeamProductSkuInfo::getTeamPrice,activityTeamProductSkuUpdModel.getTeamPrice());
|
||||||
|
updateWrapper.eq(ActivityTeamProductSkuInfo::getId,activityTeamProductSkuUpdModel.getId());
|
||||||
|
this.update(updateWrapper);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean batchUpdate(List<ActivityTeamProductSkuModel> activityTeamProductSkuModelList) {
|
||||||
|
return this.updateBatchById(
|
||||||
|
activityTeamProductSkuModelList.stream()
|
||||||
|
.map(ActivityTeamProductSkuInfo::updModelBuild)
|
||||||
|
.toList()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean delBatch(List<Long> ids) {
|
||||||
|
return this.removeByIds(ids);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 批量添加用户
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean saveBatch(List<ActivityTeamProductSkuAddListModel> activityTeamProductSkuAddListModelList) {
|
||||||
|
return this.saveBatch(activityTeamProductSkuAddListModelList);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 批量修改用户
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean updateBatch(List<ActivityTeamProductSkuUpdListModel> activityTeamProductSkuUpdListModels) {
|
||||||
|
return this.updateBatch(activityTeamProductSkuUpdListModels);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ server:
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: muyu-buy
|
name: muyu-marketing
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
active: dev
|
active: dev
|
||||||
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -16,10 +16,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 150.158.86.96:8848
|
||||||
|
namespace: 2204a
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
Loading…
Reference in New Issue