推荐商品
This commit is contained in:
@@ -2121,14 +2121,14 @@ func ReCalculateJxPrice(ctx *jxcontext.Context, storeIDs []int) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
func GetTopSkusByStoreIDs(ctx *jxcontext.Context, storeIDs []int) (skuAndName []*model.SkuAndName, err error) {
|
||||
func GetTopSkusByStoreIDs(ctx *jxcontext.Context, storeIDs []int) (skuName []*model.SkuName, err error) {
|
||||
if len(storeIDs) == 0 {
|
||||
return skuAndName, err
|
||||
return skuName, err
|
||||
}
|
||||
db := dao.GetDB()
|
||||
skuAndName, err = dao.GetTopSkusByStoreIDs(db, storeIDs)
|
||||
skuName, err = dao.GetTopSkusByStoreIDs(db, storeIDs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return skuAndName, err
|
||||
return skuName, err
|
||||
}
|
||||
|
||||
@@ -663,7 +663,7 @@ func GetStoreSkusByNameIDs(db *DaoDB, storeIDs []int, nameID int) (skuList []*St
|
||||
return skuList, err
|
||||
}
|
||||
|
||||
func GetTopSkusByStoreIDs(db *DaoDB, storeIDs []int) (skuAndName []*model.SkuAndName, err error) {
|
||||
func GetTopSkusByStoreIDs(db *DaoDB, storeIDs []int) (skuName []*model.SkuName, err error) {
|
||||
sql := `
|
||||
SELECT t3.*
|
||||
FROM(
|
||||
@@ -689,8 +689,8 @@ func GetTopSkusByStoreIDs(db *DaoDB, storeIDs []int) (skuAndName []*model.SkuAnd
|
||||
LIMIT ?
|
||||
`
|
||||
sqlParams = append(sqlParams, 100, 30)
|
||||
err = GetRows(db, &skuAndName, sql, sqlParams...)
|
||||
return skuAndName, err
|
||||
err = GetRows(db, &skuName, sql, sqlParams...)
|
||||
return skuName, err
|
||||
}
|
||||
|
||||
func SetStoreSkuBindVendorPrice(storeSkuBind *model.StoreSkuBind, vendorID int, vendorPrice int) {
|
||||
|
||||
Reference in New Issue
Block a user