fix():修复了团购活动列表的bug

1128/zhuyufeng
neverAwake 2024-11-30 17:40:52 +08:00
parent c788779d4c
commit d23f85f6c8
10 changed files with 133 additions and 7 deletions

21
doc/策略.md 100644
View File

@ -0,0 +1,21 @@
# 功能划分
## 查看商品列表
获取商品列表
## 选择团购信息
获取团购列表
## 选择商品以及规格
根据商品id查询规格列表
选择商品规格信息
## 加入团购
填写拼团信息
将拼团信息添加到团购执行表中
## 完成付款
付款接口
### 商品详情页面
1.商品详情
2.商品评论
3.商品商品规格
4.商品详情

View File

@ -7,12 +7,15 @@ import com.muyu.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.SuperBuilder;
/**
* @author zhuyufeng
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value = "team_strategy_exemption", autoResultMap = true)
@TableName(value = "team_strategy_exemption_free", autoResultMap = true)
public class TeamStrategyExemption extends BaseEntity {
/**

View File

@ -31,6 +31,8 @@ public class ActivityTeamInfoListModel {
*
*/
private String name;
private Long productId;
/**
*
*/
@ -79,6 +81,7 @@ public class ActivityTeamInfoListModel {
ActivityTeamInfoListModel activityTeamInfoListModel = ActivityTeamInfoListModel.builder()
.id(activityTeamInfo.getId())
.name(activityTeamInfo.getName())
.productId(activityTeamInfo.getProductId())
// .openTeamNumber(teamOpenTypeNumber)
// .addTeamNumber(teamInTypeNumber)
// .attendNumber(teamOpenTypeNumber + teamInTypeNumber)
@ -94,6 +97,7 @@ public class ActivityTeamInfoListModel {
ActivityTeamInfoListModel.builder()
.id(activityTeamInfo.getId())
.name(activityTeamInfo.getName())
.productId(activityTeamInfo.getProductId())
.endTime(activityTeamInfo.getEndTime())
.productImage(activityTeamInfo.getProductImage())
.status(activityTeamInfo.getStatus())

View File

@ -27,6 +27,8 @@ public class TeamInfoListResp {
*/
private String name;
private Long productId;
/**
*
*/
@ -79,6 +81,7 @@ public class TeamInfoListResp {
return TeamInfoListResp.builder()
.id(activityTeamInfoListModel.getId())
.name(activityTeamInfoListModel.getName())
.productId(activityTeamInfoListModel.getProductId())
.openTeamNumber(activityTeamInfoListModel.getOpenTeamNumber())
.addTeamNumber(activityTeamInfoListModel.getAddTeamNumber())
.addTeamNumber(activityTeamInfoListModel.getAddTeamNumber())

View File

@ -1,6 +1,7 @@
package com.muyu.marketing.team.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.marketing.domain.ActivityTeamInfo;
@ -45,12 +46,11 @@ public class ActivityTeamController {
return Result.success(
new TableDataInfo<>() {{
setRows(respList);
setTotal(tableDataInfo.getTotal());
setTotal(respList.size());
}}
);
}
/**
*
*
@ -79,4 +79,16 @@ public class ActivityTeamController {
activityTeamInfoService.update(ActivityTeamInfoUpdModel.activityTeamInfoUpdReqModelBuild(activityTeamInfoUpdReq));
return Result.success();
}
/**
* ID
* @param id
* @return
*/
@GetMapping("getTeamListByProductId/{id}")
public Result<List<ActivityTeamInfo>> getTeamListByProductId(@PathVariable Long id){
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ActivityTeamInfo::getProductId,id);
return Result.success(this.activityTeamInfoService.list(queryWrapper));
}
}

View File

@ -3,6 +3,11 @@ 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> {
/**
* @author zhuyufeng
*
*/
public interface TeamStrategyExemptionService extends ActivityTeamStrategy,IService<TeamStrategyExemption> {
}

View File

@ -9,8 +9,11 @@ import com.muyu.marketing.team.service.TeamStrategyExemptionHundredService;
import com.muyu.marketing.team.service.TeamStrategyExemptionService;
import org.springframework.stereotype.Service;
/**
* @author zhuyufeng
*/
@Service
public class TeamStrategyExemptionHundredServiceImpl extends ServiceImpl<TeamStrategyExemptionHundredMapper, TeamStrategyExemptionHundred>
implements TeamStrategyExemptionHundredService {
}

View File

@ -6,8 +6,11 @@ import com.muyu.marketing.team.mapper.TeamStrategyExemptionOrdinaryMapper;
import com.muyu.marketing.team.service.TeamStrategyExemptionOrdinaryService;
import org.springframework.stereotype.Service;
/**
* @author zhuyufeng
*/
@Service
public class TeamStrategyExemptionOrdinaryServiceImpl extends ServiceImpl<TeamStrategyExemptionOrdinaryMapper, TeamStrategyExemptionOrdinary>
implements TeamStrategyExemptionOrdinaryService {
}

View File

@ -6,8 +6,35 @@ import com.muyu.marketing.team.mapper.TeamStrategyExemptionMapper;
import com.muyu.marketing.team.service.TeamStrategyExemptionService;
import org.springframework.stereotype.Service;
/**
* @author zhuyufeng
*/
@Service
public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption>
implements TeamStrategyExemptionService {
@Override
public void openTeam(Long activityTeamId) {
}
@Override
public void applyTeam(Long teamId) {
}
@Override
public void addTeam(Long teamId, String orderNumber) {
}
@Override
public void exitTeam(Long teamId) {
}
@Override
public void settleTeam(Long teamId) {
}
}

View File

@ -0,0 +1,45 @@
package com.muyu.marketing.team.strategy;
/**
* @Author ?
* @Date 2024/11/29 16:49
*
*/
public interface ActivityTeamStrategy {
/**
*
*
* @param activityTeamId id
*/
public void openTeam(Long activityTeamId);
/**
*
*
* @param teamId id
*/
public void applyTeam(Long teamId);
/**
*
*
* @param teamId id
* @param orderNumber
*/
public void addTeam(Long teamId, String orderNumber);
/**
* 退
*
* @param teamId
*/
public void exitTeam(Long teamId);
/**
*
*
* @param teamId
*/
public void settleTeam(Long teamId);
}