diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index ef879e498..8666ac23e 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -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, diff --git a/business/model/sku.go b/business/model/sku.go index 73c156a1c..74763afe9 100644 --- a/business/model/sku.go +++ b/business/model/sku.go @@ -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 {