master
parent
f51c342aeb
commit
9b9ff71767
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
商品id:'Long',
|
||||
商品名称:'String',
|
||||
商品图:'String',
|
||||
拼团简介:'Text'
|
||||
商品单位:'Integer'
|
||||
商品轮播图:[
|
||||
String,String
|
||||
],
|
||||
活动时间:"Date"
|
||||
策略类型:"String",
|
||||
策略:"Long",
|
||||
规格:[
|
||||
{
|
||||
规格SKU:"String",
|
||||
拼团价格:"BigDecimal",
|
||||
拼团库存:"Long"
|
||||
}
|
||||
]
|
||||
},
|
||||
排序:"Integer",
|
||||
详情:"Text"
|
||||
}
|
||||
|
||||
|
||||
商品类型:'String',
|
||||
商品分类:'String',
|
||||
商品标签:'String',
|
||||
拼团名称:'String',
|
|
@ -0,0 +1,32 @@
|
|||
package com.muyu.common.core.enums.market.team;
|
||||
|
||||
/**
|
||||
* 参团类型枚举类
|
||||
*
|
||||
* @author AmAg
|
||||
* @create: 2024-11-22 01:11
|
||||
**/
|
||||
public enum TeamOpenTypeEnum {
|
||||
//开团 55
|
||||
OPEN_TEAM("open_team","开团"),
|
||||
//参团
|
||||
IN_TEAM("in_team","参团");
|
||||
|
||||
private final String code;
|
||||
private final String label;
|
||||
|
||||
TeamOpenTypeEnum(String code, String label) {
|
||||
this.code = code;
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String code() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String label() {
|
||||
return label;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package com.muyu.common.core.web;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.muyu.common.core.web.page.PageDomain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 列表查询模型
|
||||
*
|
||||
* @author AmAg
|
||||
* @create 2024-11-21 16:40
|
||||
**/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class QueryModel<T> {
|
||||
/**
|
||||
* 当前记录起始索引
|
||||
*/
|
||||
private Integer pageNum;
|
||||
|
||||
/**
|
||||
* 每页显示记录数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
|
||||
/**
|
||||
* 排序列
|
||||
*/
|
||||
private String orderByColumn;
|
||||
|
||||
/**
|
||||
* 排序的方向desc或者asc
|
||||
*/
|
||||
private boolean isAsc = true;
|
||||
|
||||
/**
|
||||
* 构建模型分页对象
|
||||
* @param pageDomain
|
||||
* @return 模型分页对象
|
||||
*/
|
||||
public T domainBuild(PageDomain pageDomain){
|
||||
this.pageNum = pageDomain.getPageNum();
|
||||
this.pageSize = pageDomain.getPageSize();
|
||||
this.orderByColumn = pageDomain.getOrderByColumn();
|
||||
this.isAsc = "asc".equals(pageDomain.getIsAsc());
|
||||
return (T) this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建查询分页弄对象
|
||||
* @return 查询分页对象
|
||||
*/
|
||||
public <I> Page<I> buildPage(){
|
||||
Page<I> page = Page.of(this.getPageNum(), this.getPageSize());
|
||||
page.setOrders(List.of(this.isAsc()
|
||||
? OrderItem.asc(this.getOrderByColumn()) : OrderItem.desc(this.getOrderByColumn())));
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,12 +1,20 @@
|
|||
package com.muyu.common.core.web.page;
|
||||
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 分页数据
|
||||
*
|
||||
* @author muyu
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageDomain {
|
||||
/**
|
||||
* 当前记录起始索引
|
||||
|
@ -33,42 +41,14 @@ public class PageDomain {
|
|||
*/
|
||||
private Boolean reasonable = true;
|
||||
|
||||
public String getOrderBy () {
|
||||
public String getOrderBy() {
|
||||
if (StringUtils.isEmpty(orderByColumn)) {
|
||||
return "";
|
||||
}
|
||||
return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc;
|
||||
}
|
||||
|
||||
public Integer getPageNum () {
|
||||
return pageNum;
|
||||
}
|
||||
|
||||
public void setPageNum (Integer pageNum) {
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
|
||||
public Integer getPageSize () {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize (Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public String getOrderByColumn () {
|
||||
return orderByColumn;
|
||||
}
|
||||
|
||||
public void setOrderByColumn (String orderByColumn) {
|
||||
this.orderByColumn = orderByColumn;
|
||||
}
|
||||
|
||||
public String getIsAsc () {
|
||||
return isAsc;
|
||||
}
|
||||
|
||||
public void setIsAsc (String isAsc) {
|
||||
public void setIsAsc(String isAsc) {
|
||||
if (StringUtils.isNotEmpty(isAsc)) {
|
||||
// 兼容前端排序类型
|
||||
if ("ascending".equals(isAsc)) {
|
||||
|
@ -80,14 +60,12 @@ public class PageDomain {
|
|||
}
|
||||
}
|
||||
|
||||
public Boolean getReasonable () {
|
||||
public Boolean getReasonable() {
|
||||
if (StringUtils.isNull(reasonable)) {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return reasonable;
|
||||
}
|
||||
|
||||
public void setReasonable (Boolean reasonable) {
|
||||
this.reasonable = reasonable;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,6 +22,12 @@
|
|||
<groupId>com.muyu</groupId>
|
||||
<artifactId>muyu-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>6.2.0.Final</version> <!-- 请替换为实际的版本号,如6.2.0.Final -->
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -75,4 +75,5 @@ public class ActivityTeamInfo extends BaseEntity {
|
|||
* 策略ID
|
||||
*/
|
||||
private Long strategyId;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
package com.muyu.marketing.domain;
|
||||
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.NonNull;
|
||||
import org.apache.xmlbeans.impl.soap.Text;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 营销拼团活动实体类
|
||||
*
|
||||
* @author AmAg
|
||||
* @create: 2024-11-22 20:37
|
||||
**/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class MarketingGroupInfo extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "商品id不能为空")
|
||||
private Long id;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@NotNull(message = "商品名称不能为空")
|
||||
private String name;
|
||||
/**
|
||||
* 商品活动图
|
||||
*/
|
||||
@NotNull(message = "一个有效的图片")
|
||||
private String productImage;
|
||||
/**
|
||||
* 活动简介
|
||||
*/
|
||||
@NotNull(message = "商品简介不能为空")
|
||||
@Size(min = 5,max = 500,message = "商品简介内容必须在5-500字符之间")
|
||||
private Text introduction;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@NotNull(message = "商品单位不能为空")
|
||||
private String unit;
|
||||
/**
|
||||
* 轮播图
|
||||
*/
|
||||
private List<String> productImages;
|
||||
/**
|
||||
* 活动时间
|
||||
*/
|
||||
@NotNull(message = "活动时间不能为空")
|
||||
private Date endTime;
|
||||
/**
|
||||
* 策略类型
|
||||
*/
|
||||
@NotNull(message = "策略类型不能为空不能为空")
|
||||
private String strategyType;
|
||||
/**
|
||||
* 策略ID
|
||||
*/
|
||||
@NotNull(message = "策略Id不能为空")
|
||||
private Long strategyId;
|
||||
/**
|
||||
* 商品Sku信息
|
||||
*/
|
||||
private List<ActivityTeamProductSkuInfo> productSkuInfo;
|
||||
/**
|
||||
* 排序字段
|
||||
*/
|
||||
private String sortOrder;
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
package com.muyu.marketing.domain.model;
|
||||
|
||||
import com.muyu.common.core.web.QueryModel;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 团购活动列表查询结果模型
|
||||
*
|
||||
* @author: AmAg
|
||||
* @create: 2024-11-21 16:38
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ActivityTeamInfoListModel {
|
||||
/**
|
||||
* 拼团活动ID
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 拼团名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 拼团商品图片
|
||||
*/
|
||||
private String productImage;
|
||||
/**
|
||||
* 商品价格
|
||||
*/
|
||||
private Double productPrice;
|
||||
/**
|
||||
* 拼团价格
|
||||
*/
|
||||
private Double teamPrice;
|
||||
/**
|
||||
* 拼团人数
|
||||
*/
|
||||
private Long attendNumber;
|
||||
/**
|
||||
* 开团人数
|
||||
*/
|
||||
private Long openTeamNumber;
|
||||
/**
|
||||
* 参团人数
|
||||
*/
|
||||
private Long addTeamNumber;
|
||||
/**
|
||||
* 商品库存
|
||||
*/
|
||||
private Long teamStock;
|
||||
/**
|
||||
* 剩余库存
|
||||
*/
|
||||
private Long remainStock;
|
||||
/**
|
||||
* 团购结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 活动状态
|
||||
*/
|
||||
private String status;
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package com.muyu.marketing.domain.model;
|
||||
|
||||
import com.muyu.common.core.web.QueryModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 团购活动列表查询模型
|
||||
*
|
||||
* @author: AmAg
|
||||
* @create: 2024-11-21 16:38
|
||||
**/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ActivityTeamInfoListQueryModel extends QueryModel<ActivityTeamInfoListQueryModel> {
|
||||
|
||||
/**
|
||||
* 搜索关键字
|
||||
*/
|
||||
private String keyWord;
|
||||
/**
|
||||
* 活动状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.muyu.marketing.domain.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.xmlbeans.impl.xb.xsdschema.All;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 团购活动添加结果模型
|
||||
*
|
||||
* @author AmAg
|
||||
* @create: 2024-11-22 11:50
|
||||
// **/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ActivityTeamInfoSaveModel {
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 策略ID
|
||||
*/
|
||||
private Long strategyId;
|
||||
//
|
||||
//// private List<>
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.muyu.marketing.domain.req;
|
||||
|
||||
/** 营销拼团活动对象
|
||||
* @author AmAg
|
||||
* @create: 2024-11-22 21:08
|
||||
**/
|
||||
public class MarketingGroupInfoListReq {
|
||||
/**
|
||||
* 搜索关键字
|
||||
*
|
||||
*/
|
||||
private String keyWord;
|
||||
/**
|
||||
* 活动状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.muyu.marketing.domain.req;
|
||||
|
||||
import com.muyu.common.core.web.page.PageDomain;
|
||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
|
||||
/**
|
||||
* 拼团团购对象 team_info 列表
|
||||
*
|
||||
* @author AmAg
|
||||
* @create: 2024-11-22 11:34
|
||||
**/
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TeamInfoListReq extends PageDomain {
|
||||
|
||||
/**
|
||||
* 搜索关键字
|
||||
*
|
||||
*/
|
||||
private String keyWord;
|
||||
/**
|
||||
* 活动状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 通过当前对象构建业务查询模型
|
||||
* @return 业务查询模型
|
||||
*/
|
||||
public ActivityTeamInfoListQueryModel buildQueryModel() {
|
||||
|
||||
return ActivityTeamInfoListQueryModel.builder()
|
||||
.keyWord(this.keyWord)
|
||||
.status(this.status)
|
||||
.build()
|
||||
.domainBuild(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package com.muyu.marketing.domain.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TeamInfoReq {
|
||||
/**
|
||||
* 搜索关键字
|
||||
*/
|
||||
private String keyWord;
|
||||
/**
|
||||
* 活动状态
|
||||
*/
|
||||
private String status;
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
package com.muyu.marketing.domain.req;
|
||||
|
||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
||||
import com.muyu.marketing.domain.model.ActivityTeamInfoSaveModel;
|
||||
|
||||
/**
|
||||
* 拼团团购对象 team_info 列表
|
||||
*
|
||||
* @author AmAg
|
||||
* @create: 2024-11-22 11:34
|
||||
**/
|
||||
public class TeamInfoSaveReq {
|
||||
|
||||
// /**
|
||||
// * 搜索关键字
|
||||
// *
|
||||
// */
|
||||
// private String keyWord;
|
||||
// /**
|
||||
// * 活动状态
|
||||
// */
|
||||
// private String status;
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 通过当前对象构建业务添加模型
|
||||
// * @return 业务添加模型
|
||||
// */
|
||||
// public ActivityTeamInfoSaveModel buildAddModel() {
|
||||
//
|
||||
// return ActivityTeamInfoSaveModel.builder()
|
||||
// .keyWord(this.keyWord)
|
||||
// .status(this.status)
|
||||
// .build()
|
||||
// .domainBuild(this);
|
||||
// }
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.muyu.marketing.domain.resp;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author AmAg
|
||||
* @create: 2024-11-22 21:10
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MarketingGroupInfoResp {
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.muyu.marketing.team.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||
import com.muyu.marketing.domain.req.TeamInfoListReq;
|
||||
import com.muyu.marketing.domain.req.TeamInfoSaveReq;
|
||||
import com.muyu.marketing.domain.resp.TeamInfoResp;
|
||||
import com.muyu.marketing.team.service.ActivityTeamInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 营销团购活动控制层
|
||||
*
|
||||
* @author AmAg
|
||||
* @create: 2024-11-21 17:00
|
||||
**/
|
||||
|
||||
@RestController
|
||||
@RequestMapping("team")
|
||||
public class ActivityTeamController {
|
||||
|
||||
@Autowired
|
||||
private ActivityTeamInfoService activityTeamInfoService;
|
||||
|
||||
@PostMapping("/list")
|
||||
public Result<TableDataInfo<TeamInfoResp>> list(@RequestBody TeamInfoListReq teamInfoListReq) {
|
||||
activityTeamInfoService.query(teamInfoListReq.buildQueryModel());
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
// @PostMapping("add")
|
||||
// public Result<String> add(@RequestBody TeamInfoSaveReq teamInfoSaveReq){
|
||||
// activityTeamInfoService.add(teamInfoSaveReq.buildAddModel());
|
||||
// return Result.success();
|
||||
// }
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.muyu.marketing.team.controller;
|
||||
|
||||
/**
|
||||
* 营销拼团活动控制层
|
||||
*
|
||||
* @author AmAg
|
||||
* @create: 2024-11-22 21:07
|
||||
**/
|
||||
public class MarketingGroupInfoController {
|
||||
|
||||
}
|
|
@ -1,7 +1,23 @@
|
|||
package com.muyu.marketing.team.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ActivityTeamInfoService extends IService<ActivityTeamInfo> {
|
||||
|
||||
/**
|
||||
* 通过查询模型查询团购活动列表
|
||||
* @param activityTeamInfoListQueryModel 团购活动查询模型
|
||||
* @return 团购活动列表
|
||||
*/
|
||||
public TableDataInfo<ActivityTeamInfoListModel> query(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel);
|
||||
|
||||
|
||||
void add(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package com.muyu.marketing.team.service;
|
||||
|
||||
/**
|
||||
* @author AmAg
|
||||
* @create: 2024-11-22 21:08
|
||||
**/
|
||||
public interface MarketingGroupInfoService {
|
||||
|
||||
}
|
|
@ -1,11 +1,79 @@
|
|||
package com.muyu.marketing.team.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
||||
import com.muyu.marketing.team.mapper.ActivityTeamInfoMapper;
|
||||
import com.muyu.marketing.team.service.ActivityTeamInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMapper, ActivityTeamInfo> implements ActivityTeamInfoService {
|
||||
public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMapper, ActivityTeamInfo>
|
||||
implements ActivityTeamInfoService {
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public TableDataInfo<ActivityTeamInfoListModel> query(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel) {
|
||||
|
||||
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());
|
||||
|
||||
/**
|
||||
*
|
||||
* 创建 对象的时候进行的占用
|
||||
* 以方法返回值占用
|
||||
*/
|
||||
Page<ActivityTeamInfo> activityTeamInfoPage = this.page(activityTeamInfoListQueryModel.buildPage(),queryWrapper);
|
||||
List<ActivityTeamInfo> activityTeamInfoList = activityTeamInfoPage.getRecords();
|
||||
List<ActivityTeamInfoListModel> activityTeamInfoListModels =new ArrayList<>();
|
||||
for (ActivityTeamInfo activityTeamInfo : activityTeamInfoList) {
|
||||
ActivityTeamInfoListModel activityTeamInfoListModel = new ActivityTeamInfoListModel();
|
||||
activityTeamInfoListModel.setId(activityTeamInfo.getId());
|
||||
activityTeamInfoListModel.setName(activityTeamInfo.getName());
|
||||
activityTeamInfoListModel.setStatus(activityTeamInfo.getStatus());
|
||||
activityTeamInfoListModel.setAddTeamNumber(0L);
|
||||
activityTeamInfoListModel.setAttendNumber(0L);
|
||||
activityTeamInfoListModel.setEndTime(activityTeamInfo.getEndTime());
|
||||
activityTeamInfoListModel.setOpenTeamNumber(0L);
|
||||
activityTeamInfoListModel.setProductImage(activityTeamInfo.getProductImage());
|
||||
activityTeamInfoListModel.setProductPrice(0.00);
|
||||
activityTeamInfoListModel.setRemainStock(0L);
|
||||
activityTeamInfoListModel.setTeamPrice(0.00);
|
||||
activityTeamInfoListModel.setTeamStock(0L);
|
||||
activityTeamInfoListModels.add(activityTeamInfoListModel);
|
||||
}
|
||||
|
||||
|
||||
TableDataInfo<ActivityTeamInfoListModel> tableDataInfo = new TableDataInfo<>();
|
||||
tableDataInfo.setTotal(activityTeamInfoPage.getTotal());
|
||||
tableDataInfo.setRows(activityTeamInfoListModels);
|
||||
return tableDataInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel) {
|
||||
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void add(ActivityTeamInfo activityTeamInfo) {
|
||||
// LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// List<ActivityTeamInfo> activityTeamInfos = new ArrayList<>();
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.muyu.marketing.team.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author AmAg
|
||||
* @create: 2024-11-22 21:08
|
||||
**/
|
||||
@Service
|
||||
public class MarketingGroupInfoServiceImpl {
|
||||
|
||||
}
|
|
@ -136,4 +136,13 @@ public class ProjectInfoController extends BaseController {
|
|||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
return toAjax(projectInfoService.removeBatchByIds(ids));
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -68,6 +68,7 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
LambdaQueryWrapper<ProjectInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getName())){
|
||||
queryWrapper.like(ProjectInfo::getName, projectInfo.getName());
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ public class ProjectSkuInfoServiceImpl extends ServiceImpl<ProjectSkuInfoMapper,
|
|||
* @param projectSkuInfo 商品SKU
|
||||
* @return 商品SKU
|
||||
*/
|
||||
|
||||
@Override
|
||||
public List<ProjectSkuInfo> list(ProjectSkuInfo projectSkuInfo) {
|
||||
LambdaQueryWrapper<ProjectSkuInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
|
Loading…
Reference in New Issue