perf: 企业版许可限制机制

This commit is contained in:
fit2cloud-chenyw 2023-12-03 14:59:25 +08:00
parent c1b11ed31f
commit 6af4c59fe8
5 changed files with 13 additions and 3 deletions

View File

@ -83,6 +83,11 @@
<value-type>java.lang.Integer</value-type>
</cache>
<cache alias="user_echelon" uses-template="common-cache">
<key-type>java.lang.String</key-type>
<value-type>java.util.List</value-type>
</cache>
<cache alias="role_busi_pers_interactive" uses-template="common-cache">
<key-type>java.lang.String</key-type>
<value-type>java.util.List</value-type>

@ -1 +1 @@
Subproject commit 34d3f25ca633156eb59b3118137b90be2c8b36a6
Subproject commit 58b266c2c89a305bcc14d3ea7a1f54f42deb665c

View File

@ -9,6 +9,7 @@ import io.dataease.auth.DePermit;
import io.dataease.auth.vo.TokenVO;
import io.dataease.model.KeywordRequest;
import io.dataease.request.BaseGridRequest;
import io.swagger.v3.oas.annotations.Hidden;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -66,6 +67,7 @@ public interface UserApi {
@PostMapping("/byCurOrg")
List<UserItem> byCurOrg(@RequestBody KeywordRequest request);
@Hidden
@GetMapping("/userCount")
int userCount();
@ -100,5 +102,7 @@ public interface UserApi {
@PostMapping("/modifyPwd")
void modifyPwd(@RequestBody ModifyPwdRequest request);
@Hidden
@GetMapping("/firstEchelon/{limit}")
List<Long> firstEchelon(@PathVariable("limit") Long limit);
}

View File

@ -3,6 +3,7 @@ package io.dataease.constant;
public class CacheConstant {
public static class UserCacheConstant {
public static final String USER_COUNT_CACHE = "user_count";
public static final String USER_ECHELON_CACHE = "user_echelon";
public static final String LOGIN_USER_CACHE = "login_user_cache";
public static final String USER_ROLES_CACHE = "user_roles";
public static final String USER_BUSI_PERS_CACHE = "user_busi_pers";

View File

@ -29,7 +29,7 @@ public class AuthUtils {
}
public static boolean isSysAdmin(Long userId) {
return userId == SYS_ADMIN_UID;
return userId.equals(SYS_ADMIN_UID);
}