diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml index 3b66250..c6edfce 100644 --- a/ruoyi-admin/src/main/resources/application-prod.yml +++ b/ruoyi-admin/src/main/resources/application-prod.yml @@ -44,7 +44,7 @@ mybatis-flex: # 指定为HikariDataSource type: com.zaxxer.hikari.HikariDataSource driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/jjry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true + url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true username: root123 password: Root@369---0000 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 05db883..381bbbf 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -26,7 +26,6 @@ import lombok.RequiredArgsConstructor; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; -import com.ruoyi.common.core.annotation.DataScope; import com.ruoyi.common.core.constant.UserConstants; import com.ruoyi.common.core.core.text.Convert; import com.ruoyi.common.core.exception.ServiceException; @@ -52,6 +51,8 @@ public class SysDeptServiceImpl extends BaseServiceImpl private SysDeptMapper deptMapper; @Resource private ISysRoleService sysRoleService; + @Resource + private ISysDataScopeService dataScopeService; @Override public QueryWrapper query() { @@ -93,7 +94,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl */ @Override public List selectDeptList(SysDeptBo deptBo) { - QueryWrapper queryWrapper = buildQueryWrapper(deptBo); + QueryWrapper queryWrapper = dataScopeService.addCondition(buildQueryWrapper(deptBo)); return this.listAs(queryWrapper, SysDeptVo.class); }