From 4102e05ac7233722d8be8e45a62cdaad92fcb7dd Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 18 Sep 2018 09:43:29 +0800 Subject: [PATCH] - avoid null when isFocused is false. --- business/jxstore/cms/store_sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 76c710e9c..755e95553 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -147,7 +147,7 @@ func GetStoreSkus(storeID int, isFocused bool, keyword string, params map[string t1.price, t1.img, t1.elm_img_hash_code, - CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"id":', t2.id, ',"status":', t2.status, ',"createdAt":"', CONCAT(REPLACE(t2.created_at," ","T"),"+08:00"), '","updatedAt":"', CONCAT(REPLACE(t2.updated_at," ","T"),"+08:00"), '","lastOperator":"', t2.last_operator, '","specQuality":', t2.spec_quality, ',"specUnit":"', t2.spec_unit, '","weight":', t2.weight, ',"jdID":', t2.jd_id, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, ',"subStoreID":', t4.sub_store_id, ',"price":', t4.price, ',"storeSkuStatus":', t4.status, "}")), "]") skus_str + CONCAT("[", GROUP_CONCAT(DISTINCT CONCAT('{"id":', t2.id, ',"status":', t2.status, ',"createdAt":"', CONCAT(REPLACE(t2.created_at," ","T"),"+08:00"), '","updatedAt":"', CONCAT(REPLACE(t2.updated_at," ","T"),"+08:00"), '","lastOperator":"', t2.last_operator, '","specQuality":', t2.spec_quality, ',"specUnit":"', t2.spec_unit, '","weight":', t2.weight, ',"jdID":', t2.jd_id, ',"categoryID":', t2.category_id, ',"nameID":', t2.name_id, ',"subStoreID":', IF(t4.sub_store_id IS NULL, 0, t4.sub_store_id), ',"price":', IF(t4.price IS NULL, 0, t4.price), ',"storeSkuStatus":', IF(t4.status IS NULL, 0, t4.status), "}")), "]") skus_str ` + sql + ` ORDER BY t1.id LIMIT ? OFFSET ?`