|
@@ -10,6 +10,7 @@ import com.winhc.repal.util.RedisUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.HashSet;
|
|
|
import java.util.Set;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
@@ -38,6 +39,9 @@ public class RepalRolePermissionServiceImpl extends ServiceImpl<RepalRolePermiss
|
|
|
Set<String> codeSet = redisUtil.setMembers(Constant.USER_PERMISSION_KEY + userId);
|
|
|
if (CollUtil.isEmpty(codeSet)) {
|
|
|
codeSet = repalRolePermissionMapper.getUserPermissionCodeSet(userId);
|
|
|
+ if (CollUtil.isEmpty(codeSet)) {
|
|
|
+ return new HashSet<>();
|
|
|
+ }
|
|
|
processUserPermissionCache(userId, codeSet);
|
|
|
}
|
|
|
return codeSet;
|