优化营销商品新增修改逻辑

This commit is contained in:
xuwenbo
2020-09-04 10:43:28 +08:00
parent 5f9fc0b008
commit 72463407b4
7 changed files with 58 additions and 5 deletions

View File

@ -176,6 +176,10 @@ public class YxStoreCombination extends BaseDomain {
@ApiModelProperty(value = "运费模板ID")
private Long tempId;
/** 是否单独分佣 */
@JsonProperty("is_sub")
private Integer isSub;
/** 属性项目 */
@TableField(exist = false)
@ApiModelProperty(value = "属性项目")

View File

@ -82,12 +82,20 @@ public class YxStoreSeckill extends BaseDomain {
/** 库存 */
@NotNull(message = "请输入库存")
@Min(message = "库存不能小于0",value = 1)
@ApiModelProperty(value = "秒杀库存")
private Integer stock;
/** 秒杀价 */
@ApiModelProperty(value = "秒杀价")
private BigDecimal price;
/** 原价 */
@ApiModelProperty(value = "原价")
private BigDecimal otPrice;
/** 成本 */
@ApiModelProperty(value = "成本")
private BigDecimal cost;
/** 销量 */
@ApiModelProperty(value = "秒杀销量")
private Integer sales;
@ -103,6 +111,8 @@ public class YxStoreSeckill extends BaseDomain {
private BigDecimal postage;
/** 内容 */
@NotBlank(message = "请填写详情")
@ApiModelProperty(value = "详细内容")
@ -166,6 +176,10 @@ public class YxStoreSeckill extends BaseDomain {
@ApiModelProperty(value = "运费模板ID")
private Long tempId;
/** 是否单独分佣 */
@JsonProperty("is_sub")
private Integer isSub;
/** 属性项目 */
@TableField(exist = false)
@ApiModelProperty(value = "属性项目")

View File

@ -125,6 +125,10 @@ public class YxStoreCombinationDto implements Serializable {
@JsonProperty("temp_id")
private Integer tempId;
/** 是否单独分佣 */
@JsonProperty("is_sub")
private Integer isSub;
private ProductFormatDto attr;
//属性项目
private List<FromatDetailDto> items;

View File

@ -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.ProductFormatDto;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@ -54,15 +55,28 @@ public class YxStoreSeckillDto implements Serializable {
// 返多少积分
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 stock;
// 销量
private Integer sales;
// 单位名
private String unitName;
@ -108,6 +122,10 @@ public class YxStoreSeckillDto implements Serializable {
@JsonProperty("spec_type")
private Integer specType;
/** 是否单独分佣 */
@JsonProperty("is_sub")
private Integer isSub;
private ProductFormatDto attr;
//属性项目
private List<FromatDetailDto> items;

View File

@ -273,6 +273,9 @@ public class YxStoreSeckillServiceImpl extends BaseServiceImpl<YxStoreSeckillMap
throw new YshopException("请上传轮播图");
}
yxStoreSeckill.setStock(resultDTO.getStock());
yxStoreSeckill.setPostage(BigDecimal.valueOf(resultDTO.getMinPrice()));
yxStoreSeckill.setCost(BigDecimal.valueOf(resultDTO.getMinCost()));
yxStoreSeckill.setStock(resultDTO.getStock());
yxStoreSeckill.setImages(String.join(",", resources.getImages()));
this.saveOrUpdate(yxStoreSeckill);

View File

@ -1,6 +1,7 @@
package co.yixiang.modules.activity.vo;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -91,5 +92,9 @@ public class YxStoreCombinationQueryVo implements Serializable {
@ApiModelProperty(value = "单位名")
private String unitName;
/** 是否单独分佣 */
@JsonProperty("is_sub")
private Integer isSub;
}

View File

@ -1,6 +1,7 @@
package co.yixiang.modules.activity.vo;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -95,6 +96,10 @@ public class YxStoreSeckillQueryVo implements Serializable{
@ApiModelProperty(value = "百分比")
private Integer percent;
/** 是否单独分佣 */
@JsonProperty("is_sub")
private Integer isSub;
}