diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index 85b45cb25..3dd8e9550 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -337,7 +337,9 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, params map[string]inter t1.price, t1.img, t1.elm_img_hash_code, - t1.status + t1.status, + t1.is_spu, + t1.img_hash_code ` sqlData := ` SELECT @@ -357,6 +359,8 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, params map[string]inter t1.img, t1.elm_img_hash_code, t1.status, + t1.is_spu, + t1.img_hash_code, CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"id":', t2.id, ',"comment":"', t2.comment, '","status":', t2.status, ',"createdAt":"', CONCAT(REPLACE(t2.created_at," ","T"),"+08:00"), '","updatedAt":"', CONCAT(REPLACE(t2.updated_at," ","T"),"+08:00"), '","lastOperator":"', t2.last_operator, '","specQuality":', t2.spec_quality, ',"specUnit":"', t2.spec_unit, '","weight":', t2.weight, ',"jdID":', t2.jd_id, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, "}")), "]") skus_str, CONCAT("[", GROUP_CONCAT(DISTINCT t3.place_code), "]") places_str ` + sql + ` diff --git a/business/model/sku.go b/business/model/sku.go index 8524a229d..9d3b2a706 100644 --- a/business/model/sku.go +++ b/business/model/sku.go @@ -162,6 +162,7 @@ type SkuName struct { SpecUnit string `orm:"size(8)" json:"-"` // 为份必然为克,这个主要作用只是用于确保SkuName的唯一性 Price int `json:"price"` // 单位为分,标准价,不为份的就为实际标准价,为份的为每市斤价,实际还要乘质量。todo 为份的确定必须有质量 Img string `orm:"size(255)" json:"img"` + ImgHashCode string `orm:"size(255)" json:"img_hash_code"` ElmImgHashCode string `orm:"size(255)" json:"-"` // 长度255的原因是从京东初始化数据时临时需要 Status int `orm:"default(1)" json:"status"` // skuname状态,取值同sku.Status