12.4,第一版

1129/Fengmou
冯某 2024-12-04 15:13:15 +08:00
parent 001e2bd4be
commit a40991aec4
42 changed files with 415 additions and 107 deletions

View File

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -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);
};
}
}

View File

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置
@ -33,7 +33,7 @@ spring:
datasource: datasource:
ds1: ds1:
nacos: nacos:
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
dataId: sentinel-muyu-gateway dataId: sentinel-muyu-gateway
groupId: DEFAULT_GROUP groupId: DEFAULT_GROUP
data-type: json data-type: json

View File

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -88,6 +88,7 @@ public class ActivityTeamInfo extends BaseEntity {
.unit(activityTeamInfoAddModel.getUnit()) .unit(activityTeamInfoAddModel.getUnit())
.imageList(activityTeamInfoAddModel.getImageList()) .imageList(activityTeamInfoAddModel.getImageList())
.endTime(activityTeamInfoAddModel.getEndTime()) .endTime(activityTeamInfoAddModel.getEndTime())
.remark(activityTeamInfoAddModel.getRemark())
.sort(activityTeamInfoAddModel.getSort()) .sort(activityTeamInfoAddModel.getSort())
.content(activityTeamInfoAddModel.getContent()) .content(activityTeamInfoAddModel.getContent())
.status(activityTeamInfoAddModel.getStatus()) .status(activityTeamInfoAddModel.getStatus())

View File

@ -13,7 +13,7 @@ import lombok.experimental.SuperBuilder;
@AllArgsConstructor @AllArgsConstructor
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@TableName(value = "team_strategy_exemption_hundred", autoResultMap = true) @TableName(value = "team_strategy_exemption_hundred", autoResultMap = true)
public class TeamStrategyExemptionHundred extends BaseEntity { public class TeamStrategyHundred extends BaseEntity {
/** /**
* *

View File

@ -13,7 +13,7 @@ import lombok.experimental.SuperBuilder;
@AllArgsConstructor @AllArgsConstructor
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@TableName(value = "team_strategy_exemption_ordinary", autoResultMap = true) @TableName(value = "team_strategy_exemption_ordinary", autoResultMap = true)
public class TeamStrategyExemptionOrdinary extends BaseEntity { public class TeamStrategyOrdinary extends BaseEntity {
/** /**
* *

View File

@ -2,11 +2,10 @@ package com.muyu.marketing.domain.model;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.muyu.common.core.web.domain.BaseEntity;
import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq; import com.muyu.marketing.domain.req.ActivityTeamInfoSaveReq;
import lombok.AllArgsConstructor; import lombok.*;
import lombok.Builder; import lombok.experimental.SuperBuilder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -18,11 +17,12 @@ import java.util.function.Supplier;
* @author DongZeLiang * @author DongZeLiang
* @date 2024-11-26 09:38 * @date 2024-11-26 09:38
*/ */
@EqualsAndHashCode(callSuper = true)
@Data @Data
@Builder @SuperBuilder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class ActivityTeamInfoAddModel { public class ActivityTeamInfoAddModel extends BaseEntity {
/** /**
* *
@ -90,6 +90,7 @@ public class ActivityTeamInfoAddModel {
.imageList(activityTeamInfoSaveReq.getImageList()) .imageList(activityTeamInfoSaveReq.getImageList())
.endTime(activityTeamInfoSaveReq.getEndTime()) .endTime(activityTeamInfoSaveReq.getEndTime())
.sort(activityTeamInfoSaveReq.getSort()) .sort(activityTeamInfoSaveReq.getSort())
.remark(activityTeamInfoSaveReq.getRemark())
.content(activityTeamInfoSaveReq.getContent()) .content(activityTeamInfoSaveReq.getContent())
.status(activityTeamInfoSaveReq.getStatus()) .status(activityTeamInfoSaveReq.getStatus())
.strategyType(activityTeamInfoSaveReq.getStrategyType()) .strategyType(activityTeamInfoSaveReq.getStrategyType())

View File

@ -1,5 +1,6 @@
package com.muyu.marketing.domain.model; 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.common.core.web.model.QueryModel;
import com.muyu.marketing.domain.ActivityTeamInfo; import com.muyu.marketing.domain.ActivityTeamInfo;
import lombok.*; import lombok.*;
@ -16,10 +17,10 @@ import java.util.function.Function;
* @date 2024-11-20 14:18:10 * @date 2024-11-20 14:18:10
*/ */
@Data @Data
@Builder @SuperBuilder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class ActivityTeamInfoListModel { public class ActivityTeamInfoListModel extends BaseEntity {
/** /**
* ID * ID
@ -33,6 +34,10 @@ public class ActivityTeamInfoListModel {
* *
*/ */
private Long addTeamNumber; private Long addTeamNumber;
/**
*
*/
private String introduction;
/** /**
* *
*/ */
@ -69,21 +74,15 @@ public class ActivityTeamInfoListModel {
* *
*/ */
private Long teamStock; private Long teamStock;
private String remark;
public static ActivityTeamInfoListModel infoBuild(ActivityTeamInfo activityTeamInfo, Function<ActivityTeamInfoListModel.ActivityTeamInfoListModelBuilder, ActivityTeamInfoListModel> function) { public static ActivityTeamInfoListModel infoBuild(ActivityTeamInfo activityTeamInfo, Function<ActivityTeamInfoListModel.ActivityTeamInfoListModelBuilder, ActivityTeamInfoListModel> function) {
ActivityTeamInfoListModel activityTeamInfoListModel = ActivityTeamInfoListModel.builder() ActivityTeamInfoListModel activityTeamInfoListModel = ActivityTeamInfoListModel.builder()
.id(activityTeamInfo.getId()) .id(activityTeamInfo.getId())
.name(activityTeamInfo.getName()) .name(activityTeamInfo.getName())
// .openTeamNumber(teamOpenTypeNumber) .remark(activityTeamInfo.getRemark())
// .addTeamNumber(teamInTypeNumber)
// .attendNumber(teamOpenTypeNumber + teamInTypeNumber)
.endTime(activityTeamInfo.getEndTime())
.productImage(activityTeamInfo.getProductImage()) .productImage(activityTeamInfo.getProductImage())
// .teamPrice(discountPrice.getTeamPrice()) .introduction(activityTeamInfo.getIntroduction())
// .productPrice(discountPrice.getProductPrice())
// .teamStock(teamProductStockModel.getTeamStock())
// .remainStock(teamProductStockModel.getRemainStock())
.status(activityTeamInfo.getStatus()) .status(activityTeamInfo.getStatus())
.build(); .build();
return function.apply( return function.apply(
@ -93,6 +92,8 @@ public class ActivityTeamInfoListModel {
.endTime(activityTeamInfo.getEndTime()) .endTime(activityTeamInfo.getEndTime())
.productImage(activityTeamInfo.getProductImage()) .productImage(activityTeamInfo.getProductImage())
.status(activityTeamInfo.getStatus()) .status(activityTeamInfo.getStatus())
.introduction(activityTeamInfo.getIntroduction())
); );
} }

View File

@ -1,5 +1,6 @@
package com.muyu.marketing.domain.model; 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.common.core.web.model.QueryModel;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
@ -28,5 +29,9 @@ public class ActivityTeamInfoListQueryModel extends QueryModel<ActivityTeamInfoL
* *
*/ */
private String status; private String status;
/**
*
*/
public String introduction;
} }

View File

@ -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;
}

View File

@ -21,7 +21,10 @@ public class TeamInfoListReq extends PageDomain {
* *
*/ */
private String status; private String status;
/**
*
*/
private String introduction;
/** /**
* *
@ -31,6 +34,7 @@ public class TeamInfoListReq extends PageDomain {
return ActivityTeamInfoListQueryModel.builder() return ActivityTeamInfoListQueryModel.builder()
.keyWord(this.keyWord) .keyWord(this.keyWord)
.status(this.status) .status(this.status)
.introduction(this.introduction)
.build() .build()
.domainBuild(this); .domainBuild(this);
} }

View File

@ -64,7 +64,10 @@ public class TeamInfoListResp {
* *
*/ */
private Long teamStock; private Long teamStock;
/**
*
*/
private String introduction;
/** /**
* *
* @param activityTeamInfoListModel * @param activityTeamInfoListModel
@ -79,6 +82,7 @@ public class TeamInfoListResp {
.addTeamNumber(activityTeamInfoListModel.getAddTeamNumber()) .addTeamNumber(activityTeamInfoListModel.getAddTeamNumber())
.attendNumber(activityTeamInfoListModel.getAttendNumber()) .attendNumber(activityTeamInfoListModel.getAttendNumber())
.endTime(activityTeamInfoListModel.getEndTime()) .endTime(activityTeamInfoListModel.getEndTime())
.introduction(activityTeamInfoListModel.getIntroduction())
.teamPrice(activityTeamInfoListModel.getTeamPrice()) .teamPrice(activityTeamInfoListModel.getTeamPrice())
.productImage(activityTeamInfoListModel.getProductImage()) .productImage(activityTeamInfoListModel.getProductImage())
.productPrice(activityTeamInfoListModel.getProductPrice()) .productPrice(activityTeamInfoListModel.getProductPrice())

View File

@ -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 {
/**
*
*/
;
}

View File

@ -2,8 +2,6 @@ package com.muyu.marketing.team.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.marketing.domain.ActivityTeamInfo; import com.muyu.marketing.domain.ActivityTeamInfo;
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper

View File

@ -1,11 +1,10 @@
package com.muyu.marketing.team.mapper; package com.muyu.marketing.team.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.marketing.domain.TeamStrategyExemption; import com.muyu.marketing.domain.TeamStrategyHundred;
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface TeamStrategyExemptionHundredMapper extends BaseMapper<TeamStrategyExemptionHundred> { public interface TeamStrategyExemptionHundredMapper extends BaseMapper<TeamStrategyHundred> {
} }

View File

@ -1,11 +1,10 @@
package com.muyu.marketing.team.mapper; package com.muyu.marketing.team.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.marketing.domain.TeamStrategyExemptionHundred; import com.muyu.marketing.domain.TeamStrategyOrdinary;
import com.muyu.marketing.domain.TeamStrategyExemptionOrdinary;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface TeamStrategyExemptionOrdinaryMapper extends BaseMapper<TeamStrategyExemptionOrdinary> { public interface TeamStrategyExemptionOrdinaryMapper extends BaseMapper<TeamStrategyOrdinary> {
} }

View File

@ -35,5 +35,10 @@ public interface ActivityTeamInfoService extends IService<ActivityTeamInfo> {
*/ */
boolean update(ActivityTeamInfoUpdModel activityTeamInfoUpdModel); boolean update(ActivityTeamInfoUpdModel activityTeamInfoUpdModel);
/**
* ID
* @param productId
* @return
*/
public ActivityTeamProductListMode findProductList(Long productId);
} }

View File

@ -3,7 +3,6 @@ package com.muyu.marketing.team.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo; import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
import com.muyu.marketing.domain.TeamStrategyExemptionHundred;
import com.muyu.marketing.domain.model.*; import com.muyu.marketing.domain.model.*;
import java.util.List; import java.util.List;

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -2,7 +2,7 @@ package com.muyu.marketing.team.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.marketing.domain.TeamStrategyExemption; 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> {
} }

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -34,6 +34,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getKeyWord()), ActivityTeamInfo::getName, activityTeamInfoListQueryModel.getKeyWord()); 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.getStatus()), ActivityTeamInfo::getStatus, activityTeamInfoListQueryModel.getStatus());
queryWrapper.like(StringUtils.isNotEmpty(activityTeamInfoListQueryModel.getIntroduction()),ActivityTeamInfo::getIntroduction,activityTeamInfoListQueryModel.getIntroduction());
/** /**
* Object<T> -> * Object<T> ->
@ -105,4 +106,11 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
activityTeamProductSkuInfoService.updateBath(activityTeamInfoUpdModel.getActivityTeamProductSkuModelList()); activityTeamProductSkuInfoService.updateBath(activityTeamInfoUpdModel.getActivityTeamProductSkuModelList());
return update; return update;
} }
@Override
public ActivityTeamProductListMode findProductList(Long productId) {
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ActivityTeamInfo::getProductId,productId);
return null;
}
} }

View File

@ -13,10 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; 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.List;
import java.util.Optional; import java.util.Optional;

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -4,10 +4,37 @@ 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 lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service @Service("team-strategy-exemption")
@Log4j2
public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption> public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption>
implements TeamStrategyExemptionService { 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) {
}
} }

View File

@ -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) {
}
}

View File

@ -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) {
}
}

View File

@ -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);
}

View File

@ -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) {
}
}

View File

@ -6,7 +6,7 @@ server:
spring: spring:
application: application:
# 应用名称 # 应用名称
name: muyu-buy name: muyu-activity
profiles: profiles:
# 环境配置 # 环境配置
active: dev active: dev
@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -90,6 +90,10 @@ public class ProjectInfo extends BaseEntity {
@Excel(name = "品牌") @Excel(name = "品牌")
@ApiModelProperty(name = "品牌", value = "品牌") @ApiModelProperty(name = "品牌", value = "品牌")
private Long brandId; private Long brandId;
/** 拼团id */
@Excel(name = "拼团id")
@ApiModelProperty(name = "拼团id", value = "拼团id")
private Long teamId;
/** /**
* *

View File

@ -34,4 +34,5 @@ public interface ProjectInfoService extends IService<ProjectInfo> {
* @return * @return
*/ */
ProjectDetailResp getDetailInfo (Long id); ProjectDetailResp getDetailInfo (Long id);
} }

View File

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -16,10 +16,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置

View File

@ -14,10 +14,10 @@ spring:
nacos: nacos:
discovery: discovery:
# 服务注册地址 # 服务注册地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 120.46.147.226:8848 server-addr: 124.221.28.250:8848
# 配置文件格式 # 配置文件格式
file-extension: yml file-extension: yml
# 共享配置 # 共享配置