update for authrity scan

木子李·De 3 years ago
parent cbf1539663
commit 7837330994

@ -1,26 +1,23 @@
package com.anjiplus.template.gaea.business.runner;
import com.anji.plus.gaea.constant.Enabled;
import com.anji.plus.gaea.init.InitRequestUrlMappings;
import com.anjiplus.template.gaea.business.modules.accessauthority.service.AccessAuthorityService;
import com.anjiplus.template.gaea.business.modules.dict.service.GaeaDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import java.util.List;
/**
*
* @author lr
* @since 2021-04-08
*/
* @desc
* @author WongBin <abc13579d@163.com>
* @date 2019-02-17 08:50:10.009
**/
public class ApplicationInitRunner implements ApplicationRunner {
@Autowired
private GaeaDictService gaeaDictService;
@Autowired
private InitRequestUrlMappings initRequestUrlMappings;
private AccessAuthorityService accessAuthorityService;
@Override
public void run(ApplicationArguments args) throws Exception {
@ -28,9 +25,7 @@ public class ApplicationInitRunner implements ApplicationRunner {
//1、数据字典刷新
// gaeaDictService.refreshCache(null);
//获取当前应用中所有的请求信息
//List<InitRequestUrlMappings.RequestInfo> requestInfos = initRequestUrlMappings.getRequestInfos(Enabled.YES.getValue());
//System.out.println(requestInfos);
//2. 建立url权限拦截体系
accessAuthorityService.scanGaeaSecurityAuthorities();
}
}

@ -28,4 +28,9 @@
delete_flag,enable_flag,create_by,create_time,update_by,update_time,version
</sql>
<select id="queryAuthoritiesByLoginName" resultType="java.lang.String" parameterType="java.lang.String">
select distinct concat(target,':',action) from access_role_authority where role_code in (
select role_code from access_user_role where login_name=#{loginName}
)
</select>
</mapper>
Loading…
Cancel
Save