SELECT
ms.id,ms.name,ms.address,ms.mobile AS phone,ms.UUID,
(case when ce.score is null then 0 else ce.score end) as score,
-- ce.score,
mse.longitude,mse.latitude,
mse.ALIPAY_RECEIPT_CODE_PATH AS alipay,mse.WECHAT_RECEIPT_CODE_PATH AS wechat,mse.BANK_NAME,mse.BANK_ACCOUNT,s.seal_count as `count`,CONCAT(mse.`PAY_WAY`,'') as PAY_WAY
FROM
lv_marker_site ms
LEFT JOIN se_marker_site_expansion mse ON ms.id=mse.MARKER_SITE_ID
LEFT JOIN (SELECT ice.MARKER_SITE_ID, AVG(IF(ISNULL(ice.`SEAL_QUALITY`),0,ice.`SEAL_QUALITY`)+IF(ISNULL(ice.`SERVICE_QUALITY`),0,ice.`SERVICE_QUALITY`))/2 AS score FROM se_customer_evaluation ice GROUP BY ice.MARKER_SITE_ID) ce
ON ms.id=ce.MARKER_SITE_ID
LEFT JOIN (SELECT COUNT(ls.`id`) AS seal_count,ls.MARKER_SITE_ID FROM lv_seal ls WHERE ls.`status` in ('1','4','5','6','7') AND (ls.FETCH_DATE >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)) GROUP BY ls.MARKER_SITE_ID) s
ON s.MARKER_SITE_ID=ms.id
WHERE ms.`id`=#{id}
-- 字符串处理
SELECT LENGTH(REPLACE(CONCAT(uuid(),uuid()),'-',''));