Compare commits

...

1 Commits

Author SHA1 Message Date
zyl 5b4b5e5fff 拼团列表添加回显 2024-12-05 01:52:08 +08:00
17 changed files with 83 additions and 39 deletions

6
doc/策略.md 100644
View File

@ -0,0 +1,6 @@
# 功能划分
商品详情未参团
商品详情已参团
拼团成功
拼团失败
## 加入拼团

View File

@ -14,10 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
config:
# 配置中心地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -14,10 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
config:
# 配置中心地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
# 配置文件格式
file-extension: yml
# 共享配置
@ -33,7 +35,8 @@ spring:
datasource:
ds1:
nacos:
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
dataId: sentinel-muyu-gateway
groupId: DEFAULT_GROUP
data-type: json

View File

@ -14,10 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
config:
# 配置中心地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -14,10 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
config:
# 配置中心地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -14,10 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
config:
# 配置中心地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -5,10 +5,8 @@ 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
@ -82,7 +80,7 @@ public class ActivityTeamInfoSaveModel {
.unit(activityTeamInfoAddModel.getUnit())
.imageList(activityTeamInfoAddModel.getImageList())
.endTime(activityTeamInfoAddModel.getEndTime())
.sort(activityTeamInfoAddModel.getSort())
.sort(Long.valueOf(activityTeamInfoAddModel.getSort()))
.content(activityTeamInfoAddModel.getContent())
.status(activityTeamInfoAddModel.getStatus())
.strategyType(activityTeamInfoAddModel.getStrategyType())

View File

@ -2,7 +2,7 @@ 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;

View File

@ -17,12 +17,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
*
*
* @author DongZeLiang
* @date 2024-11-20 14:25
*/
@RestController
@RequestMapping("/team")
public class ActivityTeamController {
@ -31,8 +26,8 @@ public class ActivityTeamController {
private ActivityTeamInfoService activityTeamInfoService;;
/**
*
* @param teamInfoListReq
*
* @param teamInfoListReq
* @return
*/
@PostMapping("/list")
@ -56,13 +51,24 @@ public class ActivityTeamController {
@PostMapping
public Result<String> save(@RequestBody ActivityTeamInfoSaveReq activityTeamInfoSaveReq) {
activityTeamInfoService.save(ActivityTeamInfoAddModel.addReqBuild(activityTeamInfoSaveReq));
return Result.success();
return Result.success("添加成功");
}
/**
* ID
* @param id ID
* @return
*/
@PostMapping("/findById/{id}")
public Result<TeamInfoFindByIdResp> findTeamById(@PathVariable Long id){
return Result.success(TeamInfoFindByIdResp.teamInfoFindByIdBuild(activityTeamInfoService.findDetailById(id)));
}
/**
*
* @param activityTeamInfoUpdReq
* @return
*/
@PutMapping("/updateByTeamId")
public Result updateByTeamId(@RequestBody ActivityTeamInfoUpdReq activityTeamInfoUpdReq){
activityTeamInfoService.update(ActivityTeamInfoUpdModel.activityTeamInfoUpdReqModelBuild(activityTeamInfoUpdReq));

View File

@ -81,6 +81,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
/**
* ID
*
* @param id ID
* @return
*/
@ -95,13 +96,14 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
/**
*
*
* @param activityTeamInfoUpdModel
* @return
*/
@Override
public boolean update(ActivityTeamInfoUpdModel activityTeamInfoUpdModel) {
boolean update = this.updateById(ActivityTeamInfo.TeamUpdateBuild(activityTeamInfoUpdModel));
io.jsonwebtoken.lang.Assert.isTrue(update,"修改失败");
io.jsonwebtoken.lang.Assert.isTrue(update, "修改失败");
activityTeamProductSkuInfoService.updateBath(activityTeamInfoUpdModel.getActivityTeamProductSkuModelList());
return update;
}

View File

@ -40,7 +40,7 @@ public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityT
// 优惠模型集合
Optional<TeamProductDiscountPriceModel> discountPriceModelOptional = teamProductSkuInfoList.stream()
.map(activityTeamProductSkuInfo -> {
ProjectSkuInfo projectSkuInfo = projectSkuCache.get(activityTeamProductSkuInfo.getProductId(), activityTeamProductSkuInfo.getProductSku());
ProjectSkuInfo projectSkuInfo = projectSkuCache.getData(activityTeamProductSkuInfo.getProductId(), activityTeamProductSkuInfo.getProductSku());
return TeamProductDiscountPriceModel.of(projectSkuInfo.getPrice(), activityTeamProductSkuInfo.getTeamPrice());
}).min((o1, o2) -> Double.valueOf(o1.getDiscount() * 100 - o2.getDiscount() * 100).intValue());

View File

@ -6,7 +6,7 @@ server:
spring:
application:
# 应用名称
name: muyu-buy
name: muyu-marketing
profiles:
# 环境配置
active: dev
@ -14,10 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
config:
# 配置中心地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -114,4 +114,15 @@ public class AttributeGroupController extends BaseController {
public Result<String> remove(@PathVariable List<Long> ids) {
return toAjax(attributeGroupService.removeBatchByIds(ids));
}
/**
*
* @param attributeGroup
* @return
*/
@PutMapping("/update")
public Result<String> update(@RequestBody AttributeGroup attributeGroup) {
return toAjax(attributeGroupService.updateById(attributeGroup));
}
}

View File

@ -14,10 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
config:
# 配置中心地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -16,10 +16,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
config:
# 配置中心地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -14,10 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
config:
# 配置中心地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
# 配置文件格式
file-extension: yml
# 共享配置

View File

@ -1,6 +1,6 @@
# Tomcat
server:
port: 9100
port: 9101
# Spring
spring:
@ -14,10 +14,12 @@ spring:
nacos:
discovery:
# 服务注册地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
config:
# 配置中心地址
server-addr: 120.46.147.226:8848
server-addr: 1.94.33.190:8848
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
# 配置文件格式
file-extension: yml
# 共享配置