fix():修复了团购活动列表的bug
parent
c788779d4c
commit
d23f85f6c8
|
@ -0,0 +1,21 @@
|
||||||
|
# 功能划分
|
||||||
|
## 查看商品列表
|
||||||
|
获取商品列表
|
||||||
|
## 选择团购信息
|
||||||
|
获取团购列表
|
||||||
|
## 选择商品以及规格
|
||||||
|
根据商品id查询规格列表
|
||||||
|
选择商品规格信息
|
||||||
|
## 加入团购
|
||||||
|
填写拼团信息
|
||||||
|
将拼团信息添加到团购执行表中
|
||||||
|
## 完成付款
|
||||||
|
付款接口
|
||||||
|
|
||||||
|
|
||||||
|
### 商品详情页面
|
||||||
|
1.商品详情
|
||||||
|
2.商品评论
|
||||||
|
3.商品商品规格
|
||||||
|
4.商品详情
|
||||||
|
|
|
@ -7,12 +7,15 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhuyufeng
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
@SuperBuilder
|
@SuperBuilder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName(value = "team_strategy_exemption", autoResultMap = true)
|
@TableName(value = "team_strategy_exemption_free", autoResultMap = true)
|
||||||
public class TeamStrategyExemption extends BaseEntity {
|
public class TeamStrategyExemption extends BaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -31,6 +31,8 @@ public class ActivityTeamInfoListModel {
|
||||||
* 拼团名称
|
* 拼团名称
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
private Long productId;
|
||||||
/**
|
/**
|
||||||
* 参团人数
|
* 参团人数
|
||||||
*/
|
*/
|
||||||
|
@ -79,6 +81,7 @@ public class ActivityTeamInfoListModel {
|
||||||
ActivityTeamInfoListModel activityTeamInfoListModel = ActivityTeamInfoListModel.builder()
|
ActivityTeamInfoListModel activityTeamInfoListModel = ActivityTeamInfoListModel.builder()
|
||||||
.id(activityTeamInfo.getId())
|
.id(activityTeamInfo.getId())
|
||||||
.name(activityTeamInfo.getName())
|
.name(activityTeamInfo.getName())
|
||||||
|
.productId(activityTeamInfo.getProductId())
|
||||||
// .openTeamNumber(teamOpenTypeNumber)
|
// .openTeamNumber(teamOpenTypeNumber)
|
||||||
// .addTeamNumber(teamInTypeNumber)
|
// .addTeamNumber(teamInTypeNumber)
|
||||||
// .attendNumber(teamOpenTypeNumber + teamInTypeNumber)
|
// .attendNumber(teamOpenTypeNumber + teamInTypeNumber)
|
||||||
|
@ -94,6 +97,7 @@ public class ActivityTeamInfoListModel {
|
||||||
ActivityTeamInfoListModel.builder()
|
ActivityTeamInfoListModel.builder()
|
||||||
.id(activityTeamInfo.getId())
|
.id(activityTeamInfo.getId())
|
||||||
.name(activityTeamInfo.getName())
|
.name(activityTeamInfo.getName())
|
||||||
|
.productId(activityTeamInfo.getProductId())
|
||||||
.endTime(activityTeamInfo.getEndTime())
|
.endTime(activityTeamInfo.getEndTime())
|
||||||
.productImage(activityTeamInfo.getProductImage())
|
.productImage(activityTeamInfo.getProductImage())
|
||||||
.status(activityTeamInfo.getStatus())
|
.status(activityTeamInfo.getStatus())
|
||||||
|
|
|
@ -27,6 +27,8 @@ public class TeamInfoListResp {
|
||||||
*/
|
*/
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参团人数
|
* 参团人数
|
||||||
*/
|
*/
|
||||||
|
@ -79,6 +81,7 @@ public class TeamInfoListResp {
|
||||||
return TeamInfoListResp.builder()
|
return TeamInfoListResp.builder()
|
||||||
.id(activityTeamInfoListModel.getId())
|
.id(activityTeamInfoListModel.getId())
|
||||||
.name(activityTeamInfoListModel.getName())
|
.name(activityTeamInfoListModel.getName())
|
||||||
|
.productId(activityTeamInfoListModel.getProductId())
|
||||||
.openTeamNumber(activityTeamInfoListModel.getOpenTeamNumber())
|
.openTeamNumber(activityTeamInfoListModel.getOpenTeamNumber())
|
||||||
.addTeamNumber(activityTeamInfoListModel.getAddTeamNumber())
|
.addTeamNumber(activityTeamInfoListModel.getAddTeamNumber())
|
||||||
.addTeamNumber(activityTeamInfoListModel.getAddTeamNumber())
|
.addTeamNumber(activityTeamInfoListModel.getAddTeamNumber())
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.muyu.marketing.team.controller;
|
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.domain.Result;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
|
@ -45,12 +46,11 @@ public class ActivityTeamController {
|
||||||
return Result.success(
|
return Result.success(
|
||||||
new TableDataInfo<>() {{
|
new TableDataInfo<>() {{
|
||||||
setRows(respList);
|
setRows(respList);
|
||||||
setTotal(tableDataInfo.getTotal());
|
setTotal(respList.size());
|
||||||
}}
|
}}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加团购活动
|
* 添加团购活动
|
||||||
*
|
*
|
||||||
|
@ -79,4 +79,16 @@ public class ActivityTeamController {
|
||||||
activityTeamInfoService.update(ActivityTeamInfoUpdModel.activityTeamInfoUpdReqModelBuild(activityTeamInfoUpdReq));
|
activityTeamInfoService.update(ActivityTeamInfoUpdModel.activityTeamInfoUpdReqModelBuild(activityTeamInfoUpdReq));
|
||||||
return Result.success();
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,11 @@ 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.domain.TeamStrategyExemptionHundred;
|
||||||
|
import com.muyu.marketing.team.strategy.ActivityTeamStrategy;
|
||||||
|
|
||||||
public interface TeamStrategyExemptionService extends IService<TeamStrategyExemption> {
|
/**
|
||||||
|
* @author zhuyufeng
|
||||||
|
* 免单
|
||||||
|
*/
|
||||||
|
public interface TeamStrategyExemptionService extends ActivityTeamStrategy,IService<TeamStrategyExemption> {
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,9 @@ import com.muyu.marketing.team.service.TeamStrategyExemptionHundredService;
|
||||||
import com.muyu.marketing.team.service.TeamStrategyExemptionService;
|
import com.muyu.marketing.team.service.TeamStrategyExemptionService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhuyufeng
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class TeamStrategyExemptionHundredServiceImpl extends ServiceImpl<TeamStrategyExemptionHundredMapper, TeamStrategyExemptionHundred>
|
public class TeamStrategyExemptionHundredServiceImpl extends ServiceImpl<TeamStrategyExemptionHundredMapper, TeamStrategyExemptionHundred>
|
||||||
implements TeamStrategyExemptionHundredService {
|
implements TeamStrategyExemptionHundredService {
|
||||||
|
|
|
@ -6,6 +6,9 @@ import com.muyu.marketing.team.mapper.TeamStrategyExemptionOrdinaryMapper;
|
||||||
import com.muyu.marketing.team.service.TeamStrategyExemptionOrdinaryService;
|
import com.muyu.marketing.team.service.TeamStrategyExemptionOrdinaryService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhuyufeng
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class TeamStrategyExemptionOrdinaryServiceImpl extends ServiceImpl<TeamStrategyExemptionOrdinaryMapper, TeamStrategyExemptionOrdinary>
|
public class TeamStrategyExemptionOrdinaryServiceImpl extends ServiceImpl<TeamStrategyExemptionOrdinaryMapper, TeamStrategyExemptionOrdinary>
|
||||||
implements TeamStrategyExemptionOrdinaryService {
|
implements TeamStrategyExemptionOrdinaryService {
|
||||||
|
|
|
@ -6,8 +6,35 @@ import com.muyu.marketing.team.mapper.TeamStrategyExemptionMapper;
|
||||||
import com.muyu.marketing.team.service.TeamStrategyExemptionService;
|
import com.muyu.marketing.team.service.TeamStrategyExemptionService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhuyufeng
|
||||||
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption>
|
public class TeamStrategyExemptionServiceImpl extends ServiceImpl<TeamStrategyExemptionMapper, TeamStrategyExemption>
|
||||||
implements TeamStrategyExemptionService {
|
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) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
Loading…
Reference in New Issue