- add SpecQuality and SpecUnit for skuname

- order desc for many query apis
This commit is contained in:
gazebo
2018-10-28 12:27:12 +08:00
parent f7df897bdb
commit 298bb2f617
5 changed files with 63 additions and 16 deletions

View File

@@ -46,8 +46,8 @@ type StoreSkuBindSkuInfo struct {
// UpdateStoreSku用API调用时
type StoreSkuBindInfo struct {
NameID int `json:"nameID"`
UnitPrice int `json:"unitPrice"`
IsFocus int `json:"isFocus"` // -1不关注0忽略1关注
UnitPrice int `json:"unitPrice"` // 对于是份的SKU就是单价每斤价格其它则为总价
IsFocus int `json:"isFocus"` // -1不关注0忽略1关注
SubStoreID int `json:"subStoreID"`
Skus []*StoreSkuBindSkuInfo `json:"skus"`
}
@@ -193,7 +193,7 @@ func GetStoreSkus(ctx *jxcontext.Context, storeID int, isFocus bool, keyword str
',"price":', IF(t4.price IS NULL, 0, t4.price), ',"unitPrice":', IF(t4.unit_price IS NULL, t1.price, t4.unit_price),
',"storeSkuStatus":', IF(t4.status IS NULL, 0, t4.status), "}")), "]") skus_str
` + sql + `
ORDER BY t1.id
ORDER BY t1.id DESC
LIMIT ? OFFSET ?`
pageSize = jxutils.FormalizePageSize(pageSize)
sqlParams = append(sqlParams, pageSize, offset)