feat():团购活动查询详情方法实现
parent
a04925eab4
commit
c6b7a3aa6a
|
@ -0,0 +1,24 @@
|
||||||
|
$.{
|
||||||
|
"活动ID": "Long",
|
||||||
|
"商品ID": "Long", //activity_team_info.product_id
|
||||||
|
"商品图片": "String",
|
||||||
|
"活动名称": "String",
|
||||||
|
"活动简介": "String",
|
||||||
|
"商品单位": "String",
|
||||||
|
"商品的轮播图": [
|
||||||
|
"String", "String"
|
||||||
|
],
|
||||||
|
"活动时间": "date",
|
||||||
|
"策略类型": "String",
|
||||||
|
"策略ID": "Long",
|
||||||
|
"商品规格List": [ // activity_team_product_sku_info
|
||||||
|
{
|
||||||
|
"活动商品规格ID": "Long",
|
||||||
|
"规格SKU": "String", // activity_team_product_sku_info.product_sku
|
||||||
|
"拼团价格": "BigDecimal",
|
||||||
|
"拼团库存": "Long"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"排序": "Integer",
|
||||||
|
"详情": "String"
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.muyu.marketing.domain.model;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品活动SKU信息模型
|
||||||
|
*
|
||||||
|
* @author DongZeLiang
|
||||||
|
* @date 2024-11-26 15:35
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ActivityTeamProductSkuInfoModel {
|
||||||
|
/**
|
||||||
|
* 团购商品SKU的ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团ID
|
||||||
|
*/
|
||||||
|
private Long teamId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格SKU
|
||||||
|
*/
|
||||||
|
private String sku;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团价格
|
||||||
|
*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.muyu.marketing.domain.resp;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class ActivityTeamDetailResp extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团购ID
|
||||||
|
*/
|
||||||
|
private Long teamId;
|
||||||
|
/**
|
||||||
|
* 拼团名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
private Long productId;
|
||||||
|
/**
|
||||||
|
* 商品活动图
|
||||||
|
*/
|
||||||
|
private String productImage;
|
||||||
|
/**
|
||||||
|
* 活动简介
|
||||||
|
*/
|
||||||
|
private String introduction;
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String unit;
|
||||||
|
/**
|
||||||
|
* 轮播图
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String imageList;
|
||||||
|
/**
|
||||||
|
* 活动结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
|
||||||
|
private Date endTime;
|
||||||
|
/**
|
||||||
|
* 活动排序
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
/**
|
||||||
|
* 商品SkU集合
|
||||||
|
*/
|
||||||
|
private List<ActivityTeamProjectSkuResp> activityTeamProjectSkuList;
|
||||||
|
/**
|
||||||
|
* 活动详情
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
/**
|
||||||
|
* 活动状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 策略类型
|
||||||
|
*/
|
||||||
|
private String strategyType;
|
||||||
|
/**
|
||||||
|
* 策略ID
|
||||||
|
*/
|
||||||
|
private Long strategyId;
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.muyu.marketing.domain.resp;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加的
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ActivityTeamProjectSkuResp {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团购商品SKU的ID
|
||||||
|
*/
|
||||||
|
private Long productSkuId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格SKU
|
||||||
|
*/
|
||||||
|
private String sku;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团价格
|
||||||
|
*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ 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.TeamStrategyExemptionHundred;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuInfoModel;
|
||||||
import com.muyu.marketing.domain.model.TeamProductDiscountPriceModel;
|
import com.muyu.marketing.domain.model.TeamProductDiscountPriceModel;
|
||||||
import com.muyu.marketing.domain.model.TeamProductStockModel;
|
import com.muyu.marketing.domain.model.TeamProductStockModel;
|
||||||
|
|
||||||
|
@ -41,4 +42,10 @@ public interface ActivityTeamProductSkuInfoService extends IService<ActivityTeam
|
||||||
*/
|
*/
|
||||||
public void batchSave(List<ActivityTeamProductSkuAddModel> activityTeamProductSkuAddModelList);
|
public void batchSave(List<ActivityTeamProductSkuAddModel> activityTeamProductSkuAddModelList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过拼团活动ID获取拼团下商品SKU集合
|
||||||
|
* @param teamId 活动ID
|
||||||
|
* @return 拼团商品SKU集合
|
||||||
|
*/
|
||||||
|
public List<ActivityTeamProductSkuInfoModel> findListByTeamId(Long teamId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.common.core.exception.ServiceException;
|
import com.muyu.common.core.exception.ServiceException;
|
||||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
||||||
|
import com.muyu.marketing.domain.model.ActivityTeamProductSkuInfoModel;
|
||||||
import com.muyu.marketing.domain.model.TeamProductDiscountPriceModel;
|
import com.muyu.marketing.domain.model.TeamProductDiscountPriceModel;
|
||||||
import com.muyu.marketing.domain.model.TeamProductStockModel;
|
import com.muyu.marketing.domain.model.TeamProductStockModel;
|
||||||
import com.muyu.marketing.team.mapper.ActivityTeamProductSkuInfoMapper;
|
import com.muyu.marketing.team.mapper.ActivityTeamProductSkuInfoMapper;
|
||||||
|
@ -80,4 +81,15 @@ public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityT
|
||||||
activityTeamProductSkuAddModelList.stream().map(ActivityTeamProductSkuInfo::modelBuild).toList()
|
activityTeamProductSkuAddModelList.stream().map(ActivityTeamProductSkuInfo::modelBuild).toList()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过拼团活动ID获取拼团下商品SKU集合
|
||||||
|
*
|
||||||
|
* @param teamId 活动ID
|
||||||
|
* @return 拼团商品SKU集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ActivityTeamProductSkuInfoModel> findListByTeamId(Long teamId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue