拼团添加
parent
91ea6b0498
commit
5e137c9f39
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"商品id": "Long",
|
||||||
|
"商品图片": "String",
|
||||||
|
"活动名称": "String",
|
||||||
|
"活动简介": "String",
|
||||||
|
"商品单位": "String",
|
||||||
|
"商品轮播图": ["String","String","",""],
|
||||||
|
"活动时间": "Date",
|
||||||
|
"开始时间": "Date",
|
||||||
|
"策略id": "Long",
|
||||||
|
"策略类型": "String",
|
||||||
|
"商品规格集合": [
|
||||||
|
{
|
||||||
|
"规格id": "Long",
|
||||||
|
"库存": "Long",
|
||||||
|
"秒杀价": "BigDecimal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"排序":"Integer",
|
||||||
|
"详情": "text"
|
||||||
|
}
|
|
@ -50,6 +50,10 @@
|
||||||
<artifactId>mybatis-plus-annotation</artifactId>
|
<artifactId>mybatis-plus-annotation</artifactId>
|
||||||
<version>3.4.1</version>
|
<version>3.4.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-product-common</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -2,8 +2,10 @@ package com.muyu.marketing.domain;
|
||||||
|
|
||||||
import com.alibaba.ttl.threadpool.agent.internal.javassist.bytecode.AttributeInfo;
|
import com.alibaba.ttl.threadpool.agent.internal.javassist.bytecode.AttributeInfo;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.marketing.domain.req.ActivityTeamInfoAddReq;
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamInfoReq;
|
import com.muyu.marketing.domain.req.ActivityTeamInfoReq;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
@ -13,12 +15,14 @@ import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.xmlbeans.impl.xb.xsdschema.AttributeGroup;
|
import org.apache.xmlbeans.impl.xb.xsdschema.AttributeGroup;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品拼团信息
|
* 商品拼团信息
|
||||||
|
@ -42,7 +46,7 @@ public class ActivityTeamInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 商品ID
|
* 商品ID
|
||||||
*/
|
*/
|
||||||
private BigInteger productId;
|
private Long productId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品活动图
|
* 商品活动图
|
||||||
|
@ -63,6 +67,8 @@ public class ActivityTeamInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 活动结束时间
|
* 活动结束时间
|
||||||
*/
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
/**
|
/**
|
||||||
* 活动排序
|
* 活动排序
|
||||||
|
@ -83,8 +89,33 @@ public class ActivityTeamInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 策略ID
|
* 策略ID
|
||||||
*/
|
*/
|
||||||
private BigInteger strategyId;
|
private Long strategyId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼团活动新增构建器
|
||||||
|
*
|
||||||
|
* @param activityTeamInfoAddModel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static ActivityTeamInfo saveBuildModel(ActivityTeamInfoAddReq activityTeamInfoAddModel, Supplier<String> createBy){
|
||||||
|
return ActivityTeamInfo.builder()
|
||||||
|
.id(activityTeamInfoAddModel.getId())
|
||||||
|
.name(activityTeamInfoAddModel.getName())
|
||||||
|
.productId(activityTeamInfoAddModel.getProductId())
|
||||||
|
.productImage(activityTeamInfoAddModel.getProductImage())
|
||||||
|
.introduction(activityTeamInfoAddModel.getIntroduction())
|
||||||
|
.unit(activityTeamInfoAddModel.getUnit())
|
||||||
|
.imageList(activityTeamInfoAddModel.getImageList())
|
||||||
|
.endTime(activityTeamInfoAddModel.getEndTime())
|
||||||
|
.sort(activityTeamInfoAddModel.getSort())
|
||||||
|
.content(activityTeamInfoAddModel.getContent())
|
||||||
|
.strategyType(activityTeamInfoAddModel.getStrategyType())
|
||||||
|
.strategyId(activityTeamInfoAddModel.getStrategyId())
|
||||||
|
.content(activityTeamInfoAddModel.getContent())
|
||||||
|
.status(activityTeamInfoAddModel.getStatus())
|
||||||
|
.createBy(createBy.get())
|
||||||
|
.createTime(new Date())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.product.domain.ProjectSkuInfo;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -54,4 +55,38 @@ public class ActivityTeamProductSkuInfo extends BaseEntity {
|
||||||
* 拼团价格
|
* 拼团价格
|
||||||
*/
|
*/
|
||||||
private BigDecimal teamPrice;
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 拼团规格信息构建
|
||||||
|
// * @param projectSkuInfo
|
||||||
|
// * @param o
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// public static ActivityTeamProductSkuInfo productSkuModelBuild(ProjectSkuInfo projectSkuInfo, Object o) {
|
||||||
|
// return ActivityTeamProductSkuInfo.builder()
|
||||||
|
// .productId(projectSkuInfo.getProjectId())
|
||||||
|
// .productSku(projectSkuInfo.getSku())
|
||||||
|
// .teamPrice(projectSkuInfo.getPrice())
|
||||||
|
// .teamStock(projectSkuInfo.getStock())
|
||||||
|
// .remainStock(projectSkuInfo.getStock())
|
||||||
|
// .build();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 拼团规格信息构建
|
||||||
|
// * @param projectSkuInfo
|
||||||
|
// * @param id
|
||||||
|
// * @param o
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// public static ActivityTeamProductSkuInfo productSkuModelBuild(ProjectSkuInfo projectSkuInfo, Long id, Object o) {
|
||||||
|
// return ActivityTeamProductSkuInfo.builder()
|
||||||
|
// .id(id)
|
||||||
|
// .productId(projectSkuInfo.getProjectId())
|
||||||
|
// .productSku(projectSkuInfo.getSku())
|
||||||
|
// .teamPrice(projectSkuInfo.getPrice())
|
||||||
|
// .teamStock(projectSkuInfo.getStock())
|
||||||
|
// .remainStock(projectSkuInfo.getStock())
|
||||||
|
// .build();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,81 +0,0 @@
|
||||||
package com.muyu.marketing.domain.model;
|
|
||||||
|
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
|
||||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
|
||||||
import lombok.*;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
//@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class ActivityTeamInfoAddModel extends BaseEntity {
|
|
||||||
/**
|
|
||||||
* 拼团名称
|
|
||||||
*/
|
|
||||||
private String name;
|
|
||||||
/**
|
|
||||||
* 商品图片
|
|
||||||
*/
|
|
||||||
private String productImage;
|
|
||||||
/**
|
|
||||||
* 轮播图片
|
|
||||||
*/
|
|
||||||
private String imageList;
|
|
||||||
/**
|
|
||||||
* 拼团库存
|
|
||||||
*/
|
|
||||||
private Long teamStock;
|
|
||||||
/**
|
|
||||||
* 商品价格
|
|
||||||
*/
|
|
||||||
private BigDecimal productPrice;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 团购优惠价格
|
|
||||||
*/
|
|
||||||
private BigDecimal teamPrice;
|
|
||||||
/**
|
|
||||||
* 拼团人数
|
|
||||||
*/
|
|
||||||
private Long attendTeamNumber;
|
|
||||||
/**
|
|
||||||
* 参团人数
|
|
||||||
*/
|
|
||||||
private Long addTeamNumber;
|
|
||||||
/**
|
|
||||||
* 开团人数
|
|
||||||
*/
|
|
||||||
private Long openTeamNumber;
|
|
||||||
/**
|
|
||||||
* 拼团剩余库存
|
|
||||||
*/
|
|
||||||
private Long remainStock;
|
|
||||||
/**
|
|
||||||
* 活动状态
|
|
||||||
*/
|
|
||||||
private String status;
|
|
||||||
/**
|
|
||||||
* 结束时间
|
|
||||||
*/
|
|
||||||
private Date endTime;
|
|
||||||
|
|
||||||
// public ActivityTeamInfoAddModel AddBuild(){
|
|
||||||
// return ActivityTeamInfoAddModel.builder()
|
|
||||||
// .name(this.name)
|
|
||||||
// .productImage(this.getProductImage())
|
|
||||||
// .imageList(this.getImageList())
|
|
||||||
// .teamStock(this.getTeamStock())
|
|
||||||
// .productPrice(this.getProductPrice())
|
|
||||||
// .teamPrice(this.getTeamPrice())
|
|
||||||
// .attendTeamNumber(this.getAttendTeamNumber())
|
|
||||||
// .addTeamNumber(this.getAddTeamNumber())
|
|
||||||
// .openTeamNumber(this.getOpenTeamNumber())
|
|
||||||
// .remainStock(this.getRemainStock())
|
|
||||||
// .build();
|
|
||||||
// }
|
|
||||||
}
|
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.muyu.marketing.domain.req;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import com.muyu.product.domain.RuleInfo;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class ActivityTeamInfoAddReq {
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 商品ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "商品ID不能为空")
|
||||||
|
private Long productId;
|
||||||
|
/**
|
||||||
|
* 商品图片
|
||||||
|
*/
|
||||||
|
private String productImage;
|
||||||
|
/**
|
||||||
|
* 活动名称
|
||||||
|
*/
|
||||||
|
@NotNull(message = "商品名称不能为空")
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 活动简介
|
||||||
|
*/
|
||||||
|
@NotNull(message = "商品简介不能为空")
|
||||||
|
private String introduction;
|
||||||
|
/**
|
||||||
|
* 商品单位
|
||||||
|
*/
|
||||||
|
private String unit;
|
||||||
|
/**
|
||||||
|
* 商品的轮播图
|
||||||
|
*/
|
||||||
|
@NotNull(message = "商品轮播图不能为空")
|
||||||
|
private String imageList;
|
||||||
|
/**
|
||||||
|
* 活动时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date endTime;
|
||||||
|
/**
|
||||||
|
* 策略ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "策略ID不能为空")
|
||||||
|
private Long strategyId;
|
||||||
|
/**
|
||||||
|
* 策略类型
|
||||||
|
*/
|
||||||
|
@NotNull(message = "策略类型不能为空")
|
||||||
|
private String strategyType;
|
||||||
|
/**
|
||||||
|
* 商品规格List
|
||||||
|
*/
|
||||||
|
@NotNull(message = "商品规格不能为空")
|
||||||
|
private List<RuleInfo> ruleInfo;
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@NotNull(message = "排序不能为空")
|
||||||
|
private Integer sort;
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
@NotNull(message = "详情不能为空")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 规则List
|
||||||
|
*/
|
||||||
|
private List<RuleInfo> ruleInfoList;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
//package com.muyu.marketing.domain.resp;
|
||||||
|
//
|
||||||
|
//import lombok.AllArgsConstructor;
|
||||||
|
//import lombok.Builder;
|
||||||
|
//import lombok.Data;
|
||||||
|
//import lombok.NoArgsConstructor;
|
||||||
|
//
|
||||||
|
//import javax.validation.constraints.NotNull;
|
||||||
|
//import javax.validation.constraints.Pattern;
|
||||||
|
//import java.math.BigDecimal;
|
||||||
|
//import java.util.Date;
|
||||||
|
//
|
||||||
|
//@Data
|
||||||
|
//@AllArgsConstructor
|
||||||
|
//@NoArgsConstructor
|
||||||
|
//@Builder
|
||||||
|
//public class ActivityTeamInfoResp {
|
||||||
|
// /**
|
||||||
|
// * 主键
|
||||||
|
// */
|
||||||
|
// private Long id;
|
||||||
|
// /**
|
||||||
|
// * 拼团名称
|
||||||
|
// */
|
||||||
|
// @NotNull(message = "拼团名称不能为空")
|
||||||
|
// private String name;
|
||||||
|
// /**
|
||||||
|
// * 参团人数
|
||||||
|
// */
|
||||||
|
// @Pattern(regexp = "^[1-9]\\d*$", message = "拼团人数必须为正整数")
|
||||||
|
// private Long addTeamNumber;
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 开团人数
|
||||||
|
// */
|
||||||
|
// @Pattern(regexp = "^[1-9]\\d*$", message = "开团人数必须为正整数")
|
||||||
|
// private Long openTeamNumber;
|
||||||
|
// /**
|
||||||
|
// * 拼团人数
|
||||||
|
// */
|
||||||
|
// @Pattern(regexp = "^[1-9]\\d*$", message = "拼团人数必须为正整数")
|
||||||
|
// private Long attendTeamNumber;
|
||||||
|
// /**
|
||||||
|
// * 活动结束时间
|
||||||
|
// */
|
||||||
|
// private Date endTime;
|
||||||
|
// /**
|
||||||
|
// * 图片
|
||||||
|
// */
|
||||||
|
// private String productImage;
|
||||||
|
// /**
|
||||||
|
// * 拼团价格
|
||||||
|
// */
|
||||||
|
// @Pattern(regexp = "^(([1-9][0-9]*)|(([0-9]|[1-9][0-9]*)(\\.[0-9]{1,2})?))$", message = "拼团价格必须为小数")
|
||||||
|
// private BigDecimal teamPrice;
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 商品价格
|
||||||
|
// */
|
||||||
|
// @Pattern(regexp = "^(([1-9][0-9]*)|(([0-9]|[1-9][0-9]*)(\\.[0-9]{1,2})?))$", message = "商品价格必须为小数")
|
||||||
|
// private BigDecimal productPrice;
|
||||||
|
// /**
|
||||||
|
// * 总库存
|
||||||
|
// */
|
||||||
|
// @Pattern(regexp = "^[1-9]\\d*$", message = "总库存必须为正整数")
|
||||||
|
// private Long totalStock;
|
||||||
|
// /**
|
||||||
|
// * 团购库存
|
||||||
|
// */
|
||||||
|
// @Pattern(regexp = "^[1-9]\\d*$", message = "团购库存必须为正整数")
|
||||||
|
// private Long teamStock;
|
||||||
|
// /**
|
||||||
|
// * 剩余库存
|
||||||
|
// */
|
||||||
|
// @Pattern(regexp = "^[1-9]\\d*$", message = "剩余库存必须为正整数")
|
||||||
|
// private Long RemainStock;
|
||||||
|
// /**
|
||||||
|
// * 活动状态
|
||||||
|
// */
|
||||||
|
// private String Status;
|
||||||
|
//}
|
|
@ -0,0 +1,41 @@
|
||||||
|
//package com.muyu.marketing.domain.resp;
|
||||||
|
//
|
||||||
|
//import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
//import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
//import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
//import io.swagger.annotations.ApiModelProperty;
|
||||||
|
//import lombok.AllArgsConstructor;
|
||||||
|
//import lombok.Data;
|
||||||
|
//import lombok.NoArgsConstructor;
|
||||||
|
//
|
||||||
|
//import java.math.BigDecimal;
|
||||||
|
//
|
||||||
|
//@Data
|
||||||
|
//@NoArgsConstructor
|
||||||
|
//@AllArgsConstructor
|
||||||
|
//@TableName(value = "activity_team_product_sku_info")
|
||||||
|
//public class RuleInfo {
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 主键
|
||||||
|
// */
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// @TableId(value = "id",type = IdType.AUTO)
|
||||||
|
// @ApiModelProperty("主键")
|
||||||
|
// private Long id;
|
||||||
|
// /**
|
||||||
|
// *规格Sku
|
||||||
|
// */
|
||||||
|
// private String ruleSku;
|
||||||
|
// /**
|
||||||
|
// *拼团库存
|
||||||
|
// */
|
||||||
|
// private Long teamStock;
|
||||||
|
// /**
|
||||||
|
// * 拼团价格
|
||||||
|
// */
|
||||||
|
// private BigDecimal teamPrice;
|
||||||
|
//
|
||||||
|
//}
|
|
@ -0,0 +1,25 @@
|
||||||
|
//package com.muyu.marketing.domain.resp;
|
||||||
|
//
|
||||||
|
//import lombok.AllArgsConstructor;
|
||||||
|
//import lombok.Data;
|
||||||
|
//import lombok.NoArgsConstructor;
|
||||||
|
//
|
||||||
|
//import java.math.BigDecimal;
|
||||||
|
//
|
||||||
|
//@Data
|
||||||
|
//@AllArgsConstructor
|
||||||
|
//@NoArgsConstructor
|
||||||
|
//public class Strategy {
|
||||||
|
// /**
|
||||||
|
// * 商品规格id
|
||||||
|
// */
|
||||||
|
// private Long productSkuId;
|
||||||
|
// /**
|
||||||
|
// * 拼团价格
|
||||||
|
// */
|
||||||
|
// private BigDecimal price;
|
||||||
|
// /**
|
||||||
|
// * 拼团库存
|
||||||
|
// */
|
||||||
|
// private Long stock;
|
||||||
|
//}
|
|
@ -90,6 +90,22 @@
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>muyu-product-cache</artifactId>
|
<artifactId>muyu-product-cache</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun.oss</groupId>
|
||||||
|
<artifactId>aliyun-sdk-oss</artifactId>
|
||||||
|
<version>3.15.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-file</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-product-server</artifactId>
|
||||||
|
<version>3.6.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
@EnableCustomSwagger2
|
@EnableCustomSwagger2
|
||||||
@EnableMyFeignClients
|
@EnableMyFeignClients
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
//@MapperScan("com.muyu.marketing.mapper")
|
@MapperScan("com.muyu.marketing.mapper")
|
||||||
public class MuYuMarketingApplication {
|
public class MuYuMarketingApplication {
|
||||||
public static void main (String[] args) {
|
public static void main (String[] args) {
|
||||||
SpringApplication.run(MuYuMarketingApplication.class, args);
|
SpringApplication.run(MuYuMarketingApplication.class, args);
|
||||||
|
|
|
@ -4,21 +4,22 @@ 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.common.log.annotation.Log;
|
import com.muyu.common.log.annotation.Log;
|
||||||
import com.muyu.common.log.enums.BusinessType;
|
import com.muyu.common.log.enums.BusinessType;
|
||||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
|
||||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoAddModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
import com.muyu.marketing.domain.req.ActivityTeamInfoAddReq;
|
||||||
import com.muyu.marketing.domain.req.ActivityTeamInfoReq;
|
import com.muyu.marketing.domain.req.ActivityTeamInfoReq;
|
||||||
import com.muyu.marketing.domain.resp.TeamInfoListResp;
|
|
||||||
import com.muyu.marketing.service.ActivityTeamInfoService;
|
import com.muyu.marketing.service.ActivityTeamInfoService;
|
||||||
|
import com.muyu.marketing.util.OssUtil;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/activity")
|
@RequestMapping("/activity")
|
||||||
|
@ -26,22 +27,20 @@ public class ActivityTeamInfoController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ActivityTeamInfoService activityTeamInfoService;
|
private ActivityTeamInfoService activityTeamInfoService;
|
||||||
|
|
||||||
@PostMapping("list")
|
@PostMapping("list")
|
||||||
public Result<TableDataInfo<TeamInfoListResp>> list(@RequestBody ActivityTeamInfoReq activityTeamInfoReq){
|
public Result<TableDataInfo<ActivityTeamInfoListModel>> list(@RequestBody ActivityTeamInfoReq activityTeamInfoReq) {
|
||||||
activityTeamInfoService.query(activityTeamInfoReq.buildQueryModel());
|
TableDataInfo<ActivityTeamInfoListModel> query = activityTeamInfoService.query(activityTeamInfoReq.buildQueryModel());
|
||||||
return Result.success();
|
return Result.success(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增属性组
|
* 新增拼团
|
||||||
*/
|
*/
|
||||||
@Log(title = "属性组", businessType = BusinessType.INSERT)
|
@Log(title = "拼团", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@ApiOperation("新增拼团")
|
public Result add(@RequestBody ActivityTeamInfoAddReq activityTeamInfoAddReq) {
|
||||||
public Result<String> add(@RequestBody ActivityTeamInfo activityTeamInfo) {
|
|
||||||
// return toAjax(
|
return activityTeamInfoService.insert(activityTeamInfoAddReq);
|
||||||
// activityTeamInfoService.add(ActivityTeamInfoAddModel.AddBuild(activityTeamInfo))
|
|
||||||
// );
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.muyu.marketing.remote;
|
||||||
|
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.product.domain.ProjectSkuInfo;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@FeignClient(value = "muyu-product")
|
||||||
|
public interface ProjectRemoteService {
|
||||||
|
@GetMapping("/sku/list/{projectId}")
|
||||||
|
public Result<List<ProjectSkuInfo>> listByProjectId(@PathVariable("projectId") Long projectId);
|
||||||
|
}
|
|
@ -1,10 +1,13 @@
|
||||||
package com.muyu.marketing.service;
|
package com.muyu.marketing.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
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;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
||||||
|
import com.muyu.marketing.domain.req.ActivityTeamInfoAddReq;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -15,4 +18,11 @@ public interface ActivityTeamInfoService extends IService<ActivityTeamInfo> {
|
||||||
* @return 团购活动列表
|
* @return 团购活动列表
|
||||||
*/
|
*/
|
||||||
public TableDataInfo<ActivityTeamInfoListModel> query(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel);
|
public TableDataInfo<ActivityTeamInfoListModel> query(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增团购活动
|
||||||
|
* @param activityTeamInfoAddReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Result insert(ActivityTeamInfoAddReq activityTeamInfoAddReq);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
||||||
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 java.math.BigInteger;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ActivityTeamProductSkuInfoService extends IService<ActivityTeamProductSkuInfo> {
|
public interface ActivityTeamProductSkuInfoService extends IService<ActivityTeamProductSkuInfo> {
|
||||||
|
@ -37,4 +38,5 @@ public interface ActivityTeamProductSkuInfoService extends IService<ActivityTeam
|
||||||
public TeamProductStockModel getStock(Long teamId);
|
public TeamProductStockModel getStock(Long teamId);
|
||||||
|
|
||||||
|
|
||||||
|
List<ActivityTeamProductSkuInfo> getSkuList(BigInteger productId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,28 @@
|
||||||
package com.muyu.marketing.service.impl;
|
package com.muyu.marketing.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
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.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListModel;
|
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||||
import com.muyu.marketing.domain.model.ActivityTeamInfoListQueryModel;
|
import com.muyu.marketing.domain.model.*;
|
||||||
import com.muyu.marketing.domain.model.TeamProductDisCountPriceModel;
|
import com.muyu.marketing.domain.req.ActivityTeamInfoAddReq;
|
||||||
import com.muyu.marketing.domain.model.TeamProductStockModel;
|
|
||||||
import com.muyu.marketing.mapper.ActivityTeamInfoMapper;
|
import com.muyu.marketing.mapper.ActivityTeamInfoMapper;
|
||||||
import com.muyu.marketing.service.ActivityTeamInfoService;
|
import com.muyu.marketing.service.ActivityTeamInfoService;
|
||||||
import com.muyu.marketing.service.ActivityTeamOpenInfoService;
|
import com.muyu.marketing.service.ActivityTeamOpenInfoService;
|
||||||
import com.muyu.marketing.service.ActivityTeamProductSkuInfoService;
|
import com.muyu.marketing.service.ActivityTeamProductSkuInfoService;
|
||||||
|
import com.muyu.product.domain.RuleInfo;
|
||||||
|
import com.muyu.product.service.ProjectInfoService;
|
||||||
|
import com.muyu.marketing.remote.ProjectRemoteService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Consumer;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMapper, ActivityTeamInfo> implements ActivityTeamInfoService {
|
public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMapper, ActivityTeamInfo> implements ActivityTeamInfoService {
|
||||||
|
@ -34,6 +33,13 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
||||||
@Autowired
|
@Autowired
|
||||||
private ActivityTeamProductSkuInfoService activityTeamProductSkuInfoService;
|
private ActivityTeamProductSkuInfoService activityTeamProductSkuInfoService;
|
||||||
|
|
||||||
|
// @Autowired
|
||||||
|
// private ProjectInfoService projectInfoService;
|
||||||
|
//
|
||||||
|
// @Autowired
|
||||||
|
// private ProjectRemoteService projectRemoteService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<ActivityTeamInfoListModel> query(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel) {
|
public TableDataInfo<ActivityTeamInfoListModel> query(ActivityTeamInfoListQueryModel activityTeamInfoListQueryModel) {
|
||||||
|
@ -64,7 +70,7 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
||||||
.name(activityTeamInfo.getName())
|
.name(activityTeamInfo.getName())
|
||||||
.addTeamNumber(addTeamNumber)
|
.addTeamNumber(addTeamNumber)
|
||||||
.openTeamNumber(openTeamNumber)
|
.openTeamNumber(openTeamNumber)
|
||||||
.attendTeamNumber(openTeamNumber+addTeamNumber)
|
.attendTeamNumber(openTeamNumber + addTeamNumber)
|
||||||
.endTime(activityTeamInfo.getEndTime())
|
.endTime(activityTeamInfo.getEndTime())
|
||||||
.productImage(activityTeamInfo.getProductImage())
|
.productImage(activityTeamInfo.getProductImage())
|
||||||
.teamPrice(discountPrice.getTeamPrice())
|
.teamPrice(discountPrice.getTeamPrice())
|
||||||
|
@ -78,5 +84,41 @@ public class ActivityTeamInfoServiceImpl extends ServiceImpl<ActivityTeamInfoMap
|
||||||
tableDataInfo.setRows(activityTeamInfoListModels);
|
tableDataInfo.setRows(activityTeamInfoListModels);
|
||||||
return tableDataInfo;
|
return tableDataInfo;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 新增拼团活动
|
||||||
|
* @param activityTeamInfoAddReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Result insert(ActivityTeamInfoAddReq activityTeamInfoAddReq) {
|
||||||
|
//构建活动信息
|
||||||
|
ActivityTeamInfo activityTeamInfo=ActivityTeamInfo.saveBuildModel(activityTeamInfoAddReq,SecurityUtils::getUsername);
|
||||||
|
//插入活动信息
|
||||||
|
this.save(activityTeamInfo);
|
||||||
|
//构建拼团规则信息
|
||||||
|
List<RuleInfo> ruleInfoList = activityTeamInfoAddReq.getRuleInfoList();
|
||||||
|
//构建拼团规则明细
|
||||||
|
List<ActivityTeamProductSkuInfo> activityTeamProductSkuInfoList = ruleInfoList.stream().map(ruleInfo -> {
|
||||||
|
ActivityTeamProductSkuInfo teamProductSkuInfo = ActivityTeamProductSkuInfo.builder()
|
||||||
|
.id(ruleInfo.getId())
|
||||||
|
.teamId(activityTeamInfo.getId())
|
||||||
|
.productId(activityTeamInfoAddReq.getProductId())
|
||||||
|
.teamStock(ruleInfo.getTeamStock())
|
||||||
|
.teamPrice(ruleInfo.getTeamPrice())
|
||||||
|
.productSku(ruleInfo.getRuleSku())
|
||||||
|
.createTime(new Date())
|
||||||
|
.updateTime(new Date())
|
||||||
|
.createBy(SecurityUtils.getUsername())
|
||||||
|
.updateBy(SecurityUtils.getUsername())
|
||||||
|
.remark(ruleInfo.getRemark())
|
||||||
|
.params(ruleInfo.getParams())
|
||||||
|
.searchValue(ruleInfo.getSearchValue())
|
||||||
|
.build();
|
||||||
|
return teamProductSkuInfo;
|
||||||
|
}).toList();
|
||||||
|
//批量插入拼团规则明细
|
||||||
|
activityTeamProductSkuInfoService.saveBatch(activityTeamProductSkuInfoList);
|
||||||
|
return Result.success(200,"添加成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.BigInteger;
|
||||||
import java.rmi.ServerException;
|
import java.rmi.ServerException;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -51,4 +52,16 @@ public class ActivityTeamProductSkuInfoServiceImpl extends ServiceImpl<ActivityT
|
||||||
.remainStock(activityTeamProductSkuInfoList.stream().mapToLong(ActivityTeamProductSkuInfo::getRemainStock).sum())
|
.remainStock(activityTeamProductSkuInfoList.stream().mapToLong(ActivityTeamProductSkuInfo::getRemainStock).sum())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据商品id获取商品拼团规格信息
|
||||||
|
* @param productId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ActivityTeamProductSkuInfo> getSkuList(BigInteger productId) {
|
||||||
|
LambdaQueryWrapper<ActivityTeamProductSkuInfo> queryWrapper = new LambdaQueryWrapper<ActivityTeamProductSkuInfo>().eq(ActivityTeamProductSkuInfo::getProductId, productId);
|
||||||
|
List<ActivityTeamProductSkuInfo> activityTeamProductSkuInfoList = this.list(queryWrapper);
|
||||||
|
return activityTeamProductSkuInfoList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,175 @@
|
||||||
|
package com.muyu.marketing.util;
|
||||||
|
|
||||||
|
import com.aliyun.oss.OSS;
|
||||||
|
import com.aliyun.oss.OSSClientBuilder;
|
||||||
|
import com.aliyun.oss.model.GetObjectRequest;
|
||||||
|
import com.aliyun.oss.model.PutObjectRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Oss服务调用
|
||||||
|
*/
|
||||||
|
@Log4j2
|
||||||
|
@Configuration
|
||||||
|
@ConfigurationProperties(prefix = "oss")
|
||||||
|
@Data
|
||||||
|
public class OssUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Endpoint 存储对象概述 阿里云主账号AccessKey,accessKeySecret拥有所有API的访问权限 访问路径前缀 存储对象概述
|
||||||
|
*/
|
||||||
|
private String endPoint;
|
||||||
|
private String accessKeyId;
|
||||||
|
private String accessKeySecret;
|
||||||
|
private String accessPre;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bucket名称
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String bucketName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建 OSS 对象
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private OSS initOssClient() {
|
||||||
|
return new OSSClientBuilder().build(
|
||||||
|
endPoint,
|
||||||
|
accessKeyId,
|
||||||
|
accessKeySecret);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认路径上传本地文件
|
||||||
|
*
|
||||||
|
* @param filePath
|
||||||
|
*/
|
||||||
|
public String uploadFile(String filePath) {
|
||||||
|
return uploadFileForBucket(bucketName, getOssFilePath(filePath), filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认路径上传multipartFile文件
|
||||||
|
*
|
||||||
|
* @param multipartFile
|
||||||
|
*/
|
||||||
|
public String uploadMultipartFile(MultipartFile multipartFile) {
|
||||||
|
return uploadMultipartFile(bucketName, getOssFilePath(multipartFile.getOriginalFilename()), multipartFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传 multipartFile 类型文件
|
||||||
|
*
|
||||||
|
* @param bucketName
|
||||||
|
* @param ossPath
|
||||||
|
* @param multipartFile
|
||||||
|
*/
|
||||||
|
public String uploadMultipartFile(String bucketName, String ossPath, MultipartFile multipartFile) {
|
||||||
|
InputStream inputStream = null;
|
||||||
|
try {
|
||||||
|
inputStream = multipartFile.getInputStream();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
uploadFileInputStreamForBucket(bucketName, ossPath, inputStream);
|
||||||
|
return accessPre + ossPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用File上传PutObject上传文件 ** 程序默认使用次方法上传
|
||||||
|
*
|
||||||
|
* @param bucketName 实例名称
|
||||||
|
* @param ossPath oss存储路径
|
||||||
|
* @param filePath 本地文件路径
|
||||||
|
*/
|
||||||
|
public String uploadFileForBucket(String bucketName, String ossPath, String filePath) {
|
||||||
|
// 创建PutObjectRequest对象。
|
||||||
|
PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, ossPath, new File(filePath));
|
||||||
|
|
||||||
|
// 上传
|
||||||
|
initOssClient().putObject(putObjectRequest);
|
||||||
|
return accessPre + ossPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用文件流上传到指定的bucket实例
|
||||||
|
*
|
||||||
|
* @param bucketName 实例名称
|
||||||
|
* @param ossPath oss存储路径
|
||||||
|
* @param filePath 本地文件路径
|
||||||
|
*/
|
||||||
|
public String uploadFileInputStreamForBucket(String bucketName, String ossPath, String filePath) {
|
||||||
|
|
||||||
|
// 填写本地文件的完整路径。如果未指定本地路径,则默认从示例程序所属项目对应本地路径中上传文件流。
|
||||||
|
InputStream inputStream = null;
|
||||||
|
try {
|
||||||
|
inputStream = new FileInputStream(filePath);
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
// 填写Bucket名称和Object完整路径。Object完整路径中不能包含Bucket名称。
|
||||||
|
uploadFileInputStreamForBucket(bucketName, ossPath, inputStream);
|
||||||
|
return accessPre + ossPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void uploadFileInputStreamForBucket(String bucketName, String ossPath, InputStream inputStream) {
|
||||||
|
initOssClient().putObject(bucketName, ossPath, inputStream);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载
|
||||||
|
*
|
||||||
|
* @param ossFilePath
|
||||||
|
* @param filePath
|
||||||
|
*/
|
||||||
|
public void downloadFile(String ossFilePath, String filePath) {
|
||||||
|
downloadFileForBucket(bucketName, ossFilePath, filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载
|
||||||
|
*
|
||||||
|
* @param bucketName 实例名称
|
||||||
|
* @param ossFilePath oss存储路径
|
||||||
|
* @param filePath 本地文件路径
|
||||||
|
*/
|
||||||
|
public void downloadFileForBucket(String bucketName, String ossFilePath, String filePath) {
|
||||||
|
initOssClient().getObject(new GetObjectRequest(bucketName, ossFilePath), new File(filePath));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getOssDefaultPath() {
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
String url =
|
||||||
|
now.getYear() + "/" +
|
||||||
|
now.getMonth() + "/" +
|
||||||
|
now.getDayOfMonth() + "/" +
|
||||||
|
now.getHour() + "/" +
|
||||||
|
now.getMinute() + "/";
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对文件进行重新命名
|
||||||
|
* @param filePath
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getOssFilePath(String filePath) {
|
||||||
|
String fileSuf = filePath.substring(filePath.lastIndexOf(".") + 1);
|
||||||
|
return getOssDefaultPath() + UUID.randomUUID().toString() + "." + fileSuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -33,3 +33,9 @@ mybatis-plus:
|
||||||
- classpath*:mapper/*Mapper.xml
|
- classpath*:mapper/*Mapper.xml
|
||||||
# 搜索指定包别名
|
# 搜索指定包别名
|
||||||
typeAliasesPackage: com.muyu.marketing.domain
|
typeAliasesPackage: com.muyu.marketing.domain
|
||||||
|
oss:
|
||||||
|
endPoint: https://oss-cn-shanghai.aliyuncs.com
|
||||||
|
accessKeyId: LTAI5tLMYKdkKFsCqjNMk1GY
|
||||||
|
accessKeySecret: m3Tnb3FWegHh7tnfN1o48vZ2UyJa4l
|
||||||
|
accessPre: https://ccc-demo123123.oss-cn-shanghai.aliyuncs.com/
|
||||||
|
bucketName: lhc-2204a
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.muyu.marketing.mapper.ActivityTeamOpenInfoMapper">
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -16,6 +16,7 @@ import com.muyu.product.domain.req.RuleInfoSaveReq;
|
||||||
import com.muyu.product.domain.req.RuleInfoEditReq;
|
import com.muyu.product.domain.req.RuleInfoEditReq;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
@ -51,6 +52,19 @@ public class RuleInfo extends BaseEntity {
|
||||||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*规格Sku
|
||||||
|
*/
|
||||||
|
private String ruleSku;
|
||||||
|
/**
|
||||||
|
*拼团库存
|
||||||
|
*/
|
||||||
|
private Long teamStock;
|
||||||
|
/**
|
||||||
|
* 拼团价格
|
||||||
|
*/
|
||||||
|
private BigDecimal teamPrice;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询构造器
|
* 查询构造器
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product;
|
||||||
import com.muyu.common.security.annotation.EnableCustomConfig;
|
import com.muyu.common.security.annotation.EnableCustomConfig;
|
||||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||||
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.AsAttributeGroup;
|
import com.muyu.product.domain.AsAttributeGroup;
|
||||||
import com.muyu.product.domain.req.AttributeInfoSaveReq;
|
import com.muyu.product.domain.req.AttributeInfoSaveReq;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,6 +13,7 @@ import org.apache.ibatis.annotations.Param;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface AsAttributeGroupMapper extends BaseMapper<AsAttributeGroup> {
|
public interface AsAttributeGroupMapper extends BaseMapper<AsAttributeGroup> {
|
||||||
|
|
||||||
void shanchu(Long id);
|
void shanchu(Long id);
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.AsBrandProject;
|
import com.muyu.product.domain.AsBrandProject;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品牌商品中间Mapper接口
|
* 品牌商品中间Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.AsBrandProject;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface AsBrandProjectMapper extends BaseMapper<AsBrandProject> {
|
public interface AsBrandProjectMapper extends BaseMapper<AsBrandProject> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.AsCategoryAttributeGroup;
|
import com.muyu.product.domain.AsCategoryAttributeGroup;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品类属性组中间Mapper接口
|
* 品类属性组中间Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.AsCategoryAttributeGroup;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface AsCategoryAttributeGroupMapper extends BaseMapper<AsCategoryAttributeGroup> {
|
public interface AsCategoryAttributeGroupMapper extends BaseMapper<AsCategoryAttributeGroup> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.AsCategoryAttribute;
|
import com.muyu.product.domain.AsCategoryAttribute;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品类属性中间Mapper接口
|
* 品类属性中间Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.AsCategoryAttribute;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface AsCategoryAttributeMapper extends BaseMapper<AsCategoryAttribute> {
|
public interface AsCategoryAttributeMapper extends BaseMapper<AsCategoryAttribute> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.AsCategoryBrand;
|
import com.muyu.product.domain.AsCategoryBrand;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品类品牌中间Mapper接口
|
* 品类品牌中间Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.AsCategoryBrand;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface AsCategoryBrandMapper extends BaseMapper<AsCategoryBrand> {
|
public interface AsCategoryBrandMapper extends BaseMapper<AsCategoryBrand> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.AsProductAttributeInfo;
|
import com.muyu.product.domain.AsProductAttributeInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品属性Mapper接口
|
* 商品属性Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.AsProductAttributeInfo;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface AsProductAttributeInfoMapper extends BaseMapper<AsProductAttributeInfo> {
|
public interface AsProductAttributeInfoMapper extends BaseMapper<AsProductAttributeInfo> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.AttributeGroup;
|
import com.muyu.product.domain.AttributeGroup;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 属性组Mapper接口
|
* 属性组Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.AttributeGroup;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface AttributeGroupMapper extends BaseMapper<AttributeGroup> {
|
public interface AttributeGroupMapper extends BaseMapper<AttributeGroup> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.AttributeInfo;
|
import com.muyu.product.domain.AttributeInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品属性Mapper接口
|
* 商品属性Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.AttributeInfo;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface AttributeInfoMapper extends BaseMapper<AttributeInfo> {
|
public interface AttributeInfoMapper extends BaseMapper<AttributeInfo> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.BrandInfo;
|
import com.muyu.product.domain.BrandInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品牌信息Mapper接口
|
* 品牌信息Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.BrandInfo;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface BrandInfoMapper extends BaseMapper<BrandInfo> {
|
public interface BrandInfoMapper extends BaseMapper<BrandInfo> {
|
||||||
|
|
||||||
String getName(Long brandId);
|
String getName(Long brandId);
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.CategoryInfo;
|
import com.muyu.product.domain.CategoryInfo;
|
||||||
import com.muyu.product.domain.resp.CategoryInfoResp;
|
import com.muyu.product.domain.resp.CategoryInfoResp;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品类信息Mapper接口
|
* 品类信息Mapper接口
|
||||||
|
@ -11,6 +12,7 @@ import com.muyu.product.domain.resp.CategoryInfoResp;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface CategoryInfoMapper extends BaseMapper<CategoryInfo> {
|
public interface CategoryInfoMapper extends BaseMapper<CategoryInfo> {
|
||||||
|
|
||||||
int findById(String ids);
|
int findById(String ids);
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.CommentInfo;
|
import com.muyu.product.domain.CommentInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品评论Mapper接口
|
* 商品评论Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.CommentInfo;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface CommentInfoMapper extends BaseMapper<CommentInfo> {
|
public interface CommentInfoMapper extends BaseMapper<CommentInfo> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.CommentLikeInfo;
|
import com.muyu.product.domain.CommentLikeInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评论点赞Mapper接口
|
* 评论点赞Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.CommentLikeInfo;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface CommentLikeInfoMapper extends BaseMapper<CommentLikeInfo> {
|
public interface CommentLikeInfoMapper extends BaseMapper<CommentLikeInfo> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.ProjectInfo;
|
import com.muyu.product.domain.ProjectInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品信息Mapper接口
|
* 商品信息Mapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.ProjectInfo;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface ProjectInfoMapper extends BaseMapper<ProjectInfo> {
|
public interface ProjectInfoMapper extends BaseMapper<ProjectInfo> {
|
||||||
|
|
||||||
ProjectInfo getProjectName(String name);
|
ProjectInfo getProjectName(String name);
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.ProjectSkuInfo;
|
import com.muyu.product.domain.ProjectSkuInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品SKUMapper接口
|
* 商品SKUMapper接口
|
||||||
|
@ -10,6 +11,7 @@ import com.muyu.product.domain.ProjectSkuInfo;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface ProjectSkuInfoMapper extends BaseMapper<ProjectSkuInfo> {
|
public interface ProjectSkuInfoMapper extends BaseMapper<ProjectSkuInfo> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.product.domain.RuleAttrInfo;
|
import com.muyu.product.domain.RuleAttrInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface RuleAttrInfoMapper extends BaseMapper<RuleAttrInfo> {
|
public interface RuleAttrInfoMapper extends BaseMapper<RuleAttrInfo> {
|
||||||
|
|
||||||
void shanchu(Long id);
|
void shanchu(Long id);
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.muyu.product.domain.RuleInfo;
|
||||||
import com.muyu.product.domain.req.RuleAttrInfoReq;
|
import com.muyu.product.domain.req.RuleAttrInfoReq;
|
||||||
import com.muyu.product.domain.req.RuleInfoEditReq;
|
import com.muyu.product.domain.req.RuleInfoEditReq;
|
||||||
import com.muyu.product.domain.resp.RuleInfoResp;
|
import com.muyu.product.domain.resp.RuleInfoResp;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,6 +15,7 @@ import org.apache.ibatis.annotations.Param;
|
||||||
* @author DongZeLiang
|
* @author DongZeLiang
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface RuleInfoMapper extends BaseMapper<RuleInfo> {
|
public interface RuleInfoMapper extends BaseMapper<RuleInfo> {
|
||||||
|
|
||||||
RuleInfoResp getRuleById(Long id);
|
RuleInfoResp getRuleById(Long id);
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package com.muyu.product.mapper;
|
package com.muyu.product.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
public interface UpdAsCategoryAttributeMapper {
|
public interface UpdAsCategoryAttributeMapper {
|
||||||
void delAsCategoryAttribute(Long id);
|
void delAsCategoryAttribute(Long id);
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ import com.muyu.product.service.*;
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.muyu.product.mapper.ProjectInfoMapper;
|
import com.muyu.product.mapper.ProjectInfoMapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
@ -33,6 +34,7 @@ import org.springframework.util.CollectionUtils;
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Component
|
||||||
@Service
|
@Service
|
||||||
public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, ProjectInfo> implements ProjectInfoService {
|
public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, ProjectInfo> implements ProjectInfoService {
|
||||||
|
|
||||||
|
|
|
@ -28,3 +28,5 @@ spring:
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
com.muyu.product.mapper: DEBUG
|
com.muyu.product.mapper: DEBUG
|
||||||
|
mybatis:
|
||||||
|
mapperLocations: classpath:mapper/*.xml
|
||||||
|
|
Loading…
Reference in New Issue