11.26功能查看详情和修改
parent
a04925eab4
commit
5fed8d7869
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
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: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
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: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -5,6 +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.ActivityTeamInfoAddModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoupdMoudel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuUpdModel;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
@ -54,7 +56,7 @@ public class ActivityTeamInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 活动排序
|
* 活动排序
|
||||||
*/
|
*/
|
||||||
private long sort;
|
private Integer sort;
|
||||||
/**
|
/**
|
||||||
* 活动详情
|
* 活动详情
|
||||||
*/
|
*/
|
||||||
|
@ -93,4 +95,22 @@ public class ActivityTeamInfo extends BaseEntity {
|
||||||
.strategyId(activityTeamInfoAddModel.getStrategyId())
|
.strategyId(activityTeamInfoAddModel.getStrategyId())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
public static ActivityTeamInfo updreq(ActivityTeamInfoupdMoudel activityTeamInfoupdMoudel){
|
||||||
|
return ActivityTeamInfo.builder()
|
||||||
|
.id(activityTeamInfoupdMoudel.getId())
|
||||||
|
.name(activityTeamInfoupdMoudel.getName())
|
||||||
|
.productId(activityTeamInfoupdMoudel.getProductId())
|
||||||
|
.productImage(activityTeamInfoupdMoudel.getProductImage())
|
||||||
|
.introduction(activityTeamInfoupdMoudel.getIntroduction())
|
||||||
|
.unit(activityTeamInfoupdMoudel.getUnit())
|
||||||
|
.imageList(activityTeamInfoupdMoudel.getImageList())
|
||||||
|
.endTime(activityTeamInfoupdMoudel.getEndTime())
|
||||||
|
.sort(activityTeamInfoupdMoudel.getSort())
|
||||||
|
.content(activityTeamInfoupdMoudel.getContent())
|
||||||
|
.status(activityTeamInfoupdMoudel.getStatus())
|
||||||
|
.strategyType(activityTeamInfoupdMoudel.getStrategyType())
|
||||||
|
.strategyId(activityTeamInfoupdMoudel.getStrategyId())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class ActivityTeamProductSkuInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 活动ID
|
* 活动ID
|
||||||
*/
|
*/
|
||||||
private long teamId;
|
private Long teamId;
|
||||||
/**
|
/**
|
||||||
* 商品ID
|
* 商品ID
|
||||||
*/
|
*/
|
||||||
|
@ -60,6 +60,6 @@ public class ActivityTeamProductSkuInfo extends BaseEntity {
|
||||||
.teamStock(activityTeamProductSkuAddModel.getTeamStock())
|
.teamStock(activityTeamProductSkuAddModel.getTeamStock())
|
||||||
.remainStock(activityTeamProductSkuAddModel.getTeamStock())
|
.remainStock(activityTeamProductSkuAddModel.getTeamStock())
|
||||||
.teamPrice(activityTeamProductSkuAddModel.getTeamPrice())
|
.teamPrice(activityTeamProductSkuAddModel.getTeamPrice())
|
||||||
.build()
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,4 +101,6 @@ public class ActivityTeamInfoAddModel {
|
||||||
.toList()
|
.toList()
|
||||||
).build();
|
).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.muyu.marketing.domain.model;
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
|
||||||
|
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||||
|
import com.muyu.marketing.domain.TeamStrategyExemption;
|
||||||
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
|
@ -36,7 +38,7 @@ public class ActivityTeamProductSkuAddModel {
|
||||||
/**
|
/**
|
||||||
* 规格SKU
|
* 规格SKU
|
||||||
*/
|
*/
|
||||||
private String sku;
|
private String productSku;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼团价格
|
* 拼团价格
|
||||||
|
@ -48,12 +50,16 @@ public class ActivityTeamProductSkuAddModel {
|
||||||
*/
|
*/
|
||||||
private Long teamStock;
|
private Long teamStock;
|
||||||
|
|
||||||
|
private Long remainStock;
|
||||||
|
|
||||||
public static ActivityTeamProductSkuAddModel addReqBuild(TeamProjectSkuInfoAddReq teamProjectSkuInfoAddReq, Supplier<Long> productId){
|
public static ActivityTeamProductSkuAddModel addReqBuild(TeamProjectSkuInfoAddReq teamProjectSkuInfoAddReq, Supplier<Long> productId){
|
||||||
|
|
||||||
return ActivityTeamProductSkuAddModel.builder()
|
return ActivityTeamProductSkuAddModel.builder()
|
||||||
.productId(productId.get())
|
.productId(productId.get())
|
||||||
.sku(teamProjectSkuInfoAddReq.getSku())
|
.productSku(teamProjectSkuInfoAddReq.getProductSku())
|
||||||
.teamStock(teamProjectSkuInfoAddReq.getTeamStock())
|
.teamStock(teamProjectSkuInfoAddReq.getTeamStock())
|
||||||
.teamPrice(teamProjectSkuInfoAddReq.getTeamPrice())
|
.teamPrice(teamProjectSkuInfoAddReq.getTeamPrice())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class TeamProductDiscountPriceModel {
|
||||||
* @return 优惠力度
|
* @return 优惠力度
|
||||||
*/
|
*/
|
||||||
public static TeamProductDiscountPriceModel of(BigDecimal productPrice, BigDecimal teamPrice) {
|
public static TeamProductDiscountPriceModel of(BigDecimal productPrice, BigDecimal teamPrice) {
|
||||||
TeamProductDiscountPriceModel.builder()
|
return TeamProductDiscountPriceModel.builder()
|
||||||
.productPrice(productPrice)
|
.productPrice(productPrice)
|
||||||
.teamPrice(teamPrice)
|
.teamPrice(teamPrice)
|
||||||
.discount(
|
.discount(
|
||||||
|
|
|
@ -3,9 +3,10 @@ package com.muyu.marketing.domain.req;
|
||||||
import com.muyu.common.core.web.page.PageDomain;
|
import com.muyu.common.core.web.page.PageDomain;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@SuperBuilder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
|
|
@ -19,7 +19,9 @@ public class TeamProjectSkuInfoAddReq {
|
||||||
/**
|
/**
|
||||||
* 规格SKU
|
* 规格SKU
|
||||||
*/
|
*/
|
||||||
private String sku;
|
private Long id;
|
||||||
|
|
||||||
|
private String productSku;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼团价格
|
* 拼团价格
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统模块
|
* 系统模块
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
package com.muyu.marketing.team.controller;
|
package com.muyu.marketing.team.controller;
|
||||||
|
import com.dtflys.forest.annotation.Post;
|
||||||
|
|
||||||
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.ActivityTeamInfoAddModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamInfoupdMoudel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuUpdModel;
|
||||||
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.ActivityTeamInfoByIdResp;
|
||||||
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;
|
||||||
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 +28,10 @@ import java.util.List;
|
||||||
public class ActivityTeamController {
|
public class ActivityTeamController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ActivityTeamInfoService activityTeamInfoService;;
|
private ActivityTeamInfoService activityTeamInfoService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询营销团购活动列表
|
* 查询营销团购活动列表
|
||||||
|
@ -58,4 +61,22 @@ public class ActivityTeamController {
|
||||||
activityTeamInfoService.save(ActivityTeamInfoAddModel.addReqBuild(activityTeamInfoSaveReq));
|
activityTeamInfoService.save(ActivityTeamInfoAddModel.addReqBuild(activityTeamInfoSaveReq));
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{teamId}")
|
||||||
|
public Result<ActivityTeamInfoByIdResp> getByid(@PathVariable Long teamId){
|
||||||
|
return Result.success(activityTeamInfoService.getupdId(teamId) ) ;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/upd")
|
||||||
|
public Result<String> upd( @RequestBody ActivityTeamInfoupdReq activityTeamInfoupdReq){
|
||||||
|
boolean gettoupd = activityTeamInfoService.gettoupd(ActivityTeamInfoupdMoudel.updreq(activityTeamInfoupdReq));
|
||||||
|
if(gettoupd){
|
||||||
|
return Result.success("修改成功");
|
||||||
|
}else{
|
||||||
|
return Result.success("修改成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muyu.marketing.team.service;
|
package com.muyu.marketing.team.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
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.ActivityTeamInfo;
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
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.resp.ActivityTeamInfoByIdResp;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -24,4 +24,8 @@ public interface ActivityTeamInfoService extends IService<ActivityTeamInfo> {
|
||||||
* @param activityTeamInfoAddModel 团购添加模型
|
* @param activityTeamInfoAddModel 团购添加模型
|
||||||
*/
|
*/
|
||||||
public void save(ActivityTeamInfoAddModel activityTeamInfoAddModel);
|
public void save(ActivityTeamInfoAddModel activityTeamInfoAddModel);
|
||||||
|
ActivityTeamInfoByIdResp getupdId(Long teamId);
|
||||||
|
|
||||||
|
boolean gettoupd( ActivityTeamInfoupdMoudel updsku);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,11 @@ import com.muyu.common.core.exception.ServiceException;
|
||||||
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.ActivityTeamProductSkuInfo;
|
||||||
import com.muyu.marketing.domain.model.*;
|
import com.muyu.marketing.domain.model.*;
|
||||||
|
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
||||||
|
import com.muyu.marketing.domain.req.TeamProjectSkuUpdReq;
|
||||||
|
import com.muyu.marketing.domain.resp.ActivityTeamInfoByIdResp;
|
||||||
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;
|
||||||
|
@ -82,4 +86,90 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
||||||
teamProductSkuAddModelList.forEach(activityTeamProductSkuAddModel -> activityTeamProductSkuAddModel.setTeamId(activityTeamInfo.getId()));
|
teamProductSkuAddModelList.forEach(activityTeamProductSkuAddModel -> activityTeamProductSkuAddModel.setTeamId(activityTeamInfo.getId()));
|
||||||
this.activityTeamProductSkuInfoService.batchSave(teamProductSkuAddModelList);
|
this.activityTeamProductSkuInfoService.batchSave(teamProductSkuAddModelList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActivityTeamInfoByIdResp getupdId(Long teamId) {
|
||||||
|
ActivityTeamInfo byId = this.getById(teamId);
|
||||||
|
|
||||||
|
LambdaQueryWrapper<ActivityTeamProductSkuInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ActivityTeamProductSkuInfo::getTeamId,teamId);
|
||||||
|
|
||||||
|
List<ActivityTeamProductSkuInfo> list = activityTeamProductSkuInfoService.list(queryWrapper);
|
||||||
|
|
||||||
|
List<TeamProjectSkuInfoAddReq> teamProjectSkuInfoAddReqs = list.stream().map(activityTeamProductSkuInfo -> {
|
||||||
|
TeamProjectSkuInfoAddReq build = TeamProjectSkuInfoAddReq.builder()
|
||||||
|
.productSku(activityTeamProductSkuInfo.getProductSku())
|
||||||
|
.teamStock(activityTeamProductSkuInfo.getTeamStock())
|
||||||
|
.teamPrice(activityTeamProductSkuInfo.getTeamPrice())
|
||||||
|
.id(activityTeamProductSkuInfo.getId())
|
||||||
|
.build();
|
||||||
|
return build;
|
||||||
|
}).toList();
|
||||||
|
|
||||||
|
return ActivityTeamInfoByIdResp.builder()
|
||||||
|
.name(byId.getName())
|
||||||
|
.name(byId.getName())
|
||||||
|
.productId(byId.getProductId())
|
||||||
|
.productImage(byId.getProductImage())
|
||||||
|
.introduction(byId.getIntroduction())
|
||||||
|
.unit(byId.getUnit())
|
||||||
|
.imageList(byId.getImageList())
|
||||||
|
.endTime(byId.getEndTime())
|
||||||
|
.sort(byId.getSort())
|
||||||
|
.teamProjectSkuInfoAddReqList(teamProjectSkuInfoAddReqs)
|
||||||
|
.content(byId.getContent())
|
||||||
|
.status(byId.getStatus())
|
||||||
|
.strategyType(byId.getStrategyType())
|
||||||
|
.strategyId(byId.getStrategyId())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// private Long id;
|
||||||
|
//
|
||||||
|
// private String productSku;
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 拼团价格
|
||||||
|
// */
|
||||||
|
// private BigDecimal teamPrice;
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 拼团库存
|
||||||
|
// */
|
||||||
|
// private Long teamStock;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean gettoupd(ActivityTeamInfoupdMoudel updsku) {
|
||||||
|
boolean updateById = this.updateById(ActivityTeamInfo.updreq(updsku));
|
||||||
|
|
||||||
|
|
||||||
|
if(updateById){
|
||||||
|
LambdaQueryWrapper<ActivityTeamProductSkuInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ActivityTeamProductSkuInfo::getTeamId,updateById);
|
||||||
|
List<ActivityTeamProductSkuInfo> list = this.activityTeamProductSkuInfoService.list(queryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
// list.stream().map(
|
||||||
|
// activityTeamProductSkuInfo -> {
|
||||||
|
// TeamProjectSkuUpdReq build = TeamProjectSkuUpdReq.builder()
|
||||||
|
// .id(activityTeamProductSkuInfo.getId())
|
||||||
|
// .productSku(activityTeamProductSkuInfo.getProductSku())
|
||||||
|
// .teamPrice(activityTeamProductSkuInfo.getTeamPrice())
|
||||||
|
// .teamStock(activityTeamProductSkuInfo.getTeamStock())
|
||||||
|
// .build();
|
||||||
|
// return build;
|
||||||
|
// }).toList();
|
||||||
|
|
||||||
|
|
||||||
|
activityTeamProductSkuInfoService.saveBatch(list);
|
||||||
|
|
||||||
|
}
|
||||||
|
return updateById;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ 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 java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
package com.muyu.marketing.team.service.impl;
|
package com.muyu.marketing.team.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
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 org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption>
|
public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption>
|
||||||
implements TeamStrategyExemptionService {
|
implements TeamStrategyExemptionService {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ server:
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: muyu-marketing
|
name: muyu-activity
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
active: dev
|
active: dev
|
||||||
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -16,16 +16,12 @@ import java.util.List;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class AttributeGroupUpdResp {
|
public class AttributeGroupUpdResp {
|
||||||
|
|
||||||
/** 属性组编号 */
|
/** 属性组编号 */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 组名称 */
|
/** 组名称 */
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** 状态 */
|
/** 状态 */
|
||||||
private String states;
|
private String states;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 属性ID集合
|
* 属性ID集合
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -16,10 +16,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 127.0.0.1:8848
|
server-addr: 124.221.130.240:8848
|
||||||
|
namespace: cloud-wang
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
Loading…
Reference in New Issue