fix 修正 SysTenantServiceImpl#deleteWithValidByIds 超管租户可以被删除的问题, 加上 id 校验 ;
fix 修正 tenant/index.vue handleUpdate 租户套餐回显问题 ;
已修改2个文件
4 ■■■■ 文件已修改
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/system/tenant/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java
@@ -278,6 +278,9 @@
    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
        if (isValid) {
            // 做一些业务上的校验,判断是否需要校验
            if (ids.contains(TenantConstants.SUPER_ADMIN_ID)) {
                throw new ServiceException("超管租户不能删除");
            }
        }
        return baseMapper.deleteBatchIds(ids) > 0;
    }
ruoyi-ui/src/views/system/tenant/index.vue
@@ -360,6 +360,7 @@
    handleUpdate(row) {
      this.loading = true;
      this.reset();
      this.getTenantPackage();
      const id = row.id || this.ids
      getTenant(id).then(response => {
        this.loading = false;