From 56bee7f862973bf0fb403010c7b0c092e454dc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Tue, 8 Oct 2024 16:23:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7=E8=AE=A2=E5=8D=95=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/dashboard/mapper/DashboardMapper.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/smart-switch-service/src/main/java/com/ruoyi/dashboard/mapper/DashboardMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/dashboard/mapper/DashboardMapper.xml index e528b706..be04fe37 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/dashboard/mapper/DashboardMapper.xml +++ b/smart-switch-service/src/main/java/com/ruoyi/dashboard/mapper/DashboardMapper.xml @@ -15,7 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select - stb.store_id, + if (stb.store_id is null, -1, stb.store_id) as store_id, if (stb.store_id is null, '未分配店铺', ss.name) as store_name, count(distinct stb.device_id) as device_count, sd.device_name as device_name, @@ -28,7 +28,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sm_device sd on sd.device_id = stb.device_id and stb.mch_id = #{mchId} - and stb.store_id = #{storeId} + + and stb.store_id is null + and stb.store_id = #{storeId} and stb.type = #{billType} and ss.name like concat('%', #{storeName}, '%')