Compare commits
No commits in common. "1127/sujunlong" and "master" have entirely different histories.
1127/sujun
...
master
|
@ -1,97 +0,0 @@
|
||||||
package com.muyu.marketing.domain.model;
|
|
||||||
|
|
||||||
|
|
||||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 团购活动详细模型
|
|
||||||
*
|
|
||||||
* @author DongZeLiang
|
|
||||||
* @date 2024-11-26 09:38
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class ActivityTeamInfoDetailModel{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
private long id;
|
|
||||||
/**
|
|
||||||
* 拼团名称
|
|
||||||
*/
|
|
||||||
private String name;
|
|
||||||
/**
|
|
||||||
* 商品ID
|
|
||||||
*/
|
|
||||||
private long productId;
|
|
||||||
/**
|
|
||||||
* 商品活动图
|
|
||||||
*/
|
|
||||||
private String productImage;
|
|
||||||
/**
|
|
||||||
* 活动简介
|
|
||||||
*/
|
|
||||||
private String introduction;
|
|
||||||
/**
|
|
||||||
* 单位
|
|
||||||
*/
|
|
||||||
private String unit;
|
|
||||||
/**
|
|
||||||
* 轮播图
|
|
||||||
*/
|
|
||||||
private String imageList;
|
|
||||||
/**
|
|
||||||
* 活动结束时间
|
|
||||||
*/
|
|
||||||
private Date endTime;
|
|
||||||
/**
|
|
||||||
* 活动排序
|
|
||||||
*/
|
|
||||||
private long sort;
|
|
||||||
/**
|
|
||||||
* 活动详情
|
|
||||||
*/
|
|
||||||
private String content;
|
|
||||||
/**
|
|
||||||
* 活动状态
|
|
||||||
*/
|
|
||||||
private String status;
|
|
||||||
/**
|
|
||||||
* 策略类型
|
|
||||||
*/
|
|
||||||
private String strategyType;
|
|
||||||
/**
|
|
||||||
* 策略ID
|
|
||||||
*/
|
|
||||||
private long strategyId;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static ActivityTeamInfoDetailModel DetailModelBuild(ActivityTeamInfo activityTeamInfo){
|
|
||||||
return ActivityTeamInfoDetailModel.builder()
|
|
||||||
.id(activityTeamInfo.getId())
|
|
||||||
.name(activityTeamInfo.getName())
|
|
||||||
.productId(activityTeamInfo.getProductId())
|
|
||||||
.productImage(activityTeamInfo.getProductImage())
|
|
||||||
.introduction(activityTeamInfo.getIntroduction())
|
|
||||||
.unit(activityTeamInfo.getUnit())
|
|
||||||
.imageList(activityTeamInfo.getImageList())
|
|
||||||
.endTime(activityTeamInfo.getEndTime())
|
|
||||||
.sort(activityTeamInfo.getSort())
|
|
||||||
.content(activityTeamInfo.getContent())
|
|
||||||
.status(activityTeamInfo.getStatus())
|
|
||||||
.strategyType(activityTeamInfo.getStrategyType())
|
|
||||||
.strategyId(activityTeamInfo.getStrategyId())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,72 +0,0 @@
|
||||||
package com.muyu.marketing.domain.model;
|
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
|
||||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
|
||||||
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 团购spu库存详细信息模型
|
|
||||||
*
|
|
||||||
* @author DongZeLiang
|
|
||||||
* @date 2024-11-26 09:36
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@SuperBuilder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class ActivityTeamProductSkuDetailModel extends BaseEntity {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键
|
|
||||||
*/
|
|
||||||
private long id;
|
|
||||||
/**
|
|
||||||
* 活动ID
|
|
||||||
*/
|
|
||||||
private long teamId;
|
|
||||||
/**
|
|
||||||
* 商品ID
|
|
||||||
*/
|
|
||||||
private Long productId;
|
|
||||||
/**
|
|
||||||
* 商品SKU
|
|
||||||
*/
|
|
||||||
private String productSku;
|
|
||||||
/**
|
|
||||||
* 拼团库存
|
|
||||||
*/
|
|
||||||
private Long teamStock;
|
|
||||||
/**
|
|
||||||
* 剩余库存
|
|
||||||
*/
|
|
||||||
private Long remainStock;
|
|
||||||
/**
|
|
||||||
* 拼团价格
|
|
||||||
*/
|
|
||||||
private BigDecimal teamPrice;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static ActivityTeamProductSkuDetailModel getIdBuild(ActivityTeamProductSkuInfo activityTeamProductSkuInfo){
|
|
||||||
return ActivityTeamProductSkuDetailModel.builder()
|
|
||||||
.id(activityTeamProductSkuInfo.getId())
|
|
||||||
.teamId(activityTeamProductSkuInfo.getTeamId())
|
|
||||||
.productId(activityTeamProductSkuInfo.getProductId())
|
|
||||||
.productSku(activityTeamProductSkuInfo.getProductSku())
|
|
||||||
.teamStock(activityTeamProductSkuInfo.getTeamStock())
|
|
||||||
.remainStock(activityTeamProductSkuInfo.getRemainStock())
|
|
||||||
.teamPrice(activityTeamProductSkuInfo.getTeamPrice())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,62 +0,0 @@
|
||||||
package com.muyu.marketing.domain.resp;
|
|
||||||
|
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuDetailModel;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* sku回显对象
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@SuperBuilder
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class ActivityTeamProjectSkuInfoResp {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规格id
|
|
||||||
*/
|
|
||||||
public Long id;
|
|
||||||
/**
|
|
||||||
* 团购活动ID
|
|
||||||
*/
|
|
||||||
private Long teamId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品ID
|
|
||||||
*/
|
|
||||||
private Long productId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规格SKU
|
|
||||||
*/
|
|
||||||
private String productSku;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团价格
|
|
||||||
*/
|
|
||||||
private BigDecimal teamPrice;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 拼团库存
|
|
||||||
*/
|
|
||||||
private Long teamStock;
|
|
||||||
|
|
||||||
|
|
||||||
public static List<ActivityTeamProjectSkuInfoResp> findSkuId(List<ActivityTeamProductSkuDetailModel> activityTeamProductSkuDetailModel) {
|
|
||||||
return activityTeamProductSkuDetailModel.stream().map(activityTeamProductSkuDetailModel1 -> {
|
|
||||||
ActivityTeamProjectSkuInfoResp teamProjectSkuInfoResp = ActivityTeamProjectSkuInfoResp.builder()
|
|
||||||
.teamId(activityTeamProductSkuDetailModel1.getTeamId())
|
|
||||||
.productSku(activityTeamProductSkuDetailModel1.getProductSku())
|
|
||||||
.productSku(activityTeamProductSkuDetailModel1.getProductSku())
|
|
||||||
.teamPrice(activityTeamProductSkuDetailModel1.getTeamPrice())
|
|
||||||
.build();
|
|
||||||
return teamProjectSkuInfoResp;
|
|
||||||
}).toList();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue