优化营销商品新增修改逻辑
This commit is contained in:
@ -176,6 +176,10 @@ public class YxStoreCombination extends BaseDomain {
|
|||||||
@ApiModelProperty(value = "运费模板ID")
|
@ApiModelProperty(value = "运费模板ID")
|
||||||
private Long tempId;
|
private Long tempId;
|
||||||
|
|
||||||
|
/** 是否单独分佣 */
|
||||||
|
@JsonProperty("is_sub")
|
||||||
|
private Integer isSub;
|
||||||
|
|
||||||
/** 属性项目 */
|
/** 属性项目 */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "属性项目")
|
@ApiModelProperty(value = "属性项目")
|
||||||
|
@ -82,12 +82,20 @@ public class YxStoreSeckill extends BaseDomain {
|
|||||||
|
|
||||||
|
|
||||||
/** 库存 */
|
/** 库存 */
|
||||||
@NotNull(message = "请输入库存")
|
|
||||||
@Min(message = "库存不能小于0",value = 1)
|
|
||||||
@ApiModelProperty(value = "秒杀库存")
|
@ApiModelProperty(value = "秒杀库存")
|
||||||
private Integer stock;
|
private Integer stock;
|
||||||
|
|
||||||
|
/** 秒杀价 */
|
||||||
|
@ApiModelProperty(value = "秒杀价")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/** 原价 */
|
||||||
|
@ApiModelProperty(value = "原价")
|
||||||
|
private BigDecimal otPrice;
|
||||||
|
|
||||||
|
/** 成本 */
|
||||||
|
@ApiModelProperty(value = "成本")
|
||||||
|
private BigDecimal cost;
|
||||||
/** 销量 */
|
/** 销量 */
|
||||||
@ApiModelProperty(value = "秒杀销量")
|
@ApiModelProperty(value = "秒杀销量")
|
||||||
private Integer sales;
|
private Integer sales;
|
||||||
@ -103,6 +111,8 @@ public class YxStoreSeckill extends BaseDomain {
|
|||||||
private BigDecimal postage;
|
private BigDecimal postage;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 内容 */
|
/** 内容 */
|
||||||
@NotBlank(message = "请填写详情")
|
@NotBlank(message = "请填写详情")
|
||||||
@ApiModelProperty(value = "详细内容")
|
@ApiModelProperty(value = "详细内容")
|
||||||
@ -166,6 +176,10 @@ public class YxStoreSeckill extends BaseDomain {
|
|||||||
@ApiModelProperty(value = "运费模板ID")
|
@ApiModelProperty(value = "运费模板ID")
|
||||||
private Long tempId;
|
private Long tempId;
|
||||||
|
|
||||||
|
/** 是否单独分佣 */
|
||||||
|
@JsonProperty("is_sub")
|
||||||
|
private Integer isSub;
|
||||||
|
|
||||||
/** 属性项目 */
|
/** 属性项目 */
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "属性项目")
|
@ApiModelProperty(value = "属性项目")
|
||||||
|
@ -125,6 +125,10 @@ public class YxStoreCombinationDto implements Serializable {
|
|||||||
@JsonProperty("temp_id")
|
@JsonProperty("temp_id")
|
||||||
private Integer tempId;
|
private Integer tempId;
|
||||||
|
|
||||||
|
/** 是否单独分佣 */
|
||||||
|
@JsonProperty("is_sub")
|
||||||
|
private Integer isSub;
|
||||||
|
|
||||||
private ProductFormatDto attr;
|
private ProductFormatDto attr;
|
||||||
//属性项目
|
//属性项目
|
||||||
private List<FromatDetailDto> items;
|
private List<FromatDetailDto> items;
|
||||||
|
@ -8,6 +8,7 @@ package co.yixiang.modules.activity.service.dto;
|
|||||||
import co.yixiang.modules.product.service.dto.FromatDetailDto;
|
import co.yixiang.modules.product.service.dto.FromatDetailDto;
|
||||||
import co.yixiang.modules.product.service.dto.ProductFormatDto;
|
import co.yixiang.modules.product.service.dto.ProductFormatDto;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@ -54,15 +55,28 @@ public class YxStoreSeckillDto implements Serializable {
|
|||||||
// 返多少积分
|
// 返多少积分
|
||||||
private BigDecimal giveIntegral;
|
private BigDecimal giveIntegral;
|
||||||
|
|
||||||
|
/** 秒杀价 */
|
||||||
|
@ApiModelProperty(value = "秒杀价")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/** 原价 */
|
||||||
|
@ApiModelProperty(value = "原价")
|
||||||
|
private BigDecimal otPrice;
|
||||||
|
|
||||||
|
/** 成本 */
|
||||||
|
@ApiModelProperty(value = "成本")
|
||||||
|
private BigDecimal cost;
|
||||||
|
|
||||||
|
/** 销量 */
|
||||||
|
@ApiModelProperty(value = "秒杀销量")
|
||||||
|
private Integer sales;
|
||||||
|
|
||||||
// 排序
|
// 排序
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
// 库存
|
// 库存
|
||||||
private Integer stock;
|
private Integer stock;
|
||||||
|
|
||||||
// 销量
|
|
||||||
private Integer sales;
|
|
||||||
|
|
||||||
// 单位名
|
// 单位名
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
@ -108,6 +122,10 @@ public class YxStoreSeckillDto implements Serializable {
|
|||||||
@JsonProperty("spec_type")
|
@JsonProperty("spec_type")
|
||||||
private Integer specType;
|
private Integer specType;
|
||||||
|
|
||||||
|
/** 是否单独分佣 */
|
||||||
|
@JsonProperty("is_sub")
|
||||||
|
private Integer isSub;
|
||||||
|
|
||||||
private ProductFormatDto attr;
|
private ProductFormatDto attr;
|
||||||
//属性项目
|
//属性项目
|
||||||
private List<FromatDetailDto> items;
|
private List<FromatDetailDto> items;
|
||||||
|
@ -273,6 +273,9 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
|
|||||||
throw new YshopException("请上传轮播图");
|
throw new YshopException("请上传轮播图");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
yxStoreSeckill.setStock(resultDTO.getStock());
|
||||||
|
yxStoreSeckill.setPostage(BigDecimal.valueOf(resultDTO.getMinPrice()));
|
||||||
|
yxStoreSeckill.setCost(BigDecimal.valueOf(resultDTO.getMinCost()));
|
||||||
yxStoreSeckill.setStock(resultDTO.getStock());
|
yxStoreSeckill.setStock(resultDTO.getStock());
|
||||||
yxStoreSeckill.setImages(String.join(",", resources.getImages()));
|
yxStoreSeckill.setImages(String.join(",", resources.getImages()));
|
||||||
this.saveOrUpdate(yxStoreSeckill);
|
this.saveOrUpdate(yxStoreSeckill);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package co.yixiang.modules.activity.vo;
|
package co.yixiang.modules.activity.vo;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -91,5 +92,9 @@ public class YxStoreCombinationQueryVo implements Serializable {
|
|||||||
@ApiModelProperty(value = "单位名")
|
@ApiModelProperty(value = "单位名")
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
|
/** 是否单独分佣 */
|
||||||
|
@JsonProperty("is_sub")
|
||||||
|
private Integer isSub;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package co.yixiang.modules.activity.vo;
|
package co.yixiang.modules.activity.vo;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -95,6 +96,10 @@ public class YxStoreSeckillQueryVo implements Serializable{
|
|||||||
@ApiModelProperty(value = "百分比")
|
@ApiModelProperty(value = "百分比")
|
||||||
private Integer percent;
|
private Integer percent;
|
||||||
|
|
||||||
|
/** 是否单独分佣 */
|
||||||
|
@JsonProperty("is_sub")
|
||||||
|
private Integer isSub;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user