36 lines
1.0 KiB
Go
36 lines
1.0 KiB
Go
package request
|
||
|
||
// GoodsImportRow Excel 表格中每一行的数据结构(对应货号批量修改工具导出格式)
|
||
type GoodsImportRow struct {
|
||
GoodsNo string // 商品编号
|
||
GoodsName string // 商品名称
|
||
Huohao string // 货号(原)
|
||
HuohaoNew string // 货号[新](新货号,用作库位编码)
|
||
ISBN string // ISBN
|
||
Author string // 作者
|
||
Publisher string // 出版社
|
||
PriceListing string // 商品定价
|
||
PriceSale string // 商品售价
|
||
Category string // 商品分类
|
||
ShopCategory string // 本店分类
|
||
Appearance string // 品相
|
||
Inventory string // 库存
|
||
ProductID string // 商品ID
|
||
ShopID string // 店铺ID
|
||
LiveImage string // 商品图片(工具导出时已处理为URL)
|
||
}
|
||
|
||
// GoodsImportResult 导入结果
|
||
type GoodsImportResult struct {
|
||
SuccessCount int
|
||
FailCount int
|
||
FailDetails []string
|
||
Message string
|
||
}
|
||
|
||
// AddFail 添加失败
|
||
func (r *GoodsImportResult) AddFail(detail string) {
|
||
r.FailCount++
|
||
r.FailDetails = append(r.FailDetails, detail)
|
||
}
|