月球大数据地理空间分析展示平台-【后端】-月球后台服务
1
13693261870
2023-07-10 cace96726d1e9a3dee35eefd135330a7ddc2d700
src/main/java/com/moon/server/interceptor/ProxyFilter.java
@@ -1,10 +1,12 @@
package com.moon.server.interceptor;
import com.moon.server.entity.all.ResAuthEntity;
import com.moon.server.entity.all.StaticData;
import com.moon.server.entity.sys.TokenEntity;
import com.moon.server.entity.sys.UserEntity;
import com.moon.server.helper.StringHelper;
import com.moon.server.helper.WebHelper;
import com.moon.server.service.all.PermsService;
import com.moon.server.service.all.SysService;
import com.moon.server.service.sys.ResLogService;
@@ -24,6 +26,9 @@
public class ProxyFilter implements Filter {
    @Resource
    private SysService sysService;
    @Resource
    private PermsService permsService;
    @Resource
    private ResLogService resLogService;
@@ -150,8 +155,9 @@
        return te.getIp().equals(ip);
    }
    private boolean checkPerms(int resId){
    private boolean checkPerms(UserEntity ue, int resId){
        String uid = StaticData.ADMIN.equals(ue.getUid()) ? null : ue.getUid();
        List<ResAuthEntity> rs = permsService.selectRes(uid);
        return true;
    }