根据excel创建标品图片格式优化
This commit is contained in:
@@ -1957,6 +1957,11 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader) (hint stri
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
suffix := skuName.Img[strings.LastIndex(skuName.Img, "."):]
|
||||||
|
if suffix != ".jpg" && suffix != ".png" && suffix != ".jpeg" && suffix != ".gif" {
|
||||||
|
createUpcSkuByExcelErrList = append(createUpcSkuByExcelErrList, buildCreateUpcSkuByExcelErr(v, fmt.Sprintf("暂不支持的图片格式:[%v]", skuName.Img)))
|
||||||
|
continue
|
||||||
|
}
|
||||||
skuName.Status = model.SkuStatusNormal
|
skuName.Status = model.SkuStatusNormal
|
||||||
skuName.IsGlobal = model.YES
|
skuName.IsGlobal = model.YES
|
||||||
skuName.CategoryID = model.NoCatCatgoryID
|
skuName.CategoryID = model.NoCatCatgoryID
|
||||||
|
|||||||
@@ -499,14 +499,13 @@ type PriceReferSnapshot struct {
|
|||||||
|
|
||||||
func (*PriceReferSnapshot) TableUnique() [][]string {
|
func (*PriceReferSnapshot) TableUnique() [][]string {
|
||||||
return [][]string{
|
return [][]string{
|
||||||
[]string{"CityCode", "SkuID", "SnapshotAt"},
|
|
||||||
[]string{"CityCode", "NameID", "SkuID", "SnapshotAt"},
|
[]string{"CityCode", "NameID", "SkuID", "SnapshotAt"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*PriceReferSnapshot) TableIndex() [][]string {
|
func (*PriceReferSnapshot) TableIndex() [][]string {
|
||||||
return [][]string{
|
return [][]string{
|
||||||
[]string{"SnapshotAt"},
|
[]string{"SkuID"},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user