- param isBySku added for GetStoreSkus

This commit is contained in:
gazebo
2019-03-08 09:22:36 +08:00
parent ce109a60b3
commit 9a071dcbbe
2 changed files with 8 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ type StoreOpRequestInfo struct {
// 商品不可售,直接排除
// 如果门店商品是可售状态,那么会忽略区域限制。否则有区域限制
func GetStoreSkus(ctx *jxcontext.Context, storeID int, isFocus bool, keyword string, params map[string]interface{}, offset, pageSize int) (skuNamesInfo *StoreSkuNamesInfo, err error) {
func GetStoreSkus(ctx *jxcontext.Context, storeID int, isFocus bool, keyword string, isBySku bool, params map[string]interface{}, offset, pageSize int) (skuNamesInfo *StoreSkuNamesInfo, err error) {
db := dao.GetDB()
sql := `
FROM sku_name t1
@@ -212,8 +212,11 @@ func GetStoreSkus(ctx *jxcontext.Context, storeID int, isFocus bool, keyword str
t1.unit,
t1.price,
t1.img,
t1.elm_img_hash_code
`
t1.elm_img_hash_code`
if isBySku {
sql += `,
t2.id`
}
sqlData := `
SELECT
SQL_CALC_FOUND_ROWS