Merge branch 'mark' of e.coding.net:rosydev/jx-callback into mark
This commit is contained in:
@@ -83,3 +83,20 @@ type OrderFinancialSkuExt struct {
|
||||
OrderSkuFinancial
|
||||
Image string `json:"image"`
|
||||
}
|
||||
|
||||
type ProductInfo struct {
|
||||
OriginalName string `json:"originalName"`
|
||||
OriginalSpec string `json:"originalSpec"`
|
||||
Name string `json:"name"`
|
||||
Img string `json:"img"`
|
||||
ImgList []string `json:"imgList"`
|
||||
SpecQuality int `json:"specQuality"`
|
||||
SpecUnit string `json:"specUnit"`
|
||||
Unit string `json:"unit"`
|
||||
Weight float32 `json:"weight"`
|
||||
Price int `json:"price"`
|
||||
Categories []string `json:"categories"`
|
||||
ManName string `json:"manName"` // 生产商
|
||||
BrandName string `json:"brandName"`
|
||||
UpcCode string `json:"upcCode"`
|
||||
}
|
||||
|
||||
@@ -984,7 +984,7 @@ func GetTopSkusByStoreIDs(db *DaoDB, storeIDs []int) (storeSkuNameExt []*StoreSk
|
||||
return storeSkuNameExt, err
|
||||
}
|
||||
|
||||
func GetTopCategorysByStoreIDs(db *DaoDB, storeIDs []int) (skuCategory []*model.SkuCategory, err error) {
|
||||
func GetTopCategorysByStoreIDs(db *DaoDB, storeIDs []int, limit int) (skuCategory []*model.SkuCategory, err error) {
|
||||
sql := `
|
||||
SELECT DISTINCT t5.* FROM(
|
||||
SELECT d.*
|
||||
@@ -1023,7 +1023,7 @@ func GetTopCategorysByStoreIDs(db *DaoDB, storeIDs []int) (skuCategory []*model.
|
||||
Order by t4.count DESC)t5
|
||||
LIMIT ?
|
||||
`
|
||||
sqlParams = append(sqlParams, time.Now().AddDate(0, -1, 0), 100, 2, utils.DefaultTimeValue, 1, 10)
|
||||
sqlParams = append(sqlParams, time.Now().AddDate(0, -1, 0), 100, 2, utils.DefaultTimeValue, 1, limit)
|
||||
err = GetRows(db, &skuCategory, sql, sqlParams...)
|
||||
return skuCategory, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user