feat:修改任务

dev
wangxy 8 months ago
parent fc5784e92c
commit 5a2c947b0c

@ -1,200 +1,200 @@
/* */ package com.archive.common.utils package com.archive.common.utils
; ;
/* */
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import java.net.InetAddress; import java.net.InetAddress;
/* */ import java.net.UnknownHostException; import java.net.UnknownHostException;
/* */ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class IpUtils public class IpUtils
/* */ { {
/* */ public static String getIpAddr(HttpServletRequest request) { public static String getIpAddr(HttpServletRequest request) {
/* 16 */ if (request == null) if (request == null)
/* */ { {
/* 18 */ return "unknown"; return "unknown";
/* */ } }
/* 20 */ String ip = request.getHeader("x-forwarded-for"); String ip = request.getHeader("x-forwarded-for");
/* 21 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
/* */ { {
/* 23 */ ip = request.getHeader("Proxy-Client-IP"); ip = request.getHeader("Proxy-Client-IP");
/* */ } }
/* 25 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
/* */ { {
/* 27 */ ip = request.getHeader("X-Forwarded-For"); ip = request.getHeader("X-Forwarded-For");
/* */ } }
/* 29 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
/* */ { {
/* 31 */ ip = request.getHeader("WL-Proxy-Client-IP"); ip = request.getHeader("WL-Proxy-Client-IP");
/* */ } }
/* 33 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
/* */ { {
/* 35 */ ip = request.getHeader("X-Real-IP"); ip = request.getHeader("X-Real-IP");
/* */ } }
/* */
/* 38 */ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
/* */ { {
/* 40 */ ip = request.getRemoteAddr(); ip = request.getRemoteAddr();
/* */ } }
/* */
/* 43 */ return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
/* */ } }
/* */
/* */
/* */ public static boolean internalIp(String ip) { public static boolean internalIp(String ip) {
/* 48 */ byte[] addr = textToNumericFormatV4(ip); byte[] addr = textToNumericFormatV4(ip);
/* 49 */ return (internalIp(addr) || "127.0.0.1".equals(ip)); return (internalIp(addr) || "127.0.0.1".equals(ip));
/* */ } }
/* */
/* */
/* */ private static boolean internalIp(byte[] addr) { private static boolean internalIp(byte[] addr) {
/* 54 */ if (StringUtils.isNull(addr) || addr.length < 2) if (StringUtils.isNull(addr) || addr.length < 2)
/* */ { {
/* 56 */ return true; return true;
/* */ } }
/* 58 */ byte b0 = addr[0]; byte b0 = addr[0];
/* 59 */ byte b1 = addr[1]; byte b1 = addr[1];
/* */
/* 61 */ byte SECTION_1 = 10; byte SECTION_1 = 10;
/* */
/* 63 */ byte SECTION_2 = -84; byte SECTION_2 = -84;
/* 64 */ byte SECTION_3 = 16; byte SECTION_3 = 16;
/* 65 */ byte SECTION_4 = 31; byte SECTION_4 = 31;
/* */
/* 67 */ byte SECTION_5 = -64; byte SECTION_5 = -64;
/* 68 */ byte SECTION_6 = -88; byte SECTION_6 = -88;
/* 69 */ switch (b0) { switch (b0) {
/* */
/* */ case 10: case 10:
/* 72 */ return true; return true;
/* */ case -84: case -84:
/* 74 */ if (b1 >= 16 && b1 <= 31) if (b1 >= 16 && b1 <= 31)
/* */ { {
/* 76 */ return true; return true;
/* */ } }
/* */ case -64: case -64:
/* 79 */ switch (b1) { switch (b1) {
/* */
/* */ case -88: case -88:
/* 82 */ return true; return true;
/* */ } break; } break;
/* */ } }
/* 85 */ return false; return false;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static byte[] textToNumericFormatV4(String text) { public static byte[] textToNumericFormatV4(String text) {
/* 97 */ if (text.length() == 0) if (text.length() == 0)
/* */ { {
/* 99 */ return null; return null;
/* */ } }
/* */
/* 102 */ byte[] bytes = new byte[4]; byte[] bytes = new byte[4];
/* 103 */ String[] elements = text.split("\\.", -1); String[] elements = text.split("\\.", -1);
/* */
/* */ try { try {
/* */ long l; long l;
/* */ int i; int i;
/* 108 */ switch (elements.length) { switch (elements.length) {
/* */
/* */ case 1: case 1:
/* 111 */ l = Long.parseLong(elements[0]); l = Long.parseLong(elements[0]);
/* 112 */ if (l < 0L || l > 4294967295L) { if (l < 0L || l > 4294967295L) {
/* 113 */ return null; return null;
/* */ } }
/* 115 */ bytes[0] = (byte)(int)(l >> 24L & 0xFFL); bytes[0] = (byte)(int)(l >> 24L & 0xFFL);
/* 116 */ bytes[1] = (byte)(int)((l & 0xFFFFFFL) >> 16L & 0xFFL); bytes[1] = (byte)(int)((l & 0xFFFFFFL) >> 16L & 0xFFL);
/* 117 */ bytes[2] = (byte)(int)((l & 0xFFFFL) >> 8L & 0xFFL); bytes[2] = (byte)(int)((l & 0xFFFFL) >> 8L & 0xFFL);
/* 118 */ bytes[3] = (byte)(int)(l & 0xFFL); bytes[3] = (byte)(int)(l & 0xFFL);
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* 168 */ return bytes;case 2: l = Integer.parseInt(elements[0]); if (l < 0L || l > 255L) return null; bytes[0] = (byte)(int)(l & 0xFFL); l = Integer.parseInt(elements[1]); if (l < 0L || l > 16777215L) return null; bytes[1] = (byte)(int)(l >> 16L & 0xFFL); bytes[2] = (byte)(int)((l & 0xFFFFL) >> 8L & 0xFFL); bytes[3] = (byte)(int)(l & 0xFFL); return bytes;case 3: for (i = 0; i < 2; i++) { l = Integer.parseInt(elements[i]); if (l < 0L || l > 255L) return null; bytes[i] = (byte)(int)(l & 0xFFL); } l = Integer.parseInt(elements[2]); if (l < 0L || l > 65535L) return null; bytes[2] = (byte)(int)(l >> 8L & 0xFFL); bytes[3] = (byte)(int)(l & 0xFFL); return bytes;case 4: for (i = 0; i < 4; i++) { l = Integer.parseInt(elements[i]); if (l < 0L || l > 255L) return null; bytes[i] = (byte)(int)(l & 0xFFL); } return bytes; return bytes;case 2: l = Integer.parseInt(elements[0]); if (l < 0L || l > 255L) return null; bytes[0] = (byte)(int)(l & 0xFFL); l = Integer.parseInt(elements[1]); if (l < 0L || l > 16777215L) return null; bytes[1] = (byte)(int)(l >> 16L & 0xFFL); bytes[2] = (byte)(int)((l & 0xFFFFL) >> 8L & 0xFFL); bytes[3] = (byte)(int)(l & 0xFFL); return bytes;case 3: for (i = 0; i < 2; i++) { l = Integer.parseInt(elements[i]); if (l < 0L || l > 255L) return null; bytes[i] = (byte)(int)(l & 0xFFL); } l = Integer.parseInt(elements[2]); if (l < 0L || l > 65535L) return null; bytes[2] = (byte)(int)(l >> 8L & 0xFFL); bytes[3] = (byte)(int)(l & 0xFFL); return bytes;case 4: for (i = 0; i < 4; i++) { l = Integer.parseInt(elements[i]); if (l < 0L || l > 255L) return null; bytes[i] = (byte)(int)(l & 0xFFL); } return bytes;
/* */ } }
/* */ return null; return null;
/* */ } catch (NumberFormatException e) { } catch (NumberFormatException e) {
/* */ return null; return null;
/* */ } } public static String getHostIp() { } } public static String getHostIp() {
/* */ try { try {
/* 175 */ return InetAddress.getLocalHost().getHostAddress(); return InetAddress.getLocalHost().getHostAddress();
/* */ } }
/* 177 */ catch (UnknownHostException unknownHostException) { catch (UnknownHostException unknownHostException) {
/* */
/* */
/* 180 */ return "127.0.0.1"; return "127.0.0.1";
/* */ } }
/* */ } }
/* */
/* */
/* */ public static String getHostName() { public static String getHostName() {
/* */ try { try {
/* 187 */ return InetAddress.getLocalHost().getHostName(); return InetAddress.getLocalHost().getHostName();
/* */ } }
/* 189 */ catch (UnknownHostException unknownHostException) { catch (UnknownHostException unknownHostException) {
/* */
/* */
/* 192 */ return "未知"; return "未知";
/* */ } }
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\IpUtils.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\IpUtils.class

@ -1,188 +1,188 @@
/* */ package com.archive.framework.aspectj; package com.archive.framework.aspectj;
/* */
/* */ import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
/* */ import com.alibaba.fastjson.serializer.SerializeFilter; import com.alibaba.fastjson.serializer.SerializeFilter;
/* */ import com.alibaba.fastjson.support.spring.PropertyPreFilters; import com.alibaba.fastjson.support.spring.PropertyPreFilters;
/* */ import com.archive.common.utils.ServletUtils; import com.archive.common.utils.ServletUtils;
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.security.ShiroUtils; import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.framework.aspectj.lang.annotation.Log; import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessStatus; import com.archive.framework.aspectj.lang.enums.BusinessStatus;
/* */ import com.archive.framework.manager.AsyncManager; import com.archive.framework.manager.AsyncManager;
/* */ import com.archive.framework.manager.factory.AsyncFactory; import com.archive.framework.manager.factory.AsyncFactory;
/* */ import com.archive.project.monitor.operlog.domain.OperLog; import com.archive.project.monitor.operlog.domain.OperLog;
/* */ import com.archive.project.system.user.domain.User; import com.archive.project.system.user.domain.User;
/* */ import java.lang.reflect.Method; import java.lang.reflect.Method;
/* */ import java.util.Map; import java.util.Map;
/* */ import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
/* */ import org.aspectj.lang.Signature; import org.aspectj.lang.Signature;
/* */ import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.AfterReturning;
/* */ import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.AfterThrowing;
/* */ import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
/* */ import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.annotation.Pointcut;
/* */ import org.aspectj.lang.reflect.MethodSignature; import org.aspectj.lang.reflect.MethodSignature;
/* */ import org.slf4j.Logger; import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/* */ import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/* */
/* */
/* */
/* */
/* */
/* */ @Aspect @Aspect
/* */ @Component @Component
/* */ public class LogAspect public class LogAspect
/* */ { {
/* 36 */ private static final Logger log = LoggerFactory.getLogger(com.archive.framework.aspectj.LogAspect.class); private static final Logger log = LoggerFactory.getLogger(com.archive.framework.aspectj.LogAspect.class);
/* */
/* */
/* 39 */ public static final String[] EXCLUDE_PROPERTIES = new String[] { "password", "oldPassword", "newPassword", "confirmPassword" }; public static final String[] EXCLUDE_PROPERTIES = new String[] { "password", "oldPassword", "newPassword", "confirmPassword" };
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Pointcut("@annotation(com.archive.framework.aspectj.lang.annotation.Log)") @Pointcut("@annotation(com.archive.framework.aspectj.lang.annotation.Log)")
/* */ public void logPointCut() {} public void logPointCut() {}
/* */
/* */
/* */
/* */
/* */
/* */ @AfterReturning(pointcut = "logPointCut()", returning = "jsonResult") @AfterReturning(pointcut = "logPointCut()", returning = "jsonResult")
/* */ public void doAfterReturning(JoinPoint joinPoint, Object jsonResult) { public void doAfterReturning(JoinPoint joinPoint, Object jsonResult) {
/* 55 */ handleLog(joinPoint, null, jsonResult); handleLog(joinPoint, null, jsonResult);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @AfterThrowing(value = "logPointCut()", throwing = "e") @AfterThrowing(value = "logPointCut()", throwing = "e")
/* */ public void doAfterThrowing(JoinPoint joinPoint, Exception e) { public void doAfterThrowing(JoinPoint joinPoint, Exception e) {
/* 67 */ handleLog(joinPoint, e, null); handleLog(joinPoint, e, null);
/* */ } }
/* */
/* */
/* */
/* */
/* */ protected void handleLog(JoinPoint joinPoint, Exception e, Object jsonResult) { protected void handleLog(JoinPoint joinPoint, Exception e, Object jsonResult) {
/* */ try { try {
/* 75 */ Log controllerLog = getAnnotationLog(joinPoint); Log controllerLog = getAnnotationLog(joinPoint);
/* 76 */ if (controllerLog == null) { if (controllerLog == null) {
/* */ return; return;
/* */ } }
/* */
/* */
/* */
/* 82 */ User currentUser = ShiroUtils.getSysUser(); User currentUser = ShiroUtils.getSysUser();
/* */
/* */
/* 85 */ OperLog operLog = new OperLog(); OperLog operLog = new OperLog();
/* 86 */ operLog.setStatus(Integer.valueOf(BusinessStatus.SUCCESS.ordinal())); operLog.setStatus(Integer.valueOf(BusinessStatus.SUCCESS.ordinal()));
/* */
/* 88 */ String ip = ShiroUtils.getIp(); String ip = ShiroUtils.getIp();
/* 89 */ operLog.setOperIp(ip); operLog.setOperIp(ip);
/* */
/* 91 */ operLog.setJsonResult(StringUtils.substring(JSONObject.toJSONString(jsonResult), 0, 2000)); operLog.setJsonResult(StringUtils.substring(JSONObject.toJSONString(jsonResult), 0, 2000));
/* */
/* 93 */ operLog.setOperUrl(ServletUtils.getRequest().getRequestURI()); operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
/* 94 */ if (currentUser != null) { if (currentUser != null) {
/* */
/* 96 */ operLog.setOperName(currentUser.getLoginName()); operLog.setOperName(currentUser.getLoginName());
/* 97 */ if (StringUtils.isNotNull(currentUser.getDept()) && if (StringUtils.isNotNull(currentUser.getDept()) &&
/* 98 */ StringUtils.isNotEmpty(currentUser.getDept().getDeptName())) StringUtils.isNotEmpty(currentUser.getDept().getDeptName()))
/* */ { {
/* 100 */ operLog.setDeptName(currentUser.getDept().getDeptName()); operLog.setDeptName(currentUser.getDept().getDeptName());
/* */ } }
/* */ } }
/* */
/* 104 */ if (e != null) { if (e != null) {
/* */
/* 106 */ operLog.setStatus(Integer.valueOf(BusinessStatus.FAIL.ordinal())); operLog.setStatus(Integer.valueOf(BusinessStatus.FAIL.ordinal()));
/* 107 */ operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000)); operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000));
/* */ } }
/* */
/* 110 */ String className = joinPoint.getTarget().getClass().getName(); String className = joinPoint.getTarget().getClass().getName();
/* 111 */ String methodName = joinPoint.getSignature().getName(); String methodName = joinPoint.getSignature().getName();
/* 112 */ operLog.setMethod(className + "." + methodName + "()"); operLog.setMethod(className + "." + methodName + "()");
/* */
/* 114 */ operLog.setRequestMethod(ServletUtils.getRequest().getMethod()); operLog.setRequestMethod(ServletUtils.getRequest().getMethod());
/* */
/* 116 */ getControllerMethodDescription(controllerLog, operLog); getControllerMethodDescription(controllerLog, operLog);
/* */
/* 118 */ AsyncManager.me().execute(AsyncFactory.recordOper(operLog)); AsyncManager.me().execute(AsyncFactory.recordOper(operLog));
/* */ } }
/* 120 */ catch (Exception exp) { catch (Exception exp) {
/* */
/* */
/* 123 */ log.error("==前置通知异常=="); log.error("==前置通知异常==");
/* 124 */ log.error("异常信息:{}", exp.getMessage()); log.error("异常信息:{}", exp.getMessage());
/* 125 */ exp.printStackTrace(); exp.printStackTrace();
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void getControllerMethodDescription(Log log, OperLog operLog) throws Exception { public void getControllerMethodDescription(Log log, OperLog operLog) throws Exception {
/* 139 */ operLog.setBusinessType(Integer.valueOf(log.businessType().ordinal())); operLog.setBusinessType(Integer.valueOf(log.businessType().ordinal()));
/* */
/* 141 */ operLog.setTitle(log.title()); operLog.setTitle(log.title());
/* */
/* 143 */ operLog.setOperatorType(Integer.valueOf(log.operatorType().ordinal())); operLog.setOperatorType(Integer.valueOf(log.operatorType().ordinal()));
/* */
/* 145 */ if (log.isSaveRequestData()) if (log.isSaveRequestData())
/* */ { {
/* */
/* 148 */ setRequestValue(operLog); setRequestValue(operLog);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private void setRequestValue(OperLog operLog) { private void setRequestValue(OperLog operLog) {
/* 160 */ Map<String, String[]> map = ServletUtils.getRequest().getParameterMap(); Map<String, String[]> map = ServletUtils.getRequest().getParameterMap();
/* 161 */ if (StringUtils.isNotEmpty(map)) { if (StringUtils.isNotEmpty(map)) {
/* */
/* 163 */ PropertyPreFilters.MySimplePropertyPreFilter excludefilter = (new PropertyPreFilters()).addFilter(); PropertyPreFilters.MySimplePropertyPreFilter excludefilter = (new PropertyPreFilters()).addFilter();
/* 164 */ excludefilter.addExcludes(EXCLUDE_PROPERTIES); excludefilter.addExcludes(EXCLUDE_PROPERTIES);
/* 165 */ String params = JSONObject.toJSONString(map, (SerializeFilter)excludefilter, new com.alibaba.fastjson.serializer.SerializerFeature[0]); String params = JSONObject.toJSONString(map, (SerializeFilter)excludefilter, new com.alibaba.fastjson.serializer.SerializerFeature[0]);
/* 166 */ operLog.setOperParam(StringUtils.substring(params, 0, 2000)); operLog.setOperParam(StringUtils.substring(params, 0, 2000));
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ private Log getAnnotationLog(JoinPoint joinPoint) throws Exception { private Log getAnnotationLog(JoinPoint joinPoint) throws Exception {
/* 175 */ Signature signature = joinPoint.getSignature(); Signature signature = joinPoint.getSignature();
/* 176 */ MethodSignature methodSignature = (MethodSignature)signature; MethodSignature methodSignature = (MethodSignature)signature;
/* 177 */ Method method = methodSignature.getMethod(); Method method = methodSignature.getMethod();
/* */
/* 179 */ if (method != null) if (method != null)
/* */ { {
/* 181 */ return method.<Log>getAnnotation(Log.class); return method.<Log>getAnnotation(Log.class);
/* */ } }
/* 183 */ return null; return null;
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\LogAspect.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\aspectj\LogAspect.class

@ -1,81 +1,81 @@
/* */ package com.archive.framework.config package com.archive.framework.config
; ;
/* */
/* */ import com.google.code.kaptcha.text.impl.DefaultTextCreator; import com.google.code.kaptcha.text.impl.DefaultTextCreator;
/* */ import java.security.SecureRandom; import java.security.SecureRandom;
/* */ import java.util.Random; import java.util.Random;
/* */
/* */
/* */
/* */
/* */
/* */ public class KaptchaTextCreator public class KaptchaTextCreator
/* */ extends DefaultTextCreator extends DefaultTextCreator
/* */ { {
/* 14 */ private static final String[] CNUMBERS = "0,1,2,3,4,5,6,7,8,9,10".split(","); private static final String[] CNUMBERS = "0,1,2,3,4,5,6,7,8,9,10".split(",");
/* */
/* */
/* */
/* */ public String getText() { public String getText() {
/* 19 */ Integer result = Integer.valueOf(0); Integer result = Integer.valueOf(0);
/* 20 */ Random random = new SecureRandom(); Random random = new SecureRandom();
/* 21 */ int x = random.nextInt(10); int x = random.nextInt(10);
/* 22 */ int y = random.nextInt(10); int y = random.nextInt(10);
/* 23 */ StringBuilder suChinese = new StringBuilder(); StringBuilder suChinese = new StringBuilder();
/* 24 */ int randomoperands = (int)Math.round(Math.random() * 2.0D); int randomoperands = (int)Math.round(Math.random() * 2.0D);
/* 25 */ if (randomoperands == 0) { if (randomoperands == 0) {
/* */
/* 27 */ result = Integer.valueOf(x * y); result = Integer.valueOf(x * y);
/* 28 */ suChinese.append(CNUMBERS[x]); suChinese.append(CNUMBERS[x]);
/* 29 */ suChinese.append("*"); suChinese.append("*");
/* 30 */ suChinese.append(CNUMBERS[y]); suChinese.append(CNUMBERS[y]);
/* */ } }
/* 32 */ else if (randomoperands == 1) { else if (randomoperands == 1) {
/* */
/* 34 */ if (x != 0 && y % x == 0) if (x != 0 && y % x == 0)
/* */ { {
/* 36 */ result = Integer.valueOf(y / x); result = Integer.valueOf(y / x);
/* 37 */ suChinese.append(CNUMBERS[y]); suChinese.append(CNUMBERS[y]);
/* 38 */ suChinese.append("/"); suChinese.append("/");
/* 39 */ suChinese.append(CNUMBERS[x]); suChinese.append(CNUMBERS[x]);
/* */ } }
/* */ else else
/* */ { {
/* 43 */ result = Integer.valueOf(x + y); result = Integer.valueOf(x + y);
/* 44 */ suChinese.append(CNUMBERS[x]); suChinese.append(CNUMBERS[x]);
/* 45 */ suChinese.append("+"); suChinese.append("+");
/* 46 */ suChinese.append(CNUMBERS[y]); suChinese.append(CNUMBERS[y]);
/* */ } }
/* */
/* 49 */ } else if (randomoperands == 2) { } else if (randomoperands == 2) {
/* */
/* 51 */ if (x >= y) if (x >= y)
/* */ { {
/* 53 */ result = Integer.valueOf(x - y); result = Integer.valueOf(x - y);
/* 54 */ suChinese.append(CNUMBERS[x]); suChinese.append(CNUMBERS[x]);
/* 55 */ suChinese.append("-"); suChinese.append("-");
/* 56 */ suChinese.append(CNUMBERS[y]); suChinese.append(CNUMBERS[y]);
/* */ } }
/* */ else else
/* */ { {
/* 60 */ result = Integer.valueOf(y - x); result = Integer.valueOf(y - x);
/* 61 */ suChinese.append(CNUMBERS[y]); suChinese.append(CNUMBERS[y]);
/* 62 */ suChinese.append("-"); suChinese.append("-");
/* 63 */ suChinese.append(CNUMBERS[x]); suChinese.append(CNUMBERS[x]);
/* */ } }
/* */
/* */ } else { } else {
/* */
/* 68 */ result = Integer.valueOf(x + y); result = Integer.valueOf(x + y);
/* 69 */ suChinese.append(CNUMBERS[x]); suChinese.append(CNUMBERS[x]);
/* 70 */ suChinese.append("+"); suChinese.append("+");
/* 71 */ suChinese.append(CNUMBERS[y]); suChinese.append(CNUMBERS[y]);
/* */ } }
/* 73 */ suChinese.append("=?@" + result); suChinese.append("=?@" + result);
/* 74 */ return suChinese.toString(); return suChinese.toString();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\KaptchaTextCreator.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\KaptchaTextCreator.class

@ -1,191 +1,191 @@
/* */ package com.archive.framework.shiro.web.filter.kickout package com.archive.framework.shiro.web.filter.kickout
; ;
/* */
/* */ import com.archive.common.utils.ServletUtils; import com.archive.common.utils.ServletUtils;
/* */ import com.archive.common.utils.security.ShiroUtils; import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.framework.web.domain.AjaxResult; import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.project.system.user.domain.User; import com.archive.project.system.user.domain.User;
/* */ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
/* */ import java.io.IOException; import java.io.IOException;
/* */ import java.io.Serializable; import java.io.Serializable;
/* */ import java.util.ArrayDeque; import java.util.ArrayDeque;
/* */ import java.util.Deque; import java.util.Deque;
/* */ import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
/* */ import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
/* */ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/* */ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
/* */ import org.apache.shiro.cache.Cache; import org.apache.shiro.cache.Cache;
/* */ import org.apache.shiro.cache.CacheManager; import org.apache.shiro.cache.CacheManager;
/* */ import org.apache.shiro.session.Session; import org.apache.shiro.session.Session;
/* */ import org.apache.shiro.session.mgt.DefaultSessionKey; import org.apache.shiro.session.mgt.DefaultSessionKey;
/* */ import org.apache.shiro.session.mgt.SessionKey; import org.apache.shiro.session.mgt.SessionKey;
/* */ import org.apache.shiro.session.mgt.SessionManager; import org.apache.shiro.session.mgt.SessionManager;
/* */ import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
/* */ import org.apache.shiro.web.filter.AccessControlFilter; import org.apache.shiro.web.filter.AccessControlFilter;
/* */ import org.apache.shiro.web.util.WebUtils; import org.apache.shiro.web.util.WebUtils;
/* */
/* */
/* */
/* */
/* */
/* */ public class KickoutSessionFilter public class KickoutSessionFilter
/* */ extends AccessControlFilter extends AccessControlFilter
/* */ { {
/* 33 */ private static final ObjectMapper objectMapper = new ObjectMapper(); private static final ObjectMapper objectMapper = new ObjectMapper();
/* */
/* */
/* */
/* */
/* 38 */ private int maxSession = -1; private int maxSession = -1;
/* */
/* */
/* */
/* */
/* 43 */ private Boolean kickoutAfter = Boolean.valueOf(false); private Boolean kickoutAfter = Boolean.valueOf(false);
/* */
/* */
/* */ private String kickoutUrl; private String kickoutUrl;
/* */
/* */
/* */ private SessionManager sessionManager; private SessionManager sessionManager;
/* */
/* */
/* */ private Cache<String, Deque<Serializable>> cache; private Cache<String, Deque<Serializable>> cache;
/* */
/* */
/* */
/* */ protected boolean isAccessAllowed(ServletRequest servletRequest, ServletResponse servletResponse, Object o) throws Exception { protected boolean isAccessAllowed(ServletRequest servletRequest, ServletResponse servletResponse, Object o) throws Exception {
/* 57 */ return false; return false;
/* */ } }
/* */
/* */
/* */
/* */ protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
/* 63 */ Subject subject = getSubject(request, response); Subject subject = getSubject(request, response);
/* 64 */ if ((!subject.isAuthenticated() && !subject.isRemembered()) || this.maxSession == -1) if ((!subject.isAuthenticated() && !subject.isRemembered()) || this.maxSession == -1)
/* */ { {
/* */
/* 67 */ return true; return true;
/* */ } }
/* */
/* */ try { try {
/* 71 */ Session session = subject.getSession(); Session session = subject.getSession();
/* */
/* 73 */ User user = ShiroUtils.getSysUser(); User user = ShiroUtils.getSysUser();
/* 74 */ String loginName = user.getLoginName(); String loginName = user.getLoginName();
/* 75 */ Serializable sessionId = session.getId(); Serializable sessionId = session.getId();
/* */
/* */
/* 78 */ Deque<Serializable> deque = (Deque<Serializable>)this.cache.get(loginName); Deque<Serializable> deque = (Deque<Serializable>)this.cache.get(loginName);
/* 79 */ if (deque == null) if (deque == null)
/* */ { {
/* */
/* 82 */ deque = new ArrayDeque<>(); deque = new ArrayDeque<>();
/* */ } }
/* */
/* */
/* 86 */ if (!deque.contains(sessionId) && session.getAttribute("kickout") == null) { if (!deque.contains(sessionId) && session.getAttribute("kickout") == null) {
/* */
/* */
/* 89 */ deque.push(sessionId); deque.push(sessionId);
/* */
/* 91 */ this.cache.put(loginName, deque); this.cache.put(loginName, deque);
/* */ } }
/* */
/* */
/* 95 */ while (deque.size() > this.maxSession) { while (deque.size() > this.maxSession) {
/* */
/* 97 */ Serializable kickoutSessionId = null; Serializable kickoutSessionId = null;
/* */
/* 99 */ if (this.kickoutAfter.booleanValue()) { if (this.kickoutAfter.booleanValue()) {
/* */
/* */
/* 102 */ kickoutSessionId = deque.removeFirst(); kickoutSessionId = deque.removeFirst();
/* */
/* */ } }
/* */ else { else {
/* */
/* 107 */ kickoutSessionId = deque.removeLast(); kickoutSessionId = deque.removeLast();
/* */ } }
/* */
/* 110 */ this.cache.put(loginName, deque); this.cache.put(loginName, deque);
/* */
/* */
/* */
/* */ try { try {
/* 115 */ Session kickoutSession = this.sessionManager.getSession((SessionKey)new DefaultSessionKey(kickoutSessionId)); Session kickoutSession = this.sessionManager.getSession((SessionKey)new DefaultSessionKey(kickoutSessionId));
/* 116 */ if (null != kickoutSession) if (null != kickoutSession)
/* */ { {
/* */
/* 119 */ kickoutSession.setAttribute("kickout", Boolean.valueOf(true)); kickoutSession.setAttribute("kickout", Boolean.valueOf(true));
/* */ } }
/* */ } }
/* 122 */ catch (Exception exception) {} catch (Exception exception) {}
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* 129 */ if ((Boolean)session.getAttribute("kickout") != null && ((Boolean)session.getAttribute("kickout")).booleanValue() == true) { if ((Boolean)session.getAttribute("kickout") != null && ((Boolean)session.getAttribute("kickout")).booleanValue() == true) {
/* */
/* */
/* 132 */ subject.logout(); subject.logout();
/* 133 */ saveRequest(request); saveRequest(request);
/* 134 */ return isAjaxResponse(request, response); return isAjaxResponse(request, response);
/* */ } }
/* 136 */ return true; return true;
/* */ } }
/* 138 */ catch (Exception e) { catch (Exception e) {
/* */
/* 140 */ return isAjaxResponse(request, response); return isAjaxResponse(request, response);
/* */ } }
/* */ } }
/* */
/* */
/* */ private boolean isAjaxResponse(ServletRequest request, ServletResponse response) throws IOException { private boolean isAjaxResponse(ServletRequest request, ServletResponse response) throws IOException {
/* 146 */ HttpServletRequest req = (HttpServletRequest)request; HttpServletRequest req = (HttpServletRequest)request;
/* 147 */ HttpServletResponse res = (HttpServletResponse)response; HttpServletResponse res = (HttpServletResponse)response;
/* 148 */ if (ServletUtils.isAjaxRequest(req)) { if (ServletUtils.isAjaxRequest(req)) {
/* */
/* 150 */ AjaxResult ajaxResult = AjaxResult.error("您已在别处登录,请您修改密码或重新登录"); AjaxResult ajaxResult = AjaxResult.error("您已在别处登录,请您修改密码或重新登录");
/* 151 */ ServletUtils.renderString(res, objectMapper.writeValueAsString(ajaxResult)); ServletUtils.renderString(res, objectMapper.writeValueAsString(ajaxResult));
/* */ } }
/* */ else { else {
/* */
/* 155 */ WebUtils.issueRedirect(request, response, this.kickoutUrl); WebUtils.issueRedirect(request, response, this.kickoutUrl);
/* */ } }
/* 157 */ return false; return false;
/* */ } }
/* */
/* */
/* */ public void setMaxSession(int maxSession) { public void setMaxSession(int maxSession) {
/* 162 */ this.maxSession = maxSession; this.maxSession = maxSession;
/* */ } }
/* */
/* */
/* */ public void setKickoutAfter(boolean kickoutAfter) { public void setKickoutAfter(boolean kickoutAfter) {
/* 167 */ this.kickoutAfter = Boolean.valueOf(kickoutAfter); this.kickoutAfter = Boolean.valueOf(kickoutAfter);
/* */ } }
/* */
/* */
/* */ public void setKickoutUrl(String kickoutUrl) { public void setKickoutUrl(String kickoutUrl) {
/* 172 */ this.kickoutUrl = kickoutUrl; this.kickoutUrl = kickoutUrl;
/* */ } }
/* */
/* */
/* */ public void setSessionManager(SessionManager sessionManager) { public void setSessionManager(SessionManager sessionManager) {
/* 177 */ this.sessionManager = sessionManager; this.sessionManager = sessionManager;
/* */ } }
/* */
/* */
/* */
/* */
/* */ public void setCacheManager(CacheManager cacheManager) { public void setCacheManager(CacheManager cacheManager) {
/* 184 */ this.cache = cacheManager.getCache("sys-userCache"); this.cache = cacheManager.getCache("sys-userCache");
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\filter\kickout\KickoutSessionFilter.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\filter\kickout\KickoutSessionFilter.class

@ -1,345 +1,345 @@
/* */ package com.archive.project.dajs.jsgl.controller package com.archive.project.dajs.jsgl.controller
; ;
/* */
/* */ import com.archive.common.archiveUtil.TableUtil; import com.archive.common.archiveUtil.TableUtil;
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import com.archive.framework.aspectj.lang.annotation.Log; import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; import com.archive.framework.aspectj.lang.enums.BusinessType;
/* */ import com.archive.framework.web.controller.BaseController; import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult; import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.project.dajs.jsgl.service.IJsglService; import com.archive.project.dajs.jsgl.service.IJsglService;
/* */ import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree; import com.archive.project.dasz.archivetype.domain.ArchiveCollationTree;
/* */ import com.archive.project.dasz.archivetype.service.IArchiveTypeService; import com.archive.project.dasz.archivetype.service.IArchiveTypeService;
/* */ import com.archive.project.system.config.service.IConfigService; import com.archive.project.system.config.service.IConfigService;
/* */ import com.archive.project.system.dict.domain.DictData; import com.archive.project.system.dict.domain.DictData;
/* */ import com.archive.project.system.dict.domain.DictType; import com.archive.project.system.dict.domain.DictType;
/* */ import com.archive.project.system.dict.service.IDictTypeService; import com.archive.project.system.dict.service.IDictTypeService;
/* */ import java.io.IOException; import java.io.IOException;
/* */ import java.util.HashMap; import java.util.HashMap;
/* */ import java.util.List; import java.util.List;
/* */ import java.util.Map; import java.util.Map;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
/* */ import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
/* */ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
/* */ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
/* */ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
/* */ import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Controller @Controller
/* */ @RequestMapping({"/dajs/jsgl"}) @RequestMapping({"/dajs/jsgl"})
/* */ public class JsglController public class JsglController
/* */ extends BaseController extends BaseController
/* */ { {
/* */ @Autowired @Autowired
/* */ private IArchiveTypeService archiveTypeService; private IArchiveTypeService archiveTypeService;
/* */ @Autowired @Autowired
/* */ private IDictTypeService dictTypeService; private IDictTypeService dictTypeService;
/* */ @Autowired @Autowired
/* */ private IJsglService jsglService; private IJsglService jsglService;
/* */ @Autowired @Autowired
/* */ private IConfigService configService; private IConfigService configService;
/* 56 */ private String prefix = "dajs/jsgl"; private String prefix = "dajs/jsgl";
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"dajs:jsgl:view"}) @RequiresPermissions({"dajs:jsgl:view"})
/* */ @GetMapping @GetMapping
/* */ public String jsgl(ModelMap mmap) { public String jsgl(ModelMap mmap) {
/* 65 */ List<ArchiveCollationTree> ztrees = this.archiveTypeService.archiveCollationTreeData(); List<ArchiveCollationTree> ztrees = this.archiveTypeService.archiveCollationTreeData();
/* 66 */ if (ztrees != null && ztrees.size() > 2) { if (ztrees != null && ztrees.size() > 2) {
/* 67 */ mmap.put("firstNode", ztrees.get(1)); mmap.put("firstNode", ztrees.get(1));
/* */ } else { } else {
/* 69 */ mmap.put("firstNode", null); mmap.put("firstNode", null);
/* */ } }
/* */
/* */
/* 73 */ DictType dictType = new DictType(); dictType.setLabel("column_bind"); DictType dictType = new DictType(); dictType.setLabel("column_bind");
/* 74 */ List<DictType> dictTypeList = this.dictTypeService.selectDictTypeList(dictType); List<DictType> dictTypeList = this.dictTypeService.selectDictTypeList(dictType);
/* 75 */ Map<String, List<DictData>> dictDataMap = new HashMap<>(); Map<String, List<DictData>> dictDataMap = new HashMap<>();
/* 76 */ for (DictType dictTypeTemp : dictTypeList) { for (DictType dictTypeTemp : dictTypeList) {
/* 77 */ List<DictData> dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); List<DictData> dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType());
/* 78 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); dictDataMap.put(dictTypeTemp.getDictType(), dictDatas);
/* */ } }
/* 80 */ mmap.put("dictDataMap", dictDataMap); mmap.put("dictDataMap", dictDataMap);
/* 81 */ return this.prefix + "/jsgl"; return this.prefix + "/jsgl";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/add/{archiveId}/{type}/{ownerid}"}) @GetMapping({"/add/{archiveId}/{type}/{ownerid}"})
/* */ public String add(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("ownerid") String ownerid, ModelMap mmap) { public String add(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("ownerid") String ownerid, ModelMap mmap) {
/* 97 */ mmap.put("archiveId", archiveId); mmap.put("archiveId", archiveId);
/* 98 */ mmap.put("type", type); mmap.put("type", type);
/* 99 */ mmap.put("ownerid", ownerid); mmap.put("ownerid", ownerid);
/* 100 */ return this.prefix + "/add"; return this.prefix + "/add";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/detail/{archiveId}/{type}/{id}"}) @GetMapping({"/detail/{archiveId}/{type}/{id}"})
/* */ public String detail(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) { public String detail(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) {
/* 113 */ mmap.put("archiveTypeId", archiveId); mmap.put("archiveTypeId", archiveId);
/* 114 */ mmap.put("type", type); mmap.put("type", type);
/* 115 */ mmap.put("id", id); mmap.put("id", id);
/* 116 */ return this.prefix + "/detail"; return this.prefix + "/detail";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/update/{archiveId}/{type}/{id}"}) @GetMapping({"/update/{archiveId}/{type}/{id}"})
/* */ public String update(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) { public String update(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) {
/* 128 */ mmap.put("archiveTypeId", archiveId); mmap.put("archiveTypeId", archiveId);
/* 129 */ mmap.put("type", type); mmap.put("type", type);
/* 130 */ mmap.put("id", id); mmap.put("id", id);
/* 131 */ return this.prefix + "/update"; return this.prefix + "/update";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"dajs:jsgl:fileUpload"}) @RequiresPermissions({"dajs:jsgl:fileUpload"})
/* */ @GetMapping({"/uploadFile/{archiveId}/{type}/{id}"}) @GetMapping({"/uploadFile/{archiveId}/{type}/{id}"})
/* */ public String uploadFile(@PathVariable("archiveId") long archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) { public String uploadFile(@PathVariable("archiveId") long archiveId, @PathVariable("type") String type, @PathVariable("id") String id, ModelMap mmap) {
/* 146 */ long tableId = TableUtil.getTableIdByArchiveTypeId(archiveId); long tableId = TableUtil.getTableIdByArchiveTypeId(archiveId);
/* 147 */ mmap.put("tableId", Long.valueOf(tableId)); mmap.put("tableId", Long.valueOf(tableId));
/* 148 */ mmap.put("id", id); mmap.put("id", id);
/* 149 */ return this.prefix + "/uploadFile"; return this.prefix + "/uploadFile";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @PostMapping({"/fileUpload"}) @PostMapping({"/fileUpload"})
/* */ @ResponseBody @ResponseBody
/* */ public Map<String, Object> fileUpload(@RequestParam("file") MultipartFile[] files, long tableId, long id) { public Map<String, Object> fileUpload(@RequestParam("file") MultipartFile[] files, long tableId, long id) {
/* 163 */ Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
/* 164 */ boolean res = false; boolean res = false;
/* */ try { try {
/* 166 */ res = this.jsglService.uploadFile(files, tableId, id); res = this.jsglService.uploadFile(files, tableId, id);
/* 167 */ } catch (IOException e) { } catch (IOException e) {
/* 168 */ e.printStackTrace(); e.printStackTrace();
/* */ } }
/* */
/* 171 */ map.put("res", Boolean.valueOf(res)); map.put("res", Boolean.valueOf(res));
/* 172 */ return map; return map;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/appendAddForm/{archiveId}/{type}"}) @GetMapping({"/appendAddForm/{archiveId}/{type}"})
/* */ @ResponseBody @ResponseBody
/* */ public String appendAddForm(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type) { public String appendAddForm(@PathVariable("archiveId") String archiveId, @PathVariable("type") String type) {
/* 189 */ return this.jsglService.appendAddForm(archiveId, type); return this.jsglService.appendAddForm(archiveId, type);
/* */ } }
/* */
/* */
/* */ @Log(title = "接收管理-档案新增", businessType = BusinessType.INSERT) @Log(title = "接收管理-档案新增", businessType = BusinessType.INSERT)
/* */ @PostMapping({"/add"}) @PostMapping({"/add"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult addSave(@Validated String archiveStr, @Validated String archiveId, @Validated String type) { public AjaxResult addSave(@Validated String archiveStr, @Validated String archiveId, @Validated String type) {
/* 197 */ if (StringUtils.isEmpty(archiveStr)) { if (StringUtils.isEmpty(archiveStr)) {
/* 198 */ return error("提交数据为空,新增失败!"); return error("提交数据为空,新增失败!");
/* */ } }
/* */
/* */ try { try {
/* 202 */ boolean flag = this.jsglService.addSave(archiveStr, archiveId, type); boolean flag = this.jsglService.addSave(archiveStr, archiveId, type);
/* 203 */ if (flag) { if (flag) {
/* 204 */ return toAjax(true); return toAjax(true);
/* */ } }
/* 206 */ return toAjax(false); return toAjax(false);
/* */ } }
/* 208 */ catch (Exception e) { catch (Exception e) {
/* 209 */ e.printStackTrace(); e.printStackTrace();
/* 210 */ return toAjax(false); return toAjax(false);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */ @Log(title = "接收管理-档案修改", businessType = BusinessType.UPDATE) @Log(title = "接收管理-档案修改", businessType = BusinessType.UPDATE)
/* */ @PostMapping({"/update"}) @PostMapping({"/update"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult update(@Validated String archiveStr, @Validated String archiveTypeId, @Validated String type, @Validated String id) { public AjaxResult update(@Validated String archiveStr, @Validated String archiveTypeId, @Validated String type, @Validated String id) {
/* 221 */ if (StringUtils.isEmpty(archiveStr)) { if (StringUtils.isEmpty(archiveStr)) {
/* 222 */ return error("提交数据为空,新增失败!"); return error("提交数据为空,新增失败!");
/* */ } }
/* */
/* */ try { try {
/* 226 */ boolean flag = this.jsglService.update(archiveStr, archiveTypeId, type, id); boolean flag = this.jsglService.update(archiveStr, archiveTypeId, type, id);
/* 227 */ if (flag) { if (flag) {
/* 228 */ return toAjax(true); return toAjax(true);
/* */ } }
/* 230 */ return toAjax(false); return toAjax(false);
/* */ } }
/* 232 */ catch (Exception e) { catch (Exception e) {
/* 233 */ e.printStackTrace(); e.printStackTrace();
/* 234 */ return toAjax(false); return toAjax(false);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "接收管理-档案删除", businessType = BusinessType.DELETE) @Log(title = "接收管理-档案删除", businessType = BusinessType.DELETE)
/* */ @PostMapping({"/delete"}) @PostMapping({"/delete"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult delete(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) { public AjaxResult delete(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) {
/* 252 */ boolean flag = false; boolean flag = false;
/* */
/* */ try { try {
/* 255 */ String deleteType = this.configService.selectConfigByKey("archive.deleteDataType"); String deleteType = this.configService.selectConfigByKey("archive.deleteDataType");
/* 256 */ if (deleteType.equals("1")) { if (deleteType.equals("1")) {
/* */
/* 258 */ flag = this.jsglService.archiveLogicDelete(query, archiveTypeId, type, ids); flag = this.jsglService.archiveLogicDelete(query, archiveTypeId, type, ids);
/* 259 */ } else if (deleteType.equals("2")) { } else if (deleteType.equals("2")) {
/* */
/* 261 */ flag = this.jsglService.archivePhysicalDelete(query, archiveTypeId, type, ids); flag = this.jsglService.archivePhysicalDelete(query, archiveTypeId, type, ids);
/* */ } else { } else {
/* 263 */ return error("请在\"系统参数\"中配置\"档案条目删除方式\"!"); return error("请在\"系统参数\"中配置\"档案条目删除方式\"!");
/* */ } }
/* */
/* 266 */ } catch (Exception ex) { } catch (Exception ex) {
/* 267 */ System.out.println("档案删除出现异常:" + ex.getMessage()); System.out.println("档案删除出现异常:" + ex.getMessage());
/* 268 */ return error("删除失败!"); return error("删除失败!");
/* */ } }
/* 270 */ if (flag) { if (flag) {
/* 271 */ return success("删除成功!"); return success("删除成功!");
/* */ } }
/* 273 */ return error("删除失败!"); return error("删除失败!");
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "接收管理-整理入库", businessType = BusinessType.ZLRK) @Log(title = "接收管理-整理入库", businessType = BusinessType.ZLRK)
/* */ @PostMapping({"/zlrk"}) @PostMapping({"/zlrk"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult zlrk(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) { public AjaxResult zlrk(@Validated String query, @Validated String archiveTypeId, @Validated String type, @Validated String ids) {
/* 289 */ boolean flag = false; boolean flag = false;
/* */ try { try {
/* 291 */ flag = this.jsglService.rzlk(query, archiveTypeId, type, ids); flag = this.jsglService.rzlk(query, archiveTypeId, type, ids);
/* 292 */ } catch (Exception ex) { } catch (Exception ex) {
/* 293 */ System.out.println("入管理库出现异常:" + ex.getMessage()); System.out.println("入管理库出现异常:" + ex.getMessage());
/* 294 */ return error("入管理库失败!"); return error("入管理库失败!");
/* */ } }
/* 296 */ if (flag) { if (flag) {
/* 297 */ return success("入管理库成功!"); return success("入管理库成功!");
/* */ } }
/* 299 */ return error("入管理库失败!"); return error("入管理库失败!");
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/appendAddFormByDataId/{archiveTypeId}/{type}/{id}/{readOnly}"}) @GetMapping({"/appendAddFormByDataId/{archiveTypeId}/{type}/{id}/{readOnly}"})
/* */ @ResponseBody @ResponseBody
/* */ public String appendAddFormByDataId(@PathVariable("archiveTypeId") String archiveTypeId, @PathVariable("type") String type, @PathVariable("id") String id, @PathVariable("readOnly") String readOnly) { public String appendAddFormByDataId(@PathVariable("archiveTypeId") String archiveTypeId, @PathVariable("type") String type, @PathVariable("id") String id, @PathVariable("readOnly") String readOnly) {
/* 314 */ return this.jsglService.appendAddFormByDataId(archiveTypeId, type, id, readOnly); return this.jsglService.appendAddFormByDataId(archiveTypeId, type, id, readOnly);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/folderFile/{archiveId}/{id}"}) @GetMapping({"/folderFile/{archiveId}/{id}"})
/* */ public String folderFile(@PathVariable("archiveId") String archiveId, @PathVariable("id") String id, ModelMap mmap) { public String folderFile(@PathVariable("archiveId") String archiveId, @PathVariable("id") String id, ModelMap mmap) {
/* 327 */ mmap.put("archiveId", archiveId); mmap.put("archiveId", archiveId);
/* 328 */ mmap.put("folderId", id); mmap.put("folderId", id);
/* */
/* 330 */ DictType dictType = new DictType(); dictType.setLabel("column_bind"); DictType dictType = new DictType(); dictType.setLabel("column_bind");
/* 331 */ List<DictType> dictTypeList = this.dictTypeService.selectDictTypeList(dictType); List<DictType> dictTypeList = this.dictTypeService.selectDictTypeList(dictType);
/* 332 */ Map<String, List<DictData>> dictDataMap = new HashMap<>(); Map<String, List<DictData>> dictDataMap = new HashMap<>();
/* 333 */ for (DictType dictTypeTemp : dictTypeList) { for (DictType dictTypeTemp : dictTypeList) {
/* 334 */ List<DictData> dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType()); List<DictData> dictDatas = this.dictTypeService.selectDictDataByType(dictTypeTemp.getDictType());
/* 335 */ dictDataMap.put(dictTypeTemp.getDictType(), dictDatas); dictDataMap.put(dictTypeTemp.getDictType(), dictDatas);
/* */ } }
/* 337 */ mmap.put("dictDataMap", dictDataMap); mmap.put("dictDataMap", dictDataMap);
/* 338 */ return this.prefix + "/jnwj"; return this.prefix + "/jnwj";
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\jsgl\controller\JsglController.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\jsgl\controller\JsglController.class

@ -1,182 +1,182 @@
/* */ package com.archive.project.monitor.job.controller package com.archive.project.monitor.job.controller
; ;
/* */
/* */ import com.archive.common.exception.job.TaskException; import com.archive.common.exception.job.TaskException;
/* */ import com.archive.common.utils.poi.ExcelUtil; import com.archive.common.utils.poi.ExcelUtil;
/* */ import com.archive.common.utils.security.ShiroUtils; import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.framework.aspectj.lang.annotation.Log; import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; import com.archive.framework.aspectj.lang.enums.BusinessType;
/* */ import com.archive.framework.web.controller.BaseController; import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult; import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.framework.web.page.TableDataInfo; import com.archive.framework.web.page.TableDataInfo;
/* */ import com.archive.project.monitor.job.domain.Job; import com.archive.project.monitor.job.domain.Job;
/* */ import com.archive.project.monitor.job.service.IJobService; import com.archive.project.monitor.job.service.IJobService;
/* */ import com.archive.project.monitor.job.util.CronUtils; import com.archive.project.monitor.job.util.CronUtils;
/* */ import java.util.List; import java.util.List;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.quartz.SchedulerException; import org.quartz.SchedulerException;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
/* */ import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
/* */ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
/* */ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */ @Controller @Controller
/* */ @RequestMapping({"/monitor/job"}) @RequestMapping({"/monitor/job"})
/* */ public class JobController public class JobController
/* */ extends BaseController extends BaseController
/* */ { {
/* 36 */ private String prefix = "monitor/job"; private String prefix = "monitor/job";
/* */
/* */ @Autowired @Autowired
/* */ private IJobService jobService; private IJobService jobService;
/* */
/* */
/* */ @RequiresPermissions({"monitor:job:view"}) @RequiresPermissions({"monitor:job:view"})
/* */ @GetMapping @GetMapping
/* */ public String job() { public String job() {
/* 45 */ return this.prefix + "/job"; return this.prefix + "/job";
/* */ } }
/* */
/* */
/* */ @RequiresPermissions({"monitor:job:list"}) @RequiresPermissions({"monitor:job:list"})
/* */ @PostMapping({"/list"}) @PostMapping({"/list"})
/* */ @ResponseBody @ResponseBody
/* */ public TableDataInfo list(Job job) { public TableDataInfo list(Job job) {
/* 53 */ startPage(); startPage();
/* 54 */ List<Job> list = this.jobService.selectJobList(job); List<Job> list = this.jobService.selectJobList(job);
/* 55 */ return getDataTable(list); return getDataTable(list);
/* */ } }
/* */
/* */
/* */ @Log(title = "定时任务", businessType = BusinessType.EXPORT) @Log(title = "定时任务", businessType = BusinessType.EXPORT)
/* */ @RequiresPermissions({"monitor:job:export"}) @RequiresPermissions({"monitor:job:export"})
/* */ @PostMapping({"/export"}) @PostMapping({"/export"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult export(Job job) { public AjaxResult export(Job job) {
/* 64 */ List<Job> list = this.jobService.selectJobList(job); List<Job> list = this.jobService.selectJobList(job);
/* 65 */ ExcelUtil<Job> util = new ExcelUtil(Job.class); ExcelUtil<Job> util = new ExcelUtil(Job.class);
/* 66 */ return util.exportExcel(list, "定时任务"); return util.exportExcel(list, "定时任务");
/* */ } }
/* */
/* */
/* */ @Log(title = "定时任务", businessType = BusinessType.DELETE) @Log(title = "定时任务", businessType = BusinessType.DELETE)
/* */ @RequiresPermissions({"monitor:job:remove"}) @RequiresPermissions({"monitor:job:remove"})
/* */ @PostMapping({"/remove"}) @PostMapping({"/remove"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult remove(String ids) throws SchedulerException { public AjaxResult remove(String ids) throws SchedulerException {
/* 75 */ this.jobService.deleteJobByIds(ids); this.jobService.deleteJobByIds(ids);
/* 76 */ return success(); return success();
/* */ } }
/* */
/* */
/* */ @RequiresPermissions({"monitor:job:detail"}) @RequiresPermissions({"monitor:job:detail"})
/* */ @GetMapping({"/detail/{jobId}"}) @GetMapping({"/detail/{jobId}"})
/* */ public String detail(@PathVariable("jobId") Long jobId, ModelMap mmap) { public String detail(@PathVariable("jobId") Long jobId, ModelMap mmap) {
/* 83 */ mmap.put("name", "job"); mmap.put("name", "job");
/* 84 */ mmap.put("job", this.jobService.selectJobById(jobId)); mmap.put("job", this.jobService.selectJobById(jobId));
/* 85 */ return this.prefix + "/detail"; return this.prefix + "/detail";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "定时任务", businessType = BusinessType.UPDATE) @Log(title = "定时任务", businessType = BusinessType.UPDATE)
/* */ @RequiresPermissions({"monitor:job:changeStatus"}) @RequiresPermissions({"monitor:job:changeStatus"})
/* */ @PostMapping({"/changeStatus"}) @PostMapping({"/changeStatus"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult changeStatus(Job job) throws SchedulerException { public AjaxResult changeStatus(Job job) throws SchedulerException {
/* 97 */ Job newJob = this.jobService.selectJobById(job.getJobId()); Job newJob = this.jobService.selectJobById(job.getJobId());
/* 98 */ newJob.setStatus(job.getStatus()); newJob.setStatus(job.getStatus());
/* 99 */ return toAjax(this.jobService.changeStatus(newJob)); return toAjax(this.jobService.changeStatus(newJob));
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "定时任务", businessType = BusinessType.UPDATE) @Log(title = "定时任务", businessType = BusinessType.UPDATE)
/* */ @RequiresPermissions({"monitor:job:changeStatus"}) @RequiresPermissions({"monitor:job:changeStatus"})
/* */ @PostMapping({"/run"}) @PostMapping({"/run"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult run(Job job) throws SchedulerException { public AjaxResult run(Job job) throws SchedulerException {
/* 111 */ this.jobService.run(job); this.jobService.run(job);
/* 112 */ return success(); return success();
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/add"}) @GetMapping({"/add"})
/* */ public String add() { public String add() {
/* 121 */ return this.prefix + "/add"; return this.prefix + "/add";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "定时任务", businessType = BusinessType.INSERT) @Log(title = "定时任务", businessType = BusinessType.INSERT)
/* */ @RequiresPermissions({"monitor:job:add"}) @RequiresPermissions({"monitor:job:add"})
/* */ @PostMapping({"/add"}) @PostMapping({"/add"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult addSave(@Validated Job job) throws SchedulerException, TaskException { public AjaxResult addSave(@Validated Job job) throws SchedulerException, TaskException {
/* 133 */ if (!CronUtils.isValid(job.getCronExpression())) if (!CronUtils.isValid(job.getCronExpression()))
/* */ { {
/* 135 */ return AjaxResult.error("cron表达式不正确"); return AjaxResult.error("cron表达式不正确");
/* */ } }
/* 137 */ job.setCreateBy(ShiroUtils.getLoginName()); job.setCreateBy(ShiroUtils.getLoginName());
/* 138 */ return toAjax(this.jobService.insertJob(job)); return toAjax(this.jobService.insertJob(job));
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/edit/{jobId}"}) @GetMapping({"/edit/{jobId}"})
/* */ public String edit(@PathVariable("jobId") Long jobId, ModelMap mmap) { public String edit(@PathVariable("jobId") Long jobId, ModelMap mmap) {
/* 147 */ mmap.put("job", this.jobService.selectJobById(jobId)); mmap.put("job", this.jobService.selectJobById(jobId));
/* 148 */ return this.prefix + "/edit"; return this.prefix + "/edit";
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "定时任务", businessType = BusinessType.UPDATE) @Log(title = "定时任务", businessType = BusinessType.UPDATE)
/* */ @RequiresPermissions({"monitor:job:edit"}) @RequiresPermissions({"monitor:job:edit"})
/* */ @PostMapping({"/edit"}) @PostMapping({"/edit"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult editSave(@Validated Job job) throws SchedulerException, TaskException { public AjaxResult editSave(@Validated Job job) throws SchedulerException, TaskException {
/* 160 */ if (!CronUtils.isValid(job.getCronExpression())) if (!CronUtils.isValid(job.getCronExpression()))
/* */ { {
/* 162 */ return AjaxResult.error("cron表达式不正确"); return AjaxResult.error("cron表达式不正确");
/* */ } }
/* 164 */ job.setUpdateBy(ShiroUtils.getLoginName()); job.setUpdateBy(ShiroUtils.getLoginName());
/* 165 */ return toAjax(this.jobService.updateJob(job)); return toAjax(this.jobService.updateJob(job));
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ @PostMapping({"/checkCronExpressionIsValid"}) @PostMapping({"/checkCronExpressionIsValid"})
/* */ @ResponseBody @ResponseBody
/* */ public boolean checkCronExpressionIsValid(Job job) { public boolean checkCronExpressionIsValid(Job job) {
/* 175 */ return this.jobService.checkCronExpressionIsValid(job.getCronExpression()); return this.jobService.checkCronExpressionIsValid(job.getCronExpression());
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\controller\JobController.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\controller\JobController.class

@ -1,108 +1,108 @@
/* */ package com.archive.project.monitor.job.controller package com.archive.project.monitor.job.controller
; ;
/* */
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.poi.ExcelUtil; import com.archive.common.utils.poi.ExcelUtil;
/* */ import com.archive.framework.aspectj.lang.annotation.Log; import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType; import com.archive.framework.aspectj.lang.enums.BusinessType;
/* */ import com.archive.framework.web.controller.BaseController; import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult; import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.framework.web.page.TableDataInfo; import com.archive.framework.web.page.TableDataInfo;
/* */ import com.archive.project.monitor.job.domain.Job; import com.archive.project.monitor.job.domain.Job;
/* */ import com.archive.project.monitor.job.domain.JobLog; import com.archive.project.monitor.job.domain.JobLog;
/* */ import com.archive.project.monitor.job.service.IJobLogService; import com.archive.project.monitor.job.service.IJobLogService;
/* */ import com.archive.project.monitor.job.service.IJobService; import com.archive.project.monitor.job.service.IJobService;
/* */ import java.util.List; import java.util.List;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
/* */ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
/* */ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
/* */ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */ @Controller @Controller
/* */ @RequestMapping({"/monitor/jobLog"}) @RequestMapping({"/monitor/jobLog"})
/* */ public class JobLogController public class JobLogController
/* */ extends BaseController extends BaseController
/* */ { {
/* 35 */ private String prefix = "monitor/job"; private String prefix = "monitor/job";
/* */
/* */ @Autowired @Autowired
/* */ private IJobService jobService; private IJobService jobService;
/* */
/* */ @Autowired @Autowired
/* */ private IJobLogService jobLogService; private IJobLogService jobLogService;
/* */
/* */
/* */ @RequiresPermissions({"monitor:job:view"}) @RequiresPermissions({"monitor:job:view"})
/* */ @GetMapping @GetMapping
/* */ public String jobLog(@RequestParam(value = "jobId", required = false) Long jobId, ModelMap mmap) { public String jobLog(@RequestParam(value = "jobId", required = false) Long jobId, ModelMap mmap) {
/* 47 */ if (StringUtils.isNotNull(jobId)) { if (StringUtils.isNotNull(jobId)) {
/* */
/* 49 */ Job job = this.jobService.selectJobById(jobId); Job job = this.jobService.selectJobById(jobId);
/* 50 */ mmap.put("job", job); mmap.put("job", job);
/* */ } }
/* 52 */ return this.prefix + "/jobLog"; return this.prefix + "/jobLog";
/* */ } }
/* */
/* */
/* */ @RequiresPermissions({"monitor:job:list"}) @RequiresPermissions({"monitor:job:list"})
/* */ @PostMapping({"/list"}) @PostMapping({"/list"})
/* */ @ResponseBody @ResponseBody
/* */ public TableDataInfo list(JobLog jobLog) { public TableDataInfo list(JobLog jobLog) {
/* 60 */ startPage(); startPage();
/* 61 */ List<JobLog> list = this.jobLogService.selectJobLogList(jobLog); List<JobLog> list = this.jobLogService.selectJobLogList(jobLog);
/* 62 */ return getDataTable(list); return getDataTable(list);
/* */ } }
/* */
/* */
/* */ @Log(title = "调度日志", businessType = BusinessType.EXPORT) @Log(title = "调度日志", businessType = BusinessType.EXPORT)
/* */ @RequiresPermissions({"monitor:job:export"}) @RequiresPermissions({"monitor:job:export"})
/* */ @PostMapping({"/export"}) @PostMapping({"/export"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult export(JobLog jobLog) { public AjaxResult export(JobLog jobLog) {
/* 71 */ List<JobLog> list = this.jobLogService.selectJobLogList(jobLog); List<JobLog> list = this.jobLogService.selectJobLogList(jobLog);
/* 72 */ ExcelUtil<JobLog> util = new ExcelUtil(JobLog.class); ExcelUtil<JobLog> util = new ExcelUtil(JobLog.class);
/* 73 */ return util.exportExcel(list, "调度日志"); return util.exportExcel(list, "调度日志");
/* */ } }
/* */
/* */
/* */ @Log(title = "调度日志", businessType = BusinessType.DELETE) @Log(title = "调度日志", businessType = BusinessType.DELETE)
/* */ @RequiresPermissions({"monitor:job:remove"}) @RequiresPermissions({"monitor:job:remove"})
/* */ @PostMapping({"/remove"}) @PostMapping({"/remove"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult remove(String ids) { public AjaxResult remove(String ids) {
/* 82 */ return toAjax(this.jobLogService.deleteJobLogByIds(ids)); return toAjax(this.jobLogService.deleteJobLogByIds(ids));
/* */ } }
/* */
/* */
/* */ @RequiresPermissions({"monitor:job:detail"}) @RequiresPermissions({"monitor:job:detail"})
/* */ @GetMapping({"/detail/{jobLogId}"}) @GetMapping({"/detail/{jobLogId}"})
/* */ public String detail(@PathVariable("jobLogId") Long jobLogId, ModelMap mmap) { public String detail(@PathVariable("jobLogId") Long jobLogId, ModelMap mmap) {
/* 89 */ mmap.put("name", "jobLog"); mmap.put("name", "jobLog");
/* 90 */ mmap.put("jobLog", this.jobLogService.selectJobLogById(jobLogId)); mmap.put("jobLog", this.jobLogService.selectJobLogById(jobLogId));
/* 91 */ return this.prefix + "/detail"; return this.prefix + "/detail";
/* */ } }
/* */
/* */
/* */ @Log(title = "调度日志", businessType = BusinessType.CLEAN) @Log(title = "调度日志", businessType = BusinessType.CLEAN)
/* */ @RequiresPermissions({"monitor:job:remove"}) @RequiresPermissions({"monitor:job:remove"})
/* */ @PostMapping({"/clean"}) @PostMapping({"/clean"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult clean() { public AjaxResult clean() {
/* 100 */ this.jobLogService.cleanJobLog(); this.jobLogService.cleanJobLog();
/* 101 */ return success(); return success();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\controller\JobLogController.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\controller\JobLogController.class

@ -1,174 +1,174 @@
/* */ package com.archive.project.monitor.job.domain package com.archive.project.monitor.job.domain
; ;
/* */
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import com.archive.framework.aspectj.lang.annotation.ColumnType; import com.archive.framework.aspectj.lang.annotation.ColumnType;
import com.archive.framework.aspectj.lang.annotation.Excel; import com.archive.framework.aspectj.lang.annotation.Excel;
/* */ import com.archive.framework.web.domain.BaseEntity; import com.archive.framework.web.domain.BaseEntity;
/* */ import com.archive.project.monitor.job.util.CronUtils; import com.archive.project.monitor.job.util.CronUtils;
/* */ import java.io.Serializable; import java.io.Serializable;
/* */ import java.util.Date; import java.util.Date;
/* */ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
/* */ import javax.validation.constraints.Size; import javax.validation.constraints.Size;
/* */ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
/* */ import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Job public class Job
/* */ extends BaseEntity extends BaseEntity
/* */ implements Serializable implements Serializable
/* */ { {
/* */ private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/* */ @Excel(name = "任务序号", cellType = ColumnType.NUMERIC) @Excel(name = "任务序号", cellType = ColumnType.NUMERIC)
/* */ private Long jobId; private Long jobId;
/* */ @Excel(name = "任务名称") @Excel(name = "任务名称")
/* */ private String jobName; private String jobName;
/* */ @Excel(name = "任务组名") @Excel(name = "任务组名")
/* */ private String jobGroup; private String jobGroup;
/* */ @Excel(name = "调用目标字符串") @Excel(name = "调用目标字符串")
/* */ private String invokeTarget; private String invokeTarget;
/* */ @Excel(name = "执行表达式 ") @Excel(name = "执行表达式 ")
/* */ private String cronExpression; private String cronExpression;
/* */ @Excel(name = "计划策略 ", readConverterExp = "0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行") @Excel(name = "计划策略 ", readConverterExp = "0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行")
/* 45 */ private String misfirePolicy = "0"; private String misfirePolicy = "0";
/* */
/* */
/* */ @Excel(name = "并发执行", readConverterExp = "0=允许,1=禁止") @Excel(name = "并发执行", readConverterExp = "0=允许,1=禁止")
/* */ private String concurrent; private String concurrent;
/* */
/* */
/* */ @Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停") @Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停")
/* */ private String status; private String status;
/* */
/* */
/* */
/* */ public Long getJobId() { public Long getJobId() {
/* 58 */ return this.jobId; return this.jobId;
/* */ } }
/* */
/* */
/* */ public void setJobId(Long jobId) { public void setJobId(Long jobId) {
/* 63 */ this.jobId = jobId; this.jobId = jobId;
/* */ } }
/* */
/* */
/* */ @NotBlank(message = "任务名称不能为空") @NotBlank(message = "任务名称不能为空")
/* */ @Size(min = 0, max = 64, message = "任务名称不能超过64个字符") @Size(min = 0, max = 64, message = "任务名称不能超过64个字符")
/* */ public String getJobName() { public String getJobName() {
/* 70 */ return this.jobName; return this.jobName;
/* */ } }
/* */
/* */
/* */ public void setJobName(String jobName) { public void setJobName(String jobName) {
/* 75 */ this.jobName = jobName; this.jobName = jobName;
/* */ } }
/* */
/* */
/* */ public String getJobGroup() { public String getJobGroup() {
/* 80 */ return this.jobGroup; return this.jobGroup;
/* */ } }
/* */
/* */
/* */ public void setJobGroup(String jobGroup) { public void setJobGroup(String jobGroup) {
/* 85 */ this.jobGroup = jobGroup; this.jobGroup = jobGroup;
/* */ } }
/* */
/* */
/* */ @NotBlank(message = "调用目标字符串不能为空") @NotBlank(message = "调用目标字符串不能为空")
/* */ @Size(min = 0, max = 1000, message = "调用目标字符串长度不能超过500个字符") @Size(min = 0, max = 1000, message = "调用目标字符串长度不能超过500个字符")
/* */ public String getInvokeTarget() { public String getInvokeTarget() {
/* 92 */ return this.invokeTarget; return this.invokeTarget;
/* */ } }
/* */
/* */
/* */ public void setInvokeTarget(String invokeTarget) { public void setInvokeTarget(String invokeTarget) {
/* 97 */ this.invokeTarget = invokeTarget; this.invokeTarget = invokeTarget;
/* */ } }
/* */
/* */
/* */ @NotBlank(message = "Cron执行表达式不能为空") @NotBlank(message = "Cron执行表达式不能为空")
/* */ @Size(min = 0, max = 255, message = "Cron执行表达式不能超过255个字符") @Size(min = 0, max = 255, message = "Cron执行表达式不能超过255个字符")
/* */ public String getCronExpression() { public String getCronExpression() {
/* 104 */ return this.cronExpression; return this.cronExpression;
/* */ } }
/* */
/* */
/* */ public void setCronExpression(String cronExpression) { public void setCronExpression(String cronExpression) {
/* 109 */ this.cronExpression = cronExpression; this.cronExpression = cronExpression;
/* */ } }
/* */
/* */
/* */ public Date getNextValidTime() { public Date getNextValidTime() {
/* 114 */ if (StringUtils.isNotEmpty(this.cronExpression)) if (StringUtils.isNotEmpty(this.cronExpression))
/* */ { {
/* 116 */ return CronUtils.getNextExecution(this.cronExpression); return CronUtils.getNextExecution(this.cronExpression);
/* */ } }
/* 118 */ return null; return null;
/* */ } }
/* */
/* */
/* */ public String getMisfirePolicy() { public String getMisfirePolicy() {
/* 123 */ return this.misfirePolicy; return this.misfirePolicy;
/* */ } }
/* */
/* */
/* */ public void setMisfirePolicy(String misfirePolicy) { public void setMisfirePolicy(String misfirePolicy) {
/* 128 */ this.misfirePolicy = misfirePolicy; this.misfirePolicy = misfirePolicy;
/* */ } }
/* */
/* */
/* */ public String getConcurrent() { public String getConcurrent() {
/* 133 */ return this.concurrent; return this.concurrent;
/* */ } }
/* */
/* */
/* */ public void setConcurrent(String concurrent) { public void setConcurrent(String concurrent) {
/* 138 */ this.concurrent = concurrent; this.concurrent = concurrent;
/* */ } }
/* */
/* */
/* */ public String getStatus() { public String getStatus() {
/* 143 */ return this.status; return this.status;
/* */ } }
/* */
/* */
/* */ public void setStatus(String status) { public void setStatus(String status) {
/* 148 */ this.status = status; this.status = status;
/* */ } }
/* */
/* */ @Override @Override
/* */ public String toString() { public String toString() {
/* 153 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 154 */ .append("jobId", getJobId()) .append("jobId", getJobId())
/* 155 */ .append("jobName", getJobName()) .append("jobName", getJobName())
/* 156 */ .append("jobGroup", getJobGroup()) .append("jobGroup", getJobGroup())
/* 157 */ .append("cronExpression", getCronExpression()) .append("cronExpression", getCronExpression())
/* 158 */ .append("nextValidTime", getNextValidTime()) .append("nextValidTime", getNextValidTime())
/* 159 */ .append("misfirePolicy", getMisfirePolicy()) .append("misfirePolicy", getMisfirePolicy())
/* 160 */ .append("concurrent", getConcurrent()) .append("concurrent", getConcurrent())
/* 161 */ .append("status", getStatus()) .append("status", getStatus())
/* 162 */ .append("createBy", getCreateBy()) .append("createBy", getCreateBy())
/* 163 */ .append("createTime", getCreateTime()) .append("createTime", getCreateTime())
/* 164 */ .append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
/* 165 */ .append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
/* 166 */ .append("remark", getRemark()) .append("remark", getRemark())
/* 167 */ .toString(); .toString();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\domain\Job.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\domain\Job.class

@ -1,158 +1,158 @@
/* */ package com.archive.project.monitor.job.domain; package com.archive.project.monitor.job.domain;
/* */
/* */ import com.archive.framework.aspectj.lang.annotation.Excel; import com.archive.framework.aspectj.lang.annotation.Excel;
/* */ import com.archive.framework.web.domain.BaseEntity; import com.archive.framework.web.domain.BaseEntity;
/* */ import java.util.Date; import java.util.Date;
/* */ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
/* */ import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class JobLog public class JobLog
/* */ extends BaseEntity extends BaseEntity
/* */ { {
/* */ private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/* */ @Excel(name = "日志序号") @Excel(name = "日志序号")
/* */ private Long jobLogId; private Long jobLogId;
/* */ @Excel(name = "任务名称") @Excel(name = "任务名称")
/* */ private String jobName; private String jobName;
/* */ @Excel(name = "任务组名") @Excel(name = "任务组名")
/* */ private String jobGroup; private String jobGroup;
/* */ @Excel(name = "调用目标字符串") @Excel(name = "调用目标字符串")
/* */ private String invokeTarget; private String invokeTarget;
/* */ @Excel(name = "日志信息") @Excel(name = "日志信息")
/* */ private String jobMessage; private String jobMessage;
/* */ @Excel(name = "执行状态", readConverterExp = "0=正常,1=失败") @Excel(name = "执行状态", readConverterExp = "0=正常,1=失败")
/* */ private String status; private String status;
/* */ @Excel(name = "异常信息") @Excel(name = "异常信息")
/* */ private String exceptionInfo; private String exceptionInfo;
/* */ private Date startTime; private Date startTime;
/* */ private Date endTime; private Date endTime;
/* */
/* */ public Long getJobLogId() { public Long getJobLogId() {
/* 54 */ return this.jobLogId; return this.jobLogId;
/* */ } }
/* */
/* */
/* */ public void setJobLogId(Long jobLogId) { public void setJobLogId(Long jobLogId) {
/* 59 */ this.jobLogId = jobLogId; this.jobLogId = jobLogId;
/* */ } }
/* */
/* */
/* */ public String getJobName() { public String getJobName() {
/* 64 */ return this.jobName; return this.jobName;
/* */ } }
/* */
/* */
/* */ public void setJobName(String jobName) { public void setJobName(String jobName) {
/* 69 */ this.jobName = jobName; this.jobName = jobName;
/* */ } }
/* */
/* */
/* */ public String getJobGroup() { public String getJobGroup() {
/* 74 */ return this.jobGroup; return this.jobGroup;
/* */ } }
/* */
/* */
/* */ public void setJobGroup(String jobGroup) { public void setJobGroup(String jobGroup) {
/* 79 */ this.jobGroup = jobGroup; this.jobGroup = jobGroup;
/* */ } }
/* */
/* */
/* */ public String getInvokeTarget() { public String getInvokeTarget() {
/* 84 */ return this.invokeTarget; return this.invokeTarget;
/* */ } }
/* */
/* */
/* */ public void setInvokeTarget(String invokeTarget) { public void setInvokeTarget(String invokeTarget) {
/* 89 */ this.invokeTarget = invokeTarget; this.invokeTarget = invokeTarget;
/* */ } }
/* */
/* */
/* */ public String getJobMessage() { public String getJobMessage() {
/* 94 */ return this.jobMessage; return this.jobMessage;
/* */ } }
/* */
/* */
/* */ public void setJobMessage(String jobMessage) { public void setJobMessage(String jobMessage) {
/* 99 */ this.jobMessage = jobMessage; this.jobMessage = jobMessage;
/* */ } }
/* */
/* */
/* */ public String getStatus() { public String getStatus() {
/* 104 */ return this.status; return this.status;
/* */ } }
/* */
/* */
/* */ public void setStatus(String status) { public void setStatus(String status) {
/* 109 */ this.status = status; this.status = status;
/* */ } }
/* */
/* */
/* */ public String getExceptionInfo() { public String getExceptionInfo() {
/* 114 */ return this.exceptionInfo; return this.exceptionInfo;
/* */ } }
/* */
/* */
/* */ public void setExceptionInfo(String exceptionInfo) { public void setExceptionInfo(String exceptionInfo) {
/* 119 */ this.exceptionInfo = exceptionInfo; this.exceptionInfo = exceptionInfo;
/* */ } }
/* */
/* */
/* */ public Date getStartTime() { public Date getStartTime() {
/* 124 */ return this.startTime; return this.startTime;
/* */ } }
/* */
/* */
/* */ public void setStartTime(Date startTime) { public void setStartTime(Date startTime) {
/* 129 */ this.startTime = startTime; this.startTime = startTime;
/* */ } }
/* */
/* */
/* */ public Date getEndTime() { public Date getEndTime() {
/* 134 */ return this.endTime; return this.endTime;
/* */ } }
/* */
/* */
/* */ public void setEndTime(Date endTime) { public void setEndTime(Date endTime) {
/* 139 */ this.endTime = endTime; this.endTime = endTime;
/* */ } }
/* */
/* */
/* */ public String toString() { public String toString() {
/* 144 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 145 */ .append("jobLogId", getJobLogId()) .append("jobLogId", getJobLogId())
/* 146 */ .append("jobName", getJobName()) .append("jobName", getJobName())
/* 147 */ .append("jobGroup", getJobGroup()) .append("jobGroup", getJobGroup())
/* 148 */ .append("jobMessage", getJobMessage()) .append("jobMessage", getJobMessage())
/* 149 */ .append("status", getStatus()) .append("status", getStatus())
/* 150 */ .append("exceptionInfo", getExceptionInfo()) .append("exceptionInfo", getExceptionInfo())
/* 151 */ .append("startTime", getStartTime()) .append("startTime", getStartTime())
/* 152 */ .append("endTime", getEndTime()) .append("endTime", getEndTime())
/* 153 */ .toString(); .toString();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\domain\JobLog.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\domain\JobLog.class

@ -1,102 +1,102 @@
/* */ package com.archive.project.monitor.job.service package com.archive.project.monitor.job.service
; ;
/* */
/* */ import com.archive.common.utils.text.Convert; import com.archive.common.utils.text.Convert;
/* */ import com.archive.framework.config.ArchiveConfig; import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.project.monitor.job.domain.JobLog; import com.archive.project.monitor.job.domain.JobLog;
/* */ import com.archive.project.monitor.job.mapper.JobLogMapper; import com.archive.project.monitor.job.mapper.JobLogMapper;
/* */ import com.archive.project.monitor.job.service.IJobLogService; import com.archive.project.monitor.job.service.IJobLogService;
/* */ import java.util.List; import java.util.List;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service @Service
/* */ public class JobLogServiceImpl public class JobLogServiceImpl
/* */ implements IJobLogService implements IJobLogService
/* */ { {
/* */ @Autowired @Autowired
/* */ private JobLogMapper jobLogMapper; private JobLogMapper jobLogMapper;
/* */ @Autowired @Autowired
/* */ private ArchiveConfig archiveConfig; private ArchiveConfig archiveConfig;
/* */
/* */ public List<JobLog> selectJobLogList(JobLog jobLog) { public List<JobLog> selectJobLogList(JobLog jobLog) {
/* 36 */ return this.jobLogMapper.selectJobLogList(jobLog); return this.jobLogMapper.selectJobLogList(jobLog);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public JobLog selectJobLogById(Long jobLogId) { public JobLog selectJobLogById(Long jobLogId) {
/* 48 */ return this.jobLogMapper.selectJobLogById(jobLogId); return this.jobLogMapper.selectJobLogById(jobLogId);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void addJobLog(JobLog jobLog) { public void addJobLog(JobLog jobLog) {
/* 59 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 60 */ this.jobLogMapper.insertJobLog(jobLog); this.jobLogMapper.insertJobLog(jobLog);
/* 61 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 62 */ this.jobLogMapper.insertJobLogSqlite(jobLog); this.jobLogMapper.insertJobLogSqlite(jobLog);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteJobLogByIds(String ids) { public int deleteJobLogByIds(String ids) {
/* 76 */ return this.jobLogMapper.deleteJobLogByIds(Convert.toStrArray(ids)); return this.jobLogMapper.deleteJobLogByIds(Convert.toStrArray(ids));
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteJobLogById(Long jobId) { public int deleteJobLogById(Long jobId) {
/* 87 */ return this.jobLogMapper.deleteJobLogById(jobId); return this.jobLogMapper.deleteJobLogById(jobId);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void cleanJobLog() { public void cleanJobLog() {
/* 96 */ this.jobLogMapper.cleanJobLog(); this.jobLogMapper.cleanJobLog();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\service\JobLogServiceImpl.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\service\JobLogServiceImpl.class

@ -1,303 +1,303 @@
/* */ package com.archive.project.monitor.job.service package com.archive.project.monitor.job.service
; ;
/* */
/* */ import com.archive.common.constant.ScheduleConstants; import com.archive.common.constant.ScheduleConstants;
/* */ import com.archive.common.constant.Status; import com.archive.common.constant.Status;
import com.archive.common.exception.job.TaskException; import com.archive.common.exception.job.TaskException;
/* */ import com.archive.common.utils.text.Convert; import com.archive.common.utils.text.Convert;
/* */ import com.archive.framework.config.ArchiveConfig; import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.project.monitor.job.domain.Job; import com.archive.project.monitor.job.domain.Job;
/* */ import com.archive.project.monitor.job.mapper.JobMapper; import com.archive.project.monitor.job.mapper.JobMapper;
/* */ import com.archive.project.monitor.job.service.IJobService; import com.archive.project.monitor.job.service.IJobService;
/* */ import com.archive.project.monitor.job.util.CronUtils; import com.archive.project.monitor.job.util.CronUtils;
/* */ import com.archive.project.monitor.job.util.ScheduleUtils; import com.archive.project.monitor.job.util.ScheduleUtils;
/* */ import java.util.List; import java.util.List;
/* */ import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
/* */ import org.quartz.JobDataMap; import org.quartz.JobDataMap;
/* */ import org.quartz.JobKey; import org.quartz.JobKey;
/* */ import org.quartz.Scheduler; import org.quartz.Scheduler;
/* */ import org.quartz.SchedulerException; import org.quartz.SchedulerException;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/* */ import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service @Service
/* */ public class JobServiceImpl public class JobServiceImpl
/* */ implements IJobService implements IJobService
/* */ { {
/* */ @Autowired @Autowired
/* */ private Scheduler scheduler; private Scheduler scheduler;
/* */ @Autowired @Autowired
/* */ private JobMapper jobMapper; private JobMapper jobMapper;
/* */ @Autowired @Autowired
/* */ private ArchiveConfig archiveConfig; private ArchiveConfig archiveConfig;
/* */
/* */ @PostConstruct @PostConstruct
/* */ public void init() throws SchedulerException, TaskException { public void init() throws SchedulerException, TaskException {
/* 47 */ this.scheduler.clear(); this.scheduler.clear();
/* 48 */ List<Job> jobList = this.jobMapper.selectJobAll(); List<Job> jobList = this.jobMapper.selectJobAll();
/* 49 */ for (Job job : jobList) for (Job job : jobList)
/* */ { {
/* 51 */ ScheduleUtils.createScheduleJob(this.scheduler, job); ScheduleUtils.createScheduleJob(this.scheduler, job);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ public List<Job> selectJobList(Job job) { public List<Job> selectJobList(Job job) {
/* 64 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 65 */ return this.jobMapper.selectJobList(job); return this.jobMapper.selectJobList(job);
/* */ } }
/* 67 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 68 */ return this.jobMapper.selectJobListSqlite(job); return this.jobMapper.selectJobListSqlite(job);
/* */ } }
/* 70 */ return this.jobMapper.selectJobList(job); return this.jobMapper.selectJobList(job);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ public Job selectJobById(Long jobId) { public Job selectJobById(Long jobId) {
/* 84 */ return this.jobMapper.selectJobById(jobId); return this.jobMapper.selectJobById(jobId);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ @Transactional @Transactional
/* */ public int pauseJob(Job job) throws SchedulerException { public int pauseJob(Job job) throws SchedulerException {
/* 96 */ Long jobId = job.getJobId(); Long jobId = job.getJobId();
/* 97 */ String jobGroup = job.getJobGroup(); String jobGroup = job.getJobGroup();
/* 98 */ job.setStatus(Status.PAUSE.getValue()); job.setStatus(Status.PAUSE.getValue());
/* 99 */ int rows = 0; int rows = 0;
/* 100 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 101 */ rows = this.jobMapper.updateJob(job); rows = this.jobMapper.updateJob(job);
/* */ } }
/* 103 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 104 */ rows = this.jobMapper.updateJobSqlite(job); rows = this.jobMapper.updateJobSqlite(job);
/* */ } }
/* 106 */ if (rows > 0) if (rows > 0)
/* */ { {
/* 108 */ this.scheduler.pauseJob(ScheduleUtils.getJobKey(jobId, jobGroup)); this.scheduler.pauseJob(ScheduleUtils.getJobKey(jobId, jobGroup));
/* */ } }
/* 110 */ return rows; return rows;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ @Transactional @Transactional
/* */ public int resumeJob(Job job) throws SchedulerException { public int resumeJob(Job job) throws SchedulerException {
/* 122 */ Long jobId = job.getJobId(); Long jobId = job.getJobId();
/* 123 */ String jobGroup = job.getJobGroup(); String jobGroup = job.getJobGroup();
/* 124 */ job.setStatus(Status.NORMAL.getValue()); job.setStatus(Status.NORMAL.getValue());
/* 125 */ int rows = 0; int rows = 0;
/* 126 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 127 */ rows = this.jobMapper.updateJob(job); rows = this.jobMapper.updateJob(job);
/* */ } }
/* 129 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 130 */ rows = this.jobMapper.updateJobSqlite(job); rows = this.jobMapper.updateJobSqlite(job);
/* */ } }
/* */
/* 133 */ if (rows > 0) if (rows > 0)
/* */ { {
/* 135 */ this.scheduler.resumeJob(ScheduleUtils.getJobKey(jobId, jobGroup)); this.scheduler.resumeJob(ScheduleUtils.getJobKey(jobId, jobGroup));
/* */ } }
/* 137 */ return rows; return rows;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ @Transactional @Transactional
/* */ public int deleteJob(Job job) throws SchedulerException { public int deleteJob(Job job) throws SchedulerException {
/* 149 */ Long jobId = job.getJobId(); Long jobId = job.getJobId();
/* 150 */ String jobGroup = job.getJobGroup(); String jobGroup = job.getJobGroup();
/* 151 */ int rows = this.jobMapper.deleteJobById(jobId); int rows = this.jobMapper.deleteJobById(jobId);
/* 152 */ if (rows > 0) if (rows > 0)
/* */ { {
/* 154 */ this.scheduler.deleteJob(ScheduleUtils.getJobKey(jobId, jobGroup)); this.scheduler.deleteJob(ScheduleUtils.getJobKey(jobId, jobGroup));
/* */ } }
/* 156 */ return rows; return rows;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ @Transactional @Transactional
/* */ public void deleteJobByIds(String ids) throws SchedulerException { public void deleteJobByIds(String ids) throws SchedulerException {
/* 169 */ Long[] jobIds = Convert.toLongArray(ids); Long[] jobIds = Convert.toLongArray(ids);
/* 170 */ for (Long jobId : jobIds) { for (Long jobId : jobIds) {
/* */
/* 172 */ Job job = this.jobMapper.selectJobById(jobId); Job job = this.jobMapper.selectJobById(jobId);
/* 173 */ deleteJob(job); deleteJob(job);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ @Transactional @Transactional
/* */ public int changeStatus(Job job) throws SchedulerException { public int changeStatus(Job job) throws SchedulerException {
/* 186 */ int rows = 0; int rows = 0;
/* 187 */ String status = job.getStatus(); String status = job.getStatus();
/* 188 */ if (Status.NORMAL.getValue().equals(status)) { if (Status.NORMAL.getValue().equals(status)) {
/* */
/* 190 */ rows = resumeJob(job); rows = resumeJob(job);
/* */ } }
/* 192 */ else if (Status.PAUSE.getValue().equals(status)) { else if (Status.PAUSE.getValue().equals(status)) {
/* */
/* 194 */ rows = pauseJob(job); rows = pauseJob(job);
/* */ } }
/* 196 */ return rows; return rows;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ @Transactional @Transactional
/* */ public void run(Job job) throws SchedulerException { public void run(Job job) throws SchedulerException {
/* 208 */ Long jobId = job.getJobId(); Long jobId = job.getJobId();
/* 209 */ Job tmpObj = selectJobById(job.getJobId()); Job tmpObj = selectJobById(job.getJobId());
/* */
/* 211 */ JobDataMap dataMap = new JobDataMap(); JobDataMap dataMap = new JobDataMap();
/* 212 */ dataMap.put("TASK_PROPERTIES", tmpObj); dataMap.put("TASK_PROPERTIES", tmpObj);
/* 213 */ this.scheduler.triggerJob(ScheduleUtils.getJobKey(jobId, tmpObj.getJobGroup()), dataMap); this.scheduler.triggerJob(ScheduleUtils.getJobKey(jobId, tmpObj.getJobGroup()), dataMap);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ @Transactional @Transactional
/* */ public int insertJob(Job job) throws SchedulerException, TaskException { public int insertJob(Job job) throws SchedulerException, TaskException {
/* 225 */ job.setStatus(Status.PAUSE.getValue()); job.setStatus(Status.PAUSE.getValue());
/* 226 */ int rows = 0; int rows = 0;
/* 227 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 228 */ rows = this.jobMapper.insertJob(job); rows = this.jobMapper.insertJob(job);
/* */ } }
/* 230 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 231 */ rows = this.jobMapper.insertJobSqlite(job); rows = this.jobMapper.insertJobSqlite(job);
/* */ } }
/* */
/* 234 */ if (rows > 0) if (rows > 0)
/* */ { {
/* 236 */ ScheduleUtils.createScheduleJob(this.scheduler, job); ScheduleUtils.createScheduleJob(this.scheduler, job);
/* */ } }
/* 238 */ return rows; return rows;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ @Transactional @Transactional
/* */ public int updateJob(Job job) throws SchedulerException, TaskException { public int updateJob(Job job) throws SchedulerException, TaskException {
/* 250 */ Job properties = selectJobById(job.getJobId()); Job properties = selectJobById(job.getJobId());
/* */
/* 252 */ int rows = 0; int rows = 0;
/* 253 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) { if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 254 */ rows = this.jobMapper.updateJob(job); rows = this.jobMapper.updateJob(job);
/* */ } }
/* 256 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) { else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 257 */ rows = this.jobMapper.updateJobSqlite(job); rows = this.jobMapper.updateJobSqlite(job);
/* */ } }
/* */
/* 260 */ if (rows > 0) if (rows > 0)
/* */ { {
/* 262 */ updateSchedulerJob(job, properties.getJobGroup()); updateSchedulerJob(job, properties.getJobGroup());
/* */ } }
/* 264 */ return rows; return rows;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void updateSchedulerJob(Job job, String jobGroup) throws SchedulerException, TaskException { public void updateSchedulerJob(Job job, String jobGroup) throws SchedulerException, TaskException {
/* 275 */ Long jobId = job.getJobId(); Long jobId = job.getJobId();
/* */
/* 277 */ JobKey jobKey = ScheduleUtils.getJobKey(jobId, jobGroup); JobKey jobKey = ScheduleUtils.getJobKey(jobId, jobGroup);
/* 278 */ if (this.scheduler.checkExists(jobKey)) if (this.scheduler.checkExists(jobKey))
/* */ { {
/* */
/* 281 */ this.scheduler.deleteJob(jobKey); this.scheduler.deleteJob(jobKey);
/* */ } }
/* 283 */ ScheduleUtils.createScheduleJob(this.scheduler, job); ScheduleUtils.createScheduleJob(this.scheduler, job);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Override @Override
/* */ public boolean checkCronExpressionIsValid(String cronExpression) { public boolean checkCronExpressionIsValid(String cronExpression) {
/* 295 */ return CronUtils.isValid(cronExpression); return CronUtils.isValid(cronExpression);
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\service\JobServiceImpl.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\job\service\JobServiceImpl.class

@ -1,187 +1,187 @@
/* */ package com.archive.project.monitor.job.util package com.archive.project.monitor.job.util
; ;
/* */
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.spring.SpringUtils; import com.archive.common.utils.spring.SpringUtils;
/* */ import com.archive.project.monitor.job.domain.Job; import com.archive.project.monitor.job.domain.Job;
/* */ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
/* */ import java.lang.reflect.Method; import java.lang.reflect.Method;
/* */ import java.util.LinkedList; import java.util.LinkedList;
/* */ import java.util.List; import java.util.List;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class JobInvokeUtil public class JobInvokeUtil
/* */ { {
/* */ public static void invokeMethod(Job job) throws Exception { public static void invokeMethod(Job job) throws Exception {
/* 25 */ String invokeTarget = job.getInvokeTarget(); String invokeTarget = job.getInvokeTarget();
/* 26 */ String beanName = getBeanName(invokeTarget); String beanName = getBeanName(invokeTarget);
/* 27 */ String methodName = getMethodName(invokeTarget); String methodName = getMethodName(invokeTarget);
/* 28 */ List<Object[]> methodParams = getMethodParams(invokeTarget); List<Object[]> methodParams = getMethodParams(invokeTarget);
/* */
/* 30 */ if (!isValidClassName(beanName)) { if (!isValidClassName(beanName)) {
/* */
/* 32 */ Object bean = SpringUtils.getBean(beanName); Object bean = SpringUtils.getBean(beanName);
/* 33 */ invokeMethod(bean, methodName, methodParams); invokeMethod(bean, methodName, methodParams);
/* */ } }
/* */ else { else {
/* */
/* 37 */ Object bean = Class.forName(beanName).newInstance(); Object bean = Class.forName(beanName).newInstance();
/* 38 */ invokeMethod(bean, methodName, methodParams); invokeMethod(bean, methodName, methodParams);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ private static void invokeMethod(Object bean, String methodName, List<Object[]> methodParams) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { private static void invokeMethod(Object bean, String methodName, List<Object[]> methodParams) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
/* 53 */ if (StringUtils.isNotNull(methodParams) && methodParams.size() > 0) { if (StringUtils.isNotNull(methodParams) && methodParams.size() > 0) {
/* */
/* 55 */ Method method = bean.getClass().getDeclaredMethod(methodName, getMethodParamsType(methodParams)); Method method = bean.getClass().getDeclaredMethod(methodName, getMethodParamsType(methodParams));
/* 56 */ method.invoke(bean, getMethodParamsValue(methodParams)); method.invoke(bean, getMethodParamsValue(methodParams));
/* */ } }
/* */ else { else {
/* */
/* 60 */ Method method = bean.getClass().getDeclaredMethod(methodName, new Class[0]); Method method = bean.getClass().getDeclaredMethod(methodName, new Class[0]);
/* 61 */ method.invoke(bean, new Object[0]); method.invoke(bean, new Object[0]);
/* */ } }
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static boolean isValidClassName(String invokeTarget) { public static boolean isValidClassName(String invokeTarget) {
/* 73 */ return (StringUtils.countMatches(invokeTarget, ".") > 1); return (StringUtils.countMatches(invokeTarget, ".") > 1);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getBeanName(String invokeTarget) { public static String getBeanName(String invokeTarget) {
/* 84 */ String beanName = StringUtils.substringBefore(invokeTarget, "("); String beanName = StringUtils.substringBefore(invokeTarget, "(");
/* 85 */ return StringUtils.substringBeforeLast(beanName, "."); return StringUtils.substringBeforeLast(beanName, ".");
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getMethodName(String invokeTarget) { public static String getMethodName(String invokeTarget) {
/* 96 */ String methodName = StringUtils.substringBefore(invokeTarget, "("); String methodName = StringUtils.substringBefore(invokeTarget, "(");
/* 97 */ return StringUtils.substringAfterLast(methodName, "."); return StringUtils.substringAfterLast(methodName, ".");
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static List<Object[]> getMethodParams(String invokeTarget) { public static List<Object[]> getMethodParams(String invokeTarget) {
/* 108 */ String methodStr = StringUtils.substringBetween(invokeTarget, "(", ")"); String methodStr = StringUtils.substringBetween(invokeTarget, "(", ")");
/* 109 */ if (StringUtils.isEmpty(methodStr)) if (StringUtils.isEmpty(methodStr))
/* */ { {
/* 111 */ return null; return null;
/* */ } }
/* 113 */ String[] methodParams = methodStr.split(","); String[] methodParams = methodStr.split(",");
/* 114 */ List<Object[]> classs = new LinkedList(); List<Object[]> classs = new LinkedList();
/* 115 */ for (int i = 0; i < methodParams.length; i++) { for (int i = 0; i < methodParams.length; i++) {
/* */
/* 117 */ String str = StringUtils.trimToEmpty(methodParams[i]); String str = StringUtils.trimToEmpty(methodParams[i]);
/* */
/* 119 */ if (StringUtils.contains(str, "'")) { if (StringUtils.contains(str, "'")) {
/* */
/* 121 */ classs.add(new Object[] { StringUtils.replace(str, "'", ""), String.class }); classs.add(new Object[] { StringUtils.replace(str, "'", ""), String.class });
/* */
/* */ } }
/* 124 */ else if (StringUtils.equals(str, "true") || StringUtils.equalsIgnoreCase(str, "false")) { else if (StringUtils.equals(str, "true") || StringUtils.equalsIgnoreCase(str, "false")) {
/* */
/* 126 */ classs.add(new Object[] { Boolean.valueOf(str), Boolean.class }); classs.add(new Object[] { Boolean.valueOf(str), Boolean.class });
/* */
/* */ } }
/* 129 */ else if (StringUtils.containsIgnoreCase(str, "L")) { else if (StringUtils.containsIgnoreCase(str, "L")) {
/* */
/* 131 */ classs.add(new Object[] { Long.valueOf(StringUtils.replaceIgnoreCase(str, "L", "")), Long.class }); classs.add(new Object[] { Long.valueOf(StringUtils.replaceIgnoreCase(str, "L", "")), Long.class });
/* */
/* */ } }
/* 134 */ else if (StringUtils.containsIgnoreCase(str, "D")) { else if (StringUtils.containsIgnoreCase(str, "D")) {
/* */
/* 136 */ classs.add(new Object[] { Double.valueOf(StringUtils.replaceIgnoreCase(str, "D", "")), Double.class }); classs.add(new Object[] { Double.valueOf(StringUtils.replaceIgnoreCase(str, "D", "")), Double.class });
/* */
/* */ } }
/* */ else { else {
/* */
/* 141 */ classs.add(new Object[] { Integer.valueOf(str), Integer.class }); classs.add(new Object[] { Integer.valueOf(str), Integer.class });
/* */ } }
/* */ } }
/* 144 */ return classs; return classs;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Class<?>[] getMethodParamsType(List<Object[]> methodParams) { public static Class<?>[] getMethodParamsType(List<Object[]> methodParams) {
/* 155 */ Class<?>[] classs = new Class[methodParams.size()]; Class<?>[] classs = new Class[methodParams.size()];
/* 156 */ int index = 0; int index = 0;
/* 157 */ for (Object[] os : methodParams) { for (Object[] os : methodParams) {
/* */
/* 159 */ classs[index] = (Class)os[1]; classs[index] = (Class)os[1];
/* 160 */ index++; index++;
/* */ } }
/* 162 */ return classs; return classs;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static Object[] getMethodParamsValue(List<Object[]> methodParams) { public static Object[] getMethodParamsValue(List<Object[]> methodParams) {
/* 173 */ Object[] classs = new Object[methodParams.size()]; Object[] classs = new Object[methodParams.size()];
/* 174 */ int index = 0; int index = 0;
/* 175 */ for (Object[] os : methodParams) { for (Object[] os : methodParams) {
/* */
/* 177 */ classs[index] = os[0]; classs[index] = os[0];
/* 178 */ index++; index++;
/* */ } }
/* 180 */ return classs; return classs;
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\jo\\util\JobInvokeUtil.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\jo\\util\JobInvokeUtil.class

@ -1,165 +1,165 @@
/* */ package com.archive.project.monitor.logininfor.domain package com.archive.project.monitor.logininfor.domain
; ;
/* */
/* */ import com.archive.framework.aspectj.lang.annotation.ColumnType; import com.archive.framework.aspectj.lang.annotation.ColumnType;
import com.archive.framework.aspectj.lang.annotation.Excel; import com.archive.framework.aspectj.lang.annotation.Excel;
/* */ import com.archive.framework.web.domain.BaseEntity; import com.archive.framework.web.domain.BaseEntity;
/* */ import java.util.Date; import java.util.Date;
/* */ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
/* */ import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Logininfor public class Logininfor
/* */ extends BaseEntity extends BaseEntity
/* */ { {
/* */ private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/* */ @Excel(name = "序号", cellType = ColumnType.NUMERIC) @Excel(name = "序号", cellType = ColumnType.NUMERIC)
/* */ private Long infoId; private Long infoId;
/* */ @Excel(name = "用户账号") @Excel(name = "用户账号")
/* */ private String loginName; private String loginName;
/* */ @Excel(name = "登录状态", readConverterExp = "0=成功,1=失败") @Excel(name = "登录状态", readConverterExp = "0=成功,1=失败")
/* */ private String status; private String status;
/* */ @Excel(name = "登录地址") @Excel(name = "登录地址")
/* */ private String ipaddr; private String ipaddr;
/* */ @Excel(name = "登录地点") @Excel(name = "登录地点")
/* */ private String loginLocation; private String loginLocation;
/* */ @Excel(name = "浏览器") @Excel(name = "浏览器")
/* */ private String browser; private String browser;
/* */ @Excel(name = "操作系统") @Excel(name = "操作系统")
/* */ private String os; private String os;
/* */ @Excel(name = "提示消息") @Excel(name = "提示消息")
/* */ private String msg; private String msg;
/* */ @Excel(name = "访问时间", width = 30.0D, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "访问时间", width = 30.0D, dateFormat = "yyyy-MM-dd HH:mm:ss")
/* */ private Date loginTime; private Date loginTime;
/* */
/* */ public Long getInfoId() { public Long getInfoId() {
/* 57 */ return this.infoId; return this.infoId;
/* */ } }
/* */
/* */
/* */ public void setInfoId(Long infoId) { public void setInfoId(Long infoId) {
/* 62 */ this.infoId = infoId; this.infoId = infoId;
/* */ } }
/* */
/* */
/* */ public String getLoginName() { public String getLoginName() {
/* 67 */ return this.loginName; return this.loginName;
/* */ } }
/* */
/* */
/* */ public void setLoginName(String loginName) { public void setLoginName(String loginName) {
/* 72 */ this.loginName = loginName; this.loginName = loginName;
/* */ } }
/* */
/* */
/* */ public String getStatus() { public String getStatus() {
/* 77 */ return this.status; return this.status;
/* */ } }
/* */
/* */
/* */ public void setStatus(String status) { public void setStatus(String status) {
/* 82 */ this.status = status; this.status = status;
/* */ } }
/* */
/* */
/* */ public String getIpaddr() { public String getIpaddr() {
/* 87 */ return this.ipaddr; return this.ipaddr;
/* */ } }
/* */
/* */
/* */ public void setIpaddr(String ipaddr) { public void setIpaddr(String ipaddr) {
/* 92 */ this.ipaddr = ipaddr; this.ipaddr = ipaddr;
/* */ } }
/* */
/* */
/* */ public String getLoginLocation() { public String getLoginLocation() {
/* 97 */ return this.loginLocation; return this.loginLocation;
/* */ } }
/* */
/* */
/* */ public void setLoginLocation(String loginLocation) { public void setLoginLocation(String loginLocation) {
/* 102 */ this.loginLocation = loginLocation; this.loginLocation = loginLocation;
/* */ } }
/* */
/* */
/* */ public String getBrowser() { public String getBrowser() {
/* 107 */ return this.browser; return this.browser;
/* */ } }
/* */
/* */
/* */ public void setBrowser(String browser) { public void setBrowser(String browser) {
/* 112 */ this.browser = browser; this.browser = browser;
/* */ } }
/* */
/* */
/* */ public String getOs() { public String getOs() {
/* 117 */ return this.os; return this.os;
/* */ } }
/* */
/* */
/* */ public void setOs(String os) { public void setOs(String os) {
/* 122 */ this.os = os; this.os = os;
/* */ } }
/* */
/* */
/* */ public String getMsg() { public String getMsg() {
/* 127 */ return this.msg; return this.msg;
/* */ } }
/* */
/* */
/* */ public void setMsg(String msg) { public void setMsg(String msg) {
/* 132 */ this.msg = msg; this.msg = msg;
/* */ } }
/* */
/* */
/* */ public Date getLoginTime() { public Date getLoginTime() {
/* 137 */ return this.loginTime; return this.loginTime;
/* */ } }
/* */
/* */
/* */ public void setLoginTime(Date loginTime) { public void setLoginTime(Date loginTime) {
/* 142 */ this.loginTime = loginTime; this.loginTime = loginTime;
/* */ } }
/* */
/* */ @Override @Override
/* */ public String toString() { public String toString() {
/* 147 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)) return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 148 */ .append("infoId", getInfoId()) .append("infoId", getInfoId())
/* 149 */ .append("loginName", getLoginName()) .append("loginName", getLoginName())
/* 150 */ .append("ipaddr", getIpaddr()) .append("ipaddr", getIpaddr())
/* 151 */ .append("loginLocation", getLoginLocation()) .append("loginLocation", getLoginLocation())
/* 152 */ .append("browser", getBrowser()) .append("browser", getBrowser())
/* 153 */ .append("os", getOs()) .append("os", getOs())
/* 154 */ .append("status", getStatus()) .append("status", getStatus())
/* 155 */ .append("msg", getMsg()) .append("msg", getMsg())
/* 156 */ .append("loginTime", getLoginTime()) .append("loginTime", getLoginTime())
/* 157 */ .toString(); .toString();
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\logininfor\domain\Logininfor.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\logininfor\domain\Logininfor.class

@ -1,127 +1,127 @@
/* */ package com.archive.project.monitor.server.domain package com.archive.project.monitor.server.domain
; ;
/* */
/* */ import com.archive.common.utils.Arith; import com.archive.common.utils.Arith;
/* */ import com.archive.common.utils.DateUtils; import com.archive.common.utils.DateUtils;
/* */ import java.lang.management.ManagementFactory; import java.lang.management.ManagementFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Jvm public class Jvm
/* */ { {
/* */ private double total; private double total;
/* */ private double max; private double max;
/* */ private double free; private double free;
/* */ private String version; private String version;
/* */ private String home; private String home;
/* */
/* */ public double getTotal() { public double getTotal() {
/* 41 */ return Arith.div(this.total, 1048576.0D, 2); return Arith.div(this.total, 1048576.0D, 2);
/* */ } }
/* */
/* */
/* */ public void setTotal(double total) { public void setTotal(double total) {
/* 46 */ this.total = total; this.total = total;
/* */ } }
/* */
/* */
/* */ public double getMax() { public double getMax() {
/* 51 */ return Arith.div(this.max, 1048576.0D, 2); return Arith.div(this.max, 1048576.0D, 2);
/* */ } }
/* */
/* */
/* */ public void setMax(double max) { public void setMax(double max) {
/* 56 */ this.max = max; this.max = max;
/* */ } }
/* */
/* */
/* */ public double getFree() { public double getFree() {
/* 61 */ return Arith.div(this.free, 1048576.0D, 2); return Arith.div(this.free, 1048576.0D, 2);
/* */ } }
/* */
/* */
/* */ public void setFree(double free) { public void setFree(double free) {
/* 66 */ this.free = free; this.free = free;
/* */ } }
/* */
/* */
/* */ public double getUsed() { public double getUsed() {
/* 71 */ return Arith.div(this.total - this.free, 1048576.0D, 2); return Arith.div(this.total - this.free, 1048576.0D, 2);
/* */ } }
/* */
/* */
/* */ public double getUsage() { public double getUsage() {
/* 76 */ return Arith.mul(Arith.div(this.total - this.free, this.total, 4), 100.0D); return Arith.mul(Arith.div(this.total - this.free, this.total, 4), 100.0D);
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ public String getName() { public String getName() {
/* 84 */ return ManagementFactory.getRuntimeMXBean().getVmName(); return ManagementFactory.getRuntimeMXBean().getVmName();
/* */ } }
/* */
/* */
/* */ public String getVersion() { public String getVersion() {
/* 89 */ return this.version; return this.version;
/* */ } }
/* */
/* */
/* */ public void setVersion(String version) { public void setVersion(String version) {
/* 94 */ this.version = version; this.version = version;
/* */ } }
/* */
/* */
/* */ public String getHome() { public String getHome() {
/* 99 */ return this.home; return this.home;
/* */ } }
/* */
/* */
/* */ public void setHome(String home) { public void setHome(String home) {
/* 104 */ this.home = home; this.home = home;
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ public String getStartTime() { public String getStartTime() {
/* 112 */ return DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.getServerStartDate()); return DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.getServerStartDate());
/* */ } }
/* */
/* */
/* */
/* */
/* */
/* */ public String getRunTime() { public String getRunTime() {
/* 120 */ return DateUtils.getDatePoor(DateUtils.getNowDate(), DateUtils.getServerStartDate()); return DateUtils.getDatePoor(DateUtils.getNowDate(), DateUtils.getServerStartDate());
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\domain\Jvm.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\domain\Jvm.class

@ -1,80 +1,80 @@
/* */ package com.archive.project.system.user.controller package com.archive.project.system.user.controller
; ;
/* */
/* */ import com.archive.common.utils.ServletUtils; import com.archive.common.utils.ServletUtils;
/* */ import com.archive.common.utils.StringUtils; import com.archive.common.utils.StringUtils;
/* */ import com.archive.framework.web.controller.BaseController; import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult; import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.project.system.config.service.IConfigService; import com.archive.project.system.config.service.IConfigService;
/* */ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/* */ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
/* */ import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
/* */ import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationException;
/* */ import org.apache.shiro.authc.AuthenticationToken; import org.apache.shiro.authc.AuthenticationToken;
/* */ import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.authc.UsernamePasswordToken;
/* */ import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
/* */ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
/* */ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Controller @Controller
/* */ public class LoginController public class LoginController
/* */ extends BaseController extends BaseController
/* */ { {
/* */ @Autowired @Autowired
/* */ private IConfigService configService; private IConfigService configService;
/* */
/* */ @GetMapping({"/login"}) @GetMapping({"/login"})
/* */ public String login(HttpServletRequest request, HttpServletResponse response, ModelMap mmap) { public String login(HttpServletRequest request, HttpServletResponse response, ModelMap mmap) {
/* 37 */ String systemName = this.configService.selectConfigByKey("archive.SystemName"); String systemName = this.configService.selectConfigByKey("archive.SystemName");
/* 38 */ mmap.put("SystemName", systemName); mmap.put("SystemName", systemName);
/* */
/* 40 */ if (ServletUtils.isAjaxRequest(request)) if (ServletUtils.isAjaxRequest(request))
/* */ { {
/* 42 */ return ServletUtils.renderString(response, "{\"code\":\"1\",\"msg\":\"未登录或登录超时。请重新登录\"}"); return ServletUtils.renderString(response, "{\"code\":\"1\",\"msg\":\"未登录或登录超时。请重新登录\"}");
/* */ } }
/* */
/* 45 */ return "login"; return "login";
/* */ } }
/* */
/* */
/* */ @PostMapping({"/login"}) @PostMapping({"/login"})
/* */ @ResponseBody @ResponseBody
/* */ public AjaxResult ajaxLogin(String username, String password, Boolean rememberMe) { public AjaxResult ajaxLogin(String username, String password, Boolean rememberMe) {
/* 52 */ UsernamePasswordToken token = new UsernamePasswordToken(username, password, rememberMe.booleanValue()); UsernamePasswordToken token = new UsernamePasswordToken(username, password, rememberMe.booleanValue());
/* 53 */ Subject subject = SecurityUtils.getSubject(); Subject subject = SecurityUtils.getSubject();
/* */
/* */ try { try {
/* 56 */ subject.login((AuthenticationToken)token); subject.login((AuthenticationToken)token);
/* 57 */ return success(); return success();
/* */ } }
/* 59 */ catch (AuthenticationException e) { catch (AuthenticationException e) {
/* */
/* 61 */ String msg = "用户或密码错误"; String msg = "用户或密码错误";
/* 62 */ if (StringUtils.isNotEmpty(e.getMessage())) if (StringUtils.isNotEmpty(e.getMessage()))
/* */ { {
/* 64 */ msg = e.getMessage(); msg = e.getMessage();
/* */ } }
/* 66 */ return error(msg); return error(msg);
/* */ } }
/* */ } }
/* */
/* */
/* */ @GetMapping({"/unauth"}) @GetMapping({"/unauth"})
/* */ public String unauth() { public String unauth() {
/* 73 */ return "error/unauth"; return "error/unauth";
/* */ } }
/* */ } }
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\controller\LoginController.class /* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\syste\\user\controller\LoginController.class

Loading…
Cancel
Save