This commit is contained in:
suyl
2021-05-20 09:24:28 +08:00
parent 3ee892c2d0
commit 1cad95ef99
2 changed files with 18 additions and 1 deletions

View File

@@ -4345,7 +4345,23 @@ func RefreshPageStore() {
}
}
//商品表合并
sql3 := ` TRUNCATE page_sku`
dao.ExecuteSQL(db, sql3)
sql4 := `
INSERT INTO page_sku (created_at,updated_at,last_operator,vendor_id,vendor_store_id,vendor_sku_id,vendor_sku_name,month_saled,act_price,sale_price,unit)
SELECT NOW(),NOW(),'jxadmin',t1.* FROM (
(
SELECT 0, a.wmpoiid, a.Base, a.name, a.month_saled, a.min_price*100, a.basic_price*100, ''
FROM jingdong_foodlist a
)
UNION ALL
(
SELECT 1, a.wmpoiid, '', a.name, a.month_saled, 0, a.min_price*100, a.unit
FROM meituan_foodlist a
)
)t1
`
dao.ExecuteSQL(db, sql4)
}
func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword string, vendorStoreID string, vendorID, cityCode, districtCode int, tel string,

View File

@@ -362,6 +362,7 @@ type PageSku struct {
MonthSaled int `json:"monthSaled"`
ActPrice int `json:"actPrice"`
SalePrice int `json:"salePrice"`
Unit string `json:"unit"`
}
func (*PageSku) TableUnique() [][]string {