From 179c3e332f4476e2db1286a7aaaf7e67b7cabf79 Mon Sep 17 00:00:00 2001 From: hshansha Date: Thu, 29 May 2025 10:12:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=98=E5=B7=A5=E8=A1=A5=E8=B4=B4bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/core/mapper/BaseMapperPlus.java | 2 +- .../java/com/ruoyi/framework/config/MybatisPlusConfig.java | 4 ++-- .../com/ruoyi/pay/controller/PayButieEmplyeeController.java | 1 + .../ruoyi/pay/service/impl/PayButieEmplyeeServiceImpl.java | 4 +++- .../java/com/ruoyi/pay/service/impl/PayButieServiceImpl.java | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java index 188d300..db1b6d5 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/mapper/BaseMapperPlus.java @@ -195,7 +195,7 @@ public interface BaseMapperPlus extends BaseMapper { * * @return 成功标志 */ - @Select("DELETE FROM pay_butie_emplyee WHERE date = #{thisMonth} and tenant_id=#{tenantId}") + @Select("DELETE FROM pay_butie_emplyee WHERE date = #{month} and tenant_id=#{tenantId}") void deleteSgrButieEmplyeeByDate(@Param("month") String month,@Param("tenantId") Long tenantId); @Select("SELECT COUNT(*) FROM pay_butie_emplyee WHERE date = #{month}") diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java index 4e214d9..a9c5b98 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MybatisPlusConfig.java @@ -55,7 +55,7 @@ public class MybatisPlusConfig { @Override public boolean ignoreTable(String tableName) { // 判断是否登录,如果登录则过滤 - if (StpUtil.getLoginIdDefaultNull() != null) { + /* if (StpUtil.getLoginIdDefaultNull() != null) { // 判断是否平台超级管理员,如果是平台超级管理员则拥有所有数据权限 if (!LoginHelper.isAdmin(LoginHelper.getLoginUser().getUserId())) { // 需要拼接租户条件的表 @@ -88,7 +88,7 @@ public class MybatisPlusConfig { // 判断tableName是否在tenantTables中, 在的话返回false, 不在的话返回true return !list.contains(tableName.toLowerCase(Locale.ROOT)); } - } + }*/ return true; } diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/controller/PayButieEmplyeeController.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/controller/PayButieEmplyeeController.java index b4aac56..6d11058 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/controller/PayButieEmplyeeController.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/controller/PayButieEmplyeeController.java @@ -159,6 +159,7 @@ public class PayButieEmplyeeController extends BaseController { } PayEmployeeInfoBo employeeInfo = new PayEmployeeInfoBo(); employeeInfo.setId(bo.getEmployeeId()); + employeeInfo.setTenantId(bo.getTenantId()); TableDataInfo payEmployeeTableDataInfo = employeeInfoService.queryPageList(employeeInfo, pageQuery); List butieSummaryVos = this.buildEmployeeInfo(payEmployeeTableDataInfo.getRows(), date); return TableDataInfo.build(butieSummaryVos); diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayButieEmplyeeServiceImpl.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayButieEmplyeeServiceImpl.java index b791e86..98db1ab 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayButieEmplyeeServiceImpl.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayButieEmplyeeServiceImpl.java @@ -151,7 +151,9 @@ public class PayButieEmplyeeServiceImpl implements IPayButieEmplyeeService { baseMapper.deleteSgrButieEmplyeeByDate(month,tenantId); PayButieBo bo = new PayButieBo(); bo.setTenantId(tenantId); - List butieList = butieService.queryList(null); // 获取补贴列表 + PayButieBo pbt = new PayButieBo(); + pbt.setTenantId(tenantId); + List butieList = butieService.queryList(pbt); // 获取补贴列表 PayEmployeeInfoBo yg = new PayEmployeeInfoBo(); yg.setTenantId(tenantId); List employeeInfoList = employeeInfoService.queryList(yg);// 获取员工列表 diff --git a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayButieServiceImpl.java b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayButieServiceImpl.java index b77a067..86fa3e3 100644 --- a/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayButieServiceImpl.java +++ b/ruoyi-pay/src/main/java/com/ruoyi/pay/service/impl/PayButieServiceImpl.java @@ -59,7 +59,7 @@ public class PayButieServiceImpl implements IPayButieService { } private LambdaQueryWrapper buildQueryWrapper(PayButieBo bo) { - Map params = bo.getParams(); + // Map params = bo.getParams(); LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); lqw.eq(bo.getTenantId() != null, PayButie::getTenantId, bo.getTenantId()); lqw.like(StringUtils.isNotBlank(bo.getName()), PayButie::getName, bo.getName());