Compare commits
1 Commits
master
...
1128/zhang
Author | SHA1 | Date |
---|---|---|
|
5b4b5e5fff |
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
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: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
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: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -5,10 +5,8 @@ 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.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @program: 2204a-cloud-server
|
* @program: 2204a-cloud-server
|
||||||
|
@ -82,7 +80,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())
|
||||||
|
|
|
@ -2,7 +2,7 @@ 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;
|
||||||
|
|
|
@ -17,12 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
|
||||||
* 营销团购活动控制层
|
|
||||||
*
|
|
||||||
* @author DongZeLiang
|
|
||||||
* @date 2024-11-20 14:25
|
|
||||||
*/
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/team")
|
@RequestMapping("/team")
|
||||||
public class ActivityTeamController {
|
public class ActivityTeamController {
|
||||||
|
@ -31,8 +26,8 @@ public class ActivityTeamController {
|
||||||
private ActivityTeamInfoService activityTeamInfoService;;
|
private ActivityTeamInfoService activityTeamInfoService;;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询营销团购活动列表
|
* 团购活动列表
|
||||||
* @param teamInfoListReq 活动查询入参
|
* @param teamInfoListReq 入参
|
||||||
* @return 活动响应结果
|
* @return 活动响应结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
|
@ -56,13 +51,24 @@ public class ActivityTeamController {
|
||||||
@PostMapping
|
@PostMapping
|
||||||
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查询商品的详情
|
||||||
|
* @param id 团购活动ID
|
||||||
|
* @return 团购详情
|
||||||
|
*/
|
||||||
@PostMapping("/findById/{id}")
|
@PostMapping("/findById/{id}")
|
||||||
public Result<TeamInfoFindByIdResp> findTeamById(@PathVariable Long id){
|
public Result<TeamInfoFindByIdResp> findTeamById(@PathVariable Long id){
|
||||||
return Result.success(TeamInfoFindByIdResp.teamInfoFindByIdBuild(activityTeamInfoService.findDetailById(id)));
|
return Result.success(TeamInfoFindByIdResp.teamInfoFindByIdBuild(activityTeamInfoService.findDetailById(id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改团购活动信息
|
||||||
|
* @param activityTeamInfoUpdReq 团购活动信息
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
@PutMapping("/updateByTeamId")
|
@PutMapping("/updateByTeamId")
|
||||||
public Result updateByTeamId(@RequestBody ActivityTeamInfoUpdReq activityTeamInfoUpdReq){
|
public Result updateByTeamId(@RequestBody ActivityTeamInfoUpdReq activityTeamInfoUpdReq){
|
||||||
activityTeamInfoService.update(ActivityTeamInfoUpdModel.activityTeamInfoUpdReqModelBuild(activityTeamInfoUpdReq));
|
activityTeamInfoService.update(ActivityTeamInfoUpdModel.activityTeamInfoUpdReqModelBuild(activityTeamInfoUpdReq));
|
||||||
|
|
|
@ -20,7 +20,7 @@ import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMapper, ActivityTeamInfo>
|
public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMapper, ActivityTeamInfo>
|
||||||
implements ActivityTeamInfoService {
|
implements ActivityTeamInfoService {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ActivityTeamOpenInfoService activityTeamOpenInfoService;
|
private ActivityTeamOpenInfoService activityTeamOpenInfoService;
|
||||||
|
@ -81,6 +81,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询商品的详情
|
* 根据ID查询商品的详情
|
||||||
|
*
|
||||||
* @param id 团购活动ID
|
* @param id 团购活动ID
|
||||||
* @return 团购详情
|
* @return 团购详情
|
||||||
*/
|
*/
|
||||||
|
@ -95,13 +96,14 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改团购活动信息
|
* 修改团购活动信息
|
||||||
|
*
|
||||||
* @param activityTeamInfoUpdModel 团购活动信息
|
* @param activityTeamInfoUpdModel 团购活动信息
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean update(ActivityTeamInfoUpdModel activityTeamInfoUpdModel) {
|
public boolean update(ActivityTeamInfoUpdModel activityTeamInfoUpdModel) {
|
||||||
boolean update = this.updateById(ActivityTeamInfo.TeamUpdateBuild(activityTeamInfoUpdModel));
|
boolean update = this.updateById(ActivityTeamInfo.TeamUpdateBuild(activityTeamInfoUpdModel));
|
||||||
io.jsonwebtoken.lang.Assert.isTrue(update,"修改失败");
|
io.jsonwebtoken.lang.Assert.isTrue(update, "修改失败");
|
||||||
activityTeamProductSkuInfoService.updateBath(activityTeamInfoUpdModel.getActivityTeamProductSkuModelList());
|
activityTeamProductSkuInfoService.updateBath(activityTeamInfoUpdModel.getActivityTeamProductSkuModelList());
|
||||||
return update;
|
return update;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityT
|
||||||
// 优惠模型集合
|
// 优惠模型集合
|
||||||
Optional<TeamProductDiscountPriceModel> discountPriceModelOptional = teamProductSkuInfoList.stream()
|
Optional<TeamProductDiscountPriceModel> discountPriceModelOptional = teamProductSkuInfoList.stream()
|
||||||
.map(activityTeamProductSkuInfo -> {
|
.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());
|
return TeamProductDiscountPriceModel.of(projectSkuInfo.getPrice(), activityTeamProductSkuInfo.getTeamPrice());
|
||||||
}).min((o1, o2) -> Double.valueOf(o1.getDiscount() * 100 - o2.getDiscount() * 100).intValue());
|
}).min((o1, o2) -> Double.valueOf(o1.getDiscount() * 100 - o2.getDiscount() * 100).intValue());
|
||||||
|
|
||||||
|
|
|
@ -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: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -114,4 +114,15 @@ public class AttributeGroupController extends BaseController {
|
||||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||||
return toAjax(attributeGroupService.removeBatchByIds(ids));
|
return toAjax(attributeGroupService.removeBatchByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改状态按钮
|
||||||
|
* @param attributeGroup
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping("/update")
|
||||||
|
public Result<String> update(@RequestBody AttributeGroup attributeGroup) {
|
||||||
|
return toAjax(attributeGroupService.updateById(attributeGroup));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -16,10 +16,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Tomcat
|
# Tomcat
|
||||||
server:
|
server:
|
||||||
port: 9100
|
port: 9101
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
|
@ -14,10 +14,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
config:
|
config:
|
||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 120.46.147.226:8848
|
server-addr: 1.94.33.190:8848
|
||||||
|
namespace: f69f28cf-0447-4878-907a-2de2cb16bcd0
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
file-extension: yml
|
file-extension: yml
|
||||||
# 共享配置
|
# 共享配置
|
||||||
|
|
Loading…
Reference in New Issue