aa
This commit is contained in:
@@ -4226,14 +4226,16 @@ func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword string, vendo
|
|||||||
db.Db = orm.NewOrmUsingDB("c4beta")
|
db.Db = orm.NewOrmUsingDB("c4beta")
|
||||||
sqlJD := `
|
sqlJD := `
|
||||||
SELECT name, 0 vendor_id, wmpoiid vendor_store_id, orgcode org_code, 1 vendor_status, address, phone tel1, pj shop_score, month_sales_tip recent_order_num,
|
SELECT name, 0 vendor_id, wmpoiid vendor_store_id, orgcode org_code, 1 vendor_status, address, phone tel1, pj shop_score, month_sales_tip recent_order_num,
|
||||||
bak_info city_name
|
bak_info city_name, goods_number sku_count
|
||||||
FROM jingdong_showd
|
FROM jingdong_showd
|
||||||
`
|
`
|
||||||
sqlEbai := `
|
sqlEbai := `
|
||||||
|
|
||||||
`
|
`
|
||||||
sqlMT := `
|
sqlMT := `
|
||||||
|
SELECT name, 1 vendor_id, wmpoiid vendor_store_id, orgcode org_code, 1 vendor_status, address, phone tel1, pj shop_score, REPLACE(REPLACE(month_sales_tip,'月售',''),'+','') recent_order_num,
|
||||||
|
bak_info city_name, goods_number sku_count
|
||||||
|
FROM meituan_showd
|
||||||
`
|
`
|
||||||
sql := `
|
sql := `
|
||||||
SELECT SQL_CALC_FOUND_ROWS
|
SELECT SQL_CALC_FOUND_ROWS
|
||||||
@@ -4241,10 +4243,9 @@ func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword string, vendo
|
|||||||
FROM (
|
FROM (
|
||||||
`
|
`
|
||||||
if vendorID == -1 {
|
if vendorID == -1 {
|
||||||
sql += sqlJD
|
sql += sqlJD + ` UNION`
|
||||||
//+ ` UNION`
|
sql += sqlMT
|
||||||
//sql += sqlEbai + ` UNION`
|
//sql += sqlEbai + ` UNION`
|
||||||
//sql += sqlMT
|
|
||||||
} else {
|
} else {
|
||||||
switch vendorID {
|
switch vendorID {
|
||||||
case model.VendorIDJD:
|
case model.VendorIDJD:
|
||||||
@@ -4285,10 +4286,10 @@ func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword string, vendo
|
|||||||
sql += " AND t1.recent_order_num >= ?"
|
sql += " AND t1.recent_order_num >= ?"
|
||||||
sqlParams = append(sqlParams, minRecentOrderNum)
|
sqlParams = append(sqlParams, minRecentOrderNum)
|
||||||
}
|
}
|
||||||
//if minSkuCount > 0 {
|
if minSkuCount > 0 {
|
||||||
// sql += " AND t1.sku_count >= ?"
|
sql += " AND t1.sku_count >= ?"
|
||||||
// sqlParams = append(sqlParams, minSkuCount)
|
sqlParams = append(sqlParams, minSkuCount)
|
||||||
//}
|
}
|
||||||
if keyword != "" {
|
if keyword != "" {
|
||||||
keywordLike := "%" + keyword + "%"
|
keywordLike := "%" + keyword + "%"
|
||||||
sql += " AND (t1.name LIKE ? OR t1.tel1 LIKE ? OR t1.org_code LIKE ? OR t1.address LIKE ? OR t2.name LIKE ? "
|
sql += " AND (t1.name LIKE ? OR t1.tel1 LIKE ? OR t1.org_code LIKE ? OR t1.address LIKE ? OR t2.name LIKE ? "
|
||||||
|
|||||||
Reference in New Issue
Block a user