Commit 1d309092 authored by 赵啸非's avatar 赵啸非

每天早上定时添加考勤记录

parent b57975e5
package com.mortals.xhx.common.utils;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.xhx.base.system.resource.model.ResourceEntity;
......@@ -41,9 +42,7 @@ public class ControllerScanUtil {
}
public static List<ResourceEntity> getAnnotationInfo(List<Class<?>> clsList) {
List<ResourceEntity> resourceArrayList = new ArrayList<>();
if (clsList != null && clsList.size() > 0) {
for (Class<?> cls : clsList) {
......@@ -61,7 +60,6 @@ public class ControllerScanUtil {
Method substringMethod = null;
String result = "";
try {
String packName = cls.getPackage().getName();
if (StrUtil.contains(packName, "system")) {
//系统管理-xx管理-
......@@ -111,10 +109,11 @@ public class ControllerScanUtil {
if (unAuth) {
//判断下 是否含有list 如果不包含 则返回
boolean mExits2 = method.isAnnotationPresent(PostMapping.class);
log.info("mExits2 :{}",mExits2);
if (mExits2) {
PostMapping postMapping = method.getAnnotation(PostMapping.class);
String s =postMapping.value()[0];
log.info("unauth path :{}",s);
log.info("unauth path :{}", JSON.toJSONString(postMapping));
if(!"list".equalsIgnoreCase(s)){
continue;
}
......@@ -202,11 +201,11 @@ public class ControllerScanUtil {
}
}
resourceViewEntity.setUrl(UrlViewSet.stream().collect(Collectors.joining(",")));
System.out.println(JSONObject.toJSONString(resourceViewEntity));
log.info(JSONObject.toJSONString(resourceViewEntity));
resourceArrayList.add(resourceViewEntity);
resourceEditEntity.setUrl(UrlEditSet.stream().collect(Collectors.joining(",")));
System.out.println(JSONObject.toJSONString(resourceEditEntity));
log.info(JSONObject.toJSONString(resourceEditEntity));
resourceArrayList.add(resourceEditEntity);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment