12.4,第一版
parent
001e2bd4be
commit
a40991aec4
|
@ -14,10 +14,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package com.muyu.gateway.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.http.server.reactive.ServerHttpResponse;
|
||||
import org.springframework.web.cors.reactive.CorsUtils;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import org.springframework.web.server.WebFilter;
|
||||
import org.springframework.web.server.WebFilterChain;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
/**
|
||||
* 跨域配置
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Configuration
|
||||
public class CorsConfig
|
||||
{
|
||||
/**
|
||||
* 这里为支持的请求头,如果有自定义的header字段请自己添加
|
||||
*/
|
||||
private static final String ALLOWED_HEADERS = "X-Requested-With, Content-Type, Authorization, credential, X-XSRF-TOKEN, token, Admin-Token, App-Token";
|
||||
private static final String ALLOWED_METHODS = "GET,POST,PUT,DELETE,OPTIONS,HEAD";
|
||||
private static final String ALLOWED_ORIGIN = "*";
|
||||
private static final String ALLOWED_EXPOSE = "*";
|
||||
private static final String MAX_AGE = "18000L";
|
||||
|
||||
@Bean
|
||||
public WebFilter corsFilter()
|
||||
{
|
||||
return (ServerWebExchange ctx, WebFilterChain chain) -> {
|
||||
ServerHttpRequest request = ctx.getRequest();
|
||||
if (CorsUtils.isCorsRequest(request))
|
||||
{
|
||||
ServerHttpResponse response = ctx.getResponse();
|
||||
HttpHeaders headers = response.getHeaders();
|
||||
headers.add("Access-Control-Allow-Headers", ALLOWED_HEADERS);
|
||||
headers.add("Access-Control-Allow-Methods", ALLOWED_METHODS);
|
||||
headers.add("Access-Control-Allow-Origin", ALLOWED_ORIGIN);
|
||||
headers.add("Access-Control-Expose-Headers", ALLOWED_EXPOSE);
|
||||
headers.add("Access-Control-Max-Age", MAX_AGE);
|
||||
headers.add("Access-Control-Allow-Credentials", "true");
|
||||
if (request.getMethod() == HttpMethod.OPTIONS)
|
||||
{
|
||||
response.setStatusCode(HttpStatus.OK);
|
||||
return Mono.empty();
|
||||
}
|
||||
}
|
||||
return chain.filter(ctx);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -14,10 +14,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
@ -33,7 +33,7 @@ spring:
|
|||
datasource:
|
||||
ds1:
|
||||
nacos:
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
dataId: sentinel-muyu-gateway
|
||||
groupId: DEFAULT_GROUP
|
||||
data-type: json
|
||||
|
|
|
@ -14,10 +14,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -14,10 +14,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -14,10 +14,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -88,6 +88,7 @@ public class ActivityTeamInfo extends BaseEntity {
|
|||
.unit(activityTeamInfoAddModel.getUnit())
|
||||
.imageList(activityTeamInfoAddModel.getImageList())
|
||||
.endTime(activityTeamInfoAddModel.getEndTime())
|
||||
.remark(activityTeamInfoAddModel.getRemark())
|
||||
.sort(activityTeamInfoAddModel.getSort())
|
||||
.content(activityTeamInfoAddModel.getContent())
|
||||
.status(activityTeamInfoAddModel.getStatus())
|
||||
|
|
|
@ -13,7 +13,7 @@ import lombok.experimental.SuperBuilder;
|
|||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "team_strategy_exemption_hundred", autoResultMap = true)
|
||||
public class TeamStrategyExemptionHundred extends BaseEntity {
|
||||
public class TeamStrategyHundred extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
|
@ -13,7 +13,7 @@ import lombok.experimental.SuperBuilder;
|
|||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "team_strategy_exemption_ordinary", autoResultMap = true)
|
||||
public class TeamStrategyExemptionOrdinary extends BaseEntity {
|
||||
public class TeamStrategyOrdinary extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
|
@ -2,11 +2,10 @@ package com.muyu.marketing.domain.model;
|
|||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -18,11 +17,12 @@ import java.util.function.Supplier;
|
|||
* @author DongZeLiang
|
||||
* @date 2024-11-26 09:38
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Builder
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ActivityTeamInfoAddModel {
|
||||
public class ActivityTeamInfoAddModel extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 拼团名称
|
||||
|
@ -90,6 +90,7 @@ public class ActivityTeamInfoAddModel {
|
|||
.imageList(activityTeamInfoSaveReq.getImageList())
|
||||
.endTime(activityTeamInfoSaveReq.getEndTime())
|
||||
.sort(activityTeamInfoSaveReq.getSort())
|
||||
.remark(activityTeamInfoSaveReq.getRemark())
|
||||
.content(activityTeamInfoSaveReq.getContent())
|
||||
.status(activityTeamInfoSaveReq.getStatus())
|
||||
.strategyType(activityTeamInfoSaveReq.getStrategyType())
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.muyu.marketing.domain.model;
|
||||
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import com.muyu.common.core.web.model.QueryModel;
|
||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||
import lombok.*;
|
||||
|
@ -16,10 +17,10 @@ import java.util.function.Function;
|
|||
* @date 2024-11-20 14:18:10
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ActivityTeamInfoListModel {
|
||||
public class ActivityTeamInfoListModel extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 拼团活动ID
|
||||
|
@ -33,6 +34,10 @@ public class ActivityTeamInfoListModel {
|
|||
* 参团人数
|
||||
*/
|
||||
private Long addTeamNumber;
|
||||
/**
|
||||
* 商品简介
|
||||
*/
|
||||
private String introduction;
|
||||
/**
|
||||
* 拼团人数
|
||||
*/
|
||||
|
@ -69,21 +74,15 @@ public class ActivityTeamInfoListModel {
|
|||
* 团购库存
|
||||
*/
|
||||
private Long teamStock;
|
||||
|
||||
private String remark;
|
||||
|
||||
public static ActivityTeamInfoListModel infoBuild(ActivityTeamInfo activityTeamInfo, Function<ActivityTeamInfoListModel.ActivityTeamInfoListModelBuilder, ActivityTeamInfoListModel> function) {
|
||||
ActivityTeamInfoListModel activityTeamInfoListModel = ActivityTeamInfoListModel.builder()
|
||||
.id(activityTeamInfo.getId())
|
||||
.name(activityTeamInfo.getName())
|
||||
// .openTeamNumber(teamOpenTypeNumber)
|
||||
// .addTeamNumber(teamInTypeNumber)
|
||||
// .attendNumber(teamOpenTypeNumber + teamInTypeNumber)
|
||||
.endTime(activityTeamInfo.getEndTime())
|
||||
.remark(activityTeamInfo.getRemark())
|
||||
.productImage(activityTeamInfo.getProductImage())
|
||||
// .teamPrice(discountPrice.getTeamPrice())
|
||||
// .productPrice(discountPrice.getProductPrice())
|
||||
// .teamStock(teamProductStockModel.getTeamStock())
|
||||
// .remainStock(teamProductStockModel.getRemainStock())
|
||||
.introduction(activityTeamInfo.getIntroduction())
|
||||
.status(activityTeamInfo.getStatus())
|
||||
.build();
|
||||
return function.apply(
|
||||
|
@ -93,6 +92,8 @@ public class ActivityTeamInfoListModel {
|
|||
.endTime(activityTeamInfo.getEndTime())
|
||||
.productImage(activityTeamInfo.getProductImage())
|
||||
.status(activityTeamInfo.getStatus())
|
||||
.introduction(activityTeamInfo.getIntroduction())
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.muyu.marketing.domain.model;
|
||||
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import com.muyu.common.core.web.model.QueryModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
@ -28,5 +29,9 @@ public class ActivityTeamInfoListQueryModel extends QueryModel<ActivityTeamInfoL
|
|||
* 活动状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 商品简介
|
||||
*/
|
||||
public String introduction;
|
||||
|
||||
}
|
||||
|
|
|
@ -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.Date;
|
||||
|
||||
/**
|
||||
* @ClassName ActivityTeamProductListMode
|
||||
* @Description 描述
|
||||
* @Author zhen_xiong_feng
|
||||
* @Date 2024/12/3 15:01
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class ActivityTeamProductListMode {
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 活动结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 活动状态
|
||||
*/
|
||||
private String status;
|
||||
}
|
|
@ -21,7 +21,10 @@ public class TeamInfoListReq extends PageDomain {
|
|||
* 活动状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 活动介绍
|
||||
*/
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 通过当前对象构建业务查询模型
|
||||
|
@ -31,6 +34,7 @@ public class TeamInfoListReq extends PageDomain {
|
|||
return ActivityTeamInfoListQueryModel.builder()
|
||||
.keyWord(this.keyWord)
|
||||
.status(this.status)
|
||||
.introduction(this.introduction)
|
||||
.build()
|
||||
.domainBuild(this);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,10 @@ public class TeamInfoListResp {
|
|||
* 团购库存
|
||||
*/
|
||||
private Long teamStock;
|
||||
|
||||
/**
|
||||
* 团购介绍
|
||||
*/
|
||||
private String introduction;
|
||||
/**
|
||||
* 列表查询结果,构建为响应对象
|
||||
* @param activityTeamInfoListModel 列表数据查询结果
|
||||
|
@ -79,6 +82,7 @@ public class TeamInfoListResp {
|
|||
.addTeamNumber(activityTeamInfoListModel.getAddTeamNumber())
|
||||
.attendNumber(activityTeamInfoListModel.getAttendNumber())
|
||||
.endTime(activityTeamInfoListModel.getEndTime())
|
||||
.introduction(activityTeamInfoListModel.getIntroduction())
|
||||
.teamPrice(activityTeamInfoListModel.getTeamPrice())
|
||||
.productImage(activityTeamInfoListModel.getProductImage())
|
||||
.productPrice(activityTeamInfoListModel.getProductPrice())
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.muyu.marketing.remote.product;
|
||||
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* @ClassName ProductInfoRemote
|
||||
* @Description 描述
|
||||
* @Author zhen_xiong_feng
|
||||
* @Date 2024/12/3 14:32
|
||||
*/
|
||||
|
||||
@FeignClient("muyu-product")
|
||||
public interface ProductInfoRemote {
|
||||
/**
|
||||
* 获取商品信息详细信息
|
||||
*/
|
||||
;
|
||||
}
|
|
@ -2,8 +2,6 @@ package com.muyu.marketing.team.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
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 com.muyu.marketing.domain.TeamStrategyHundred;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TeamStrategyExemptionHundredMapper extends BaseMapper<TeamStrategyExemptionHundred> {
|
||||
|
||||
public interface TeamStrategyExemptionHundredMapper extends BaseMapper<TeamStrategyHundred> {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
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 com.muyu.marketing.domain.TeamStrategyOrdinary;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TeamStrategyExemptionOrdinaryMapper extends BaseMapper<TeamStrategyExemptionOrdinary> {
|
||||
|
||||
public interface TeamStrategyExemptionOrdinaryMapper extends BaseMapper<TeamStrategyOrdinary> {
|
||||
|
||||
}
|
||||
|
|
|
@ -35,5 +35,10 @@ public interface ActivityTeamInfoService extends IService<ActivityTeamInfo> {
|
|||
*/
|
||||
boolean update(ActivityTeamInfoUpdModel activityTeamInfoUpdModel);
|
||||
|
||||
|
||||
/**
|
||||
* 根据商品ID查询团购活动信息
|
||||
* @param productId
|
||||
* @return
|
||||
*/
|
||||
public ActivityTeamProductListMode findProductList(Long productId);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.muyu.marketing.team.service;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||
import com.muyu.marketing.domain.model.*;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
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> {
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
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,7 +2,7 @@ package com.muyu.marketing.team.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.marketing.domain.TeamStrategyExemption;
|
||||
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
|
||||
import com.muyu.marketing.team.strategy.ActivityTeamStrategy;
|
||||
|
||||
public interface TeamStrategyExemptionService extends IService<TeamStrategyExemption> {
|
||||
public interface TeamStrategyExemptionService extends ActivityTeamStrategy, IService<TeamStrategyExemption> {
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
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> {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
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> {
|
||||
}
|
|
@ -34,6 +34,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
|||
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
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.getIntroduction()),ActivityTeamInfo::getIntroduction,activityTeamInfoListQueryModel.getIntroduction());
|
||||
|
||||
/**
|
||||
* Object<T> -> 创建对象的时候进行的占用
|
||||
|
@ -105,4 +106,11 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
|||
activityTeamProductSkuInfoService.updateBath(activityTeamInfoUpdModel.getActivityTeamProductSkuModelList());
|
||||
return update;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActivityTeamProductListMode findProductList(Long productId) {
|
||||
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ActivityTeamInfo::getProductId,productId);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,10 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
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.Optional;
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
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 {
|
||||
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
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,10 +4,37 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import com.muyu.marketing.domain.TeamStrategyExemption;
|
||||
import com.muyu.marketing.team.mapper.TeamStrategyExemptionMapper;
|
||||
import com.muyu.marketing.team.service.TeamStrategyExemptionService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@Service("team-strategy-exemption")
|
||||
@Log4j2
|
||||
public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption>
|
||||
implements TeamStrategyExemptionService {
|
||||
|
||||
|
||||
@Override
|
||||
public void openTeam(Long activityTeamId) {
|
||||
log.info("参加-免单团-[{}]",activityTeamId);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyFor(Long teamId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTeam(Long teamId, String orderNumber) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void backTeam(Long teamId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void settle(Long teamId) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
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.TeamStrategyExemptionHundredMapper;
|
||||
import com.muyu.marketing.team.service.TeamStrategyHundredService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("team--strategy-hundred")
|
||||
@Log4j2
|
||||
public class TeamStrategyHundredServiceImpl extends ServiceImpl<TeamStrategyExemptionHundredMapper, TeamStrategyHundred>
|
||||
implements TeamStrategyHundredService {
|
||||
|
||||
@Override
|
||||
public void openTeam(Long activityTeamId) {
|
||||
log.info("参加-百人团-[{}]",activityTeamId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyFor(Long teamId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTeam(Long teamId, String orderNumber) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void backTeam(Long teamId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void settle(Long teamId) {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
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.TeamStrategyExemptionOrdinaryMapper;
|
||||
import com.muyu.marketing.team.service.TeamStrategyOrdinaryService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("team-strategy-ordinary")
|
||||
@Log4j2
|
||||
public class TeamStrategyOrdinaryServiceImpl extends ServiceImpl<TeamStrategyExemptionOrdinaryMapper, TeamStrategyOrdinary>
|
||||
implements TeamStrategyOrdinaryService {
|
||||
|
||||
@Override
|
||||
public void openTeam(Long activityTeamId) {
|
||||
log.info("参加-普通团-[{}]",activityTeamId);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyFor(Long teamId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTeam(Long teamId, String orderNumber) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void backTeam(Long teamId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void settle(Long teamId) {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.muyu.marketing.team.strategy;
|
||||
|
||||
/**
|
||||
* @ClassName ActivityTeamStrategy
|
||||
* @Description 描述
|
||||
* @Author zhen_xiong_feng
|
||||
* @Date 2024/11/29 17:11
|
||||
*/
|
||||
public interface ActivityTeamStrategy {
|
||||
/**
|
||||
* 开团
|
||||
* @param activityTeamId 活动团id
|
||||
*/
|
||||
public void openTeam(Long activityTeamId);
|
||||
|
||||
/**
|
||||
* 申请参团
|
||||
* @param teamId 团id
|
||||
*/
|
||||
public void applyFor(Long teamId);
|
||||
|
||||
/**
|
||||
* 参团
|
||||
* @param teamId 团id
|
||||
* @param orderNumber 订单号
|
||||
*/
|
||||
public void addTeam(Long teamId,String orderNumber);
|
||||
|
||||
/**
|
||||
* 退团
|
||||
* @param teamId 团购ID
|
||||
*/
|
||||
public void backTeam(Long teamId);
|
||||
|
||||
/**
|
||||
* 结算团
|
||||
* @param teamId
|
||||
*/
|
||||
public void settle(Long teamId);
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.muyu.marketing.team.strategy.impl;
|
||||
|
||||
import com.muyu.marketing.team.strategy.ActivityTeamStrategy;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @ClassName ActivityTeamStrategyImpl
|
||||
* @Description 描述
|
||||
* @Author zhen_xiong_feng
|
||||
* @Date 2024/11/29 17:22
|
||||
*/
|
||||
@Service
|
||||
@Primary
|
||||
public class ActivityTeamStrategyImpl implements ActivityTeamStrategy {
|
||||
@Override
|
||||
public void openTeam(Long activityTeamId) {
|
||||
String activityTeamType=null;
|
||||
if (activityTeamId==null){
|
||||
throw new RuntimeException("activityTeamId is null");
|
||||
} else if (activityTeamId==0) {
|
||||
//团长免单
|
||||
activityTeamType = "team-strategy-exemption";
|
||||
} else if (activityTeamId == 1) {
|
||||
//普通团
|
||||
activityTeamType = "team-strategy-ordinary";
|
||||
} else if (activityTeamId == 2) {
|
||||
//百人团
|
||||
activityTeamType = "team--strategy-hundred";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyFor(Long teamId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTeam(Long teamId, String orderNumber) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void backTeam(Long teamId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void settle(Long teamId) {
|
||||
|
||||
}
|
||||
}
|
|
@ -6,7 +6,7 @@ server:
|
|||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: muyu-buy
|
||||
name: muyu-activity
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
|
@ -14,10 +14,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -90,6 +90,10 @@ public class ProjectInfo extends BaseEntity {
|
|||
@Excel(name = "品牌")
|
||||
@ApiModelProperty(name = "品牌", value = "品牌")
|
||||
private Long brandId;
|
||||
/** 拼团id */
|
||||
@Excel(name = "拼团id")
|
||||
@ApiModelProperty(name = "拼团id", value = "拼团id")
|
||||
private Long teamId;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
|
|
|
@ -34,4 +34,5 @@ public interface ProjectInfoService extends IService<ProjectInfo> {
|
|||
* @return 商品详情
|
||||
*/
|
||||
ProjectDetailResp getDetailInfo (Long id);
|
||||
|
||||
}
|
||||
|
|
|
@ -14,10 +14,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -16,10 +16,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -14,10 +14,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -14,10 +14,10 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 120.46.147.226:8848
|
||||
server-addr: 124.221.28.250:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
Loading…
Reference in New Issue