|
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.*; |
|
|
import com.fasterxml.jackson.annotation.JsonFormat; |
|
|
import com.fasterxml.jackson.annotation.JsonFormat; |
|
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
|
import com.fasterxml.jackson.annotation.JsonProperty; |
|
|
import com.fasterxml.jackson.annotation.JsonProperty; |
|
|
|
|
|
import com.qs.serve.common.util.StringUtils; |
|
|
import com.qs.serve.modules.tbs.common.TbsGoodsType; |
|
|
import com.qs.serve.modules.tbs.common.TbsGoodsType; |
|
|
import lombok.Data; |
|
|
import lombok.Data; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
@ -112,7 +113,36 @@ public class TbsActivityGoods implements Serializable { |
|
|
@TableField(exist = false) |
|
|
@TableField(exist = false) |
|
|
private String skuName; |
|
|
private String skuName; |
|
|
|
|
|
|
|
|
|
|
|
@TableField(exist = false) |
|
|
|
|
|
private String brandName; |
|
|
|
|
|
|
|
|
|
|
|
@TableField(exist = false) |
|
|
|
|
|
private String categoryName; |
|
|
|
|
|
|
|
|
|
|
|
@TableField(exist = false) |
|
|
|
|
|
private String seriseName; |
|
|
|
|
|
|
|
|
|
|
|
public void initCategoryNameByPathsName(){ |
|
|
|
|
|
if(!StringUtils.hasText(this.getTargetLevelPathNames())){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
String[] names = this.getTargetLevelPathNames().split("_"); |
|
|
|
|
|
if(names.length==1){ |
|
|
|
|
|
this.brandName = names[0]; |
|
|
|
|
|
}else if(names.length==2){ |
|
|
|
|
|
this.brandName = names[0]; |
|
|
|
|
|
this.categoryName = names[1]; |
|
|
|
|
|
}else if(names.length >=3){ |
|
|
|
|
|
this.brandName = names[0]; |
|
|
|
|
|
this.categoryName = names[1]; |
|
|
|
|
|
this.seriseName = names[2]; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public void initSpuSkuName(){ |
|
|
public void initSpuSkuName(){ |
|
|
|
|
|
if(!StringUtils.hasText(this.getTargetLevelPathNames())){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
if(this.getTargetType().equals(TbsGoodsType.sku.name())){ |
|
|
if(this.getTargetType().equals(TbsGoodsType.sku.name())){ |
|
|
try { |
|
|
try { |
|
|
String[] names = this.getTargetLevelPathNames().split("_"); |
|
|
String[] names = this.getTargetLevelPathNames().split("_"); |
|
|