From 683839c2129570411614b63f189183b7d9b946f6 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 6 Jun 2019 10:26:34 +0800 Subject: [PATCH] =?UTF-8?q?-=20GetStores=E4=B8=AD=E8=BF=94=E5=9B=9Estore?= =?UTF-8?q?=5Fmap=E7=9A=84isSync?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index ce50c4f44..ff7d883da 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -131,15 +131,16 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa city.name city_name, district.name district_name, - CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"vendorStoreID":"', m1.vendor_store_id, '", "vendorID":', m1.vendor_id, - ', "status":', m1.status, ', "pricePercentage":', m1.price_percentage, ', "vendorStoreName":"', + CONCAT('[', GROUP_CONCAT(DISTINCT CONCAT('{"vendorStoreID":"', m1.vendor_store_id, '", "vendorID":', m1.vendor_id, + ', "status":', m1.status, ', "pricePercentage":', m1.price_percentage, ', "vendorStoreName":"', CASE m1.vendor_id WHEN 0 THEN IF(jd.name IS NULL, '', jd.name) WHEN 3 THEN IF(eb.col_name IS NULL, '', eb.col_name) ELSE '' END, - '"}')), ']') store_map_str, - CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"vendorStoreID":"', m2.vendor_store_id, '", "vendorID":', m2.vendor_id, ', "status":', m2.status, "}")), "]") courier_map_str + '", "isSync":', m1.is_sync, '}')), ']') store_map_str, + CONCAT('[', GROUP_CONCAT(DISTINCT CONCAT('{"vendorStoreID":"', m2.vendor_store_id, '", "vendorID":', m2.vendor_id, + ', "status":', m2.status, '}')), ']') courier_map_str FROM store t1 LEFT JOIN place city ON t1.city_code = city.code AND city.level = 2 LEFT JOIN place district ON t1.district_code = district.code AND district.level = 3