feat:修改通知

dev
wangxy 3 weeks ago
parent 5a2c947b0c
commit 9454e8418d

@ -1,139 +1,139 @@
/* */ package com.archive.common.utils
package com.archive.common.utils
;
/* */
/* */ import com.alibaba.fastjson.JSON;
/* */ import com.archive.common.utils.IpUtils;
/* */ import java.io.PrintWriter;
/* */ import java.io.StringWriter;
/* */ import java.util.Map;
/* */ import javax.servlet.http.HttpServletRequest;
/* */ import org.apache.shiro.SecurityUtils;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */ public class LogUtils
/* */ {
/* 19 */ public static final Logger ERROR_LOG = LoggerFactory.getLogger("sys-error");
/* 20 */ public static final Logger ACCESS_LOG = LoggerFactory.getLogger("sys-access");
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void logAccess(HttpServletRequest request) {
/* 29 */ String username = getUsername();
/* 30 */ String jsessionId = request.getRequestedSessionId();
/* 31 */ String ip = IpUtils.getIpAddr(request);
/* 32 */ String accept = request.getHeader("accept");
/* 33 */ String userAgent = request.getHeader("User-Agent");
/* 34 */ String url = request.getRequestURI();
/* 35 */ String params = getParams(request);
/* */
/* 37 */ StringBuilder s = new StringBuilder();
/* 38 */ s.append(getBlock(username));
/* 39 */ s.append(getBlock(jsessionId));
/* 40 */ s.append(getBlock(ip));
/* 41 */ s.append(getBlock(accept));
/* 42 */ s.append(getBlock(userAgent));
/* 43 */ s.append(getBlock(url));
/* 44 */ s.append(getBlock(params));
/* 45 */ s.append(getBlock(request.getHeader("Referer")));
/* 46 */ getAccessLog().info(s.toString());
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void logError(String message, Throwable e) {
/* 57 */ String username = getUsername();
/* 58 */ StringBuilder s = new StringBuilder();
/* 59 */ s.append(getBlock("exception"));
/* 60 */ s.append(getBlock(username));
/* 61 */ s.append(getBlock(message));
/* 62 */ ERROR_LOG.error(s.toString(), e);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static void logPageError(HttpServletRequest request) {
/* 72 */ String username = getUsername();
/* */
/* 74 */ Integer statusCode = (Integer)request.getAttribute("javax.servlet.error.status_code");
/* 75 */ String message = (String)request.getAttribute("javax.servlet.error.message");
/* 76 */ String uri = (String)request.getAttribute("javax.servlet.error.request_uri");
/* 77 */ Throwable t = (Throwable)request.getAttribute("javax.servlet.error.exception");
/* */
/* 79 */ if (statusCode == null)
/* */ {
/* 81 */ statusCode = Integer.valueOf(0);
/* */ }
/* */
/* 84 */ StringBuilder s = new StringBuilder();
/* 85 */ s.append(getBlock((t == null) ? "page" : "exception"));
/* 86 */ s.append(getBlock(username));
/* 87 */ s.append(getBlock(statusCode));
/* 88 */ s.append(getBlock(message));
/* 89 */ s.append(getBlock(IpUtils.getIpAddr(request)));
/* */
/* 91 */ s.append(getBlock(uri));
/* 92 */ s.append(getBlock(request.getHeader("Referer")));
/* 93 */ StringWriter sw = new StringWriter();
/* */
/* 95 */ while (t != null) {
/* */
/* 97 */ t.printStackTrace(new PrintWriter(sw));
/* 98 */ t = t.getCause();
/* */ }
/* 100 */ s.append(getBlock(sw.toString()));
/* 101 */ getErrorLog().error(s.toString());
/* */ }
/* */
/* */
/* */
/* */ public static String getBlock(Object msg) {
/* 107 */ if (msg == null)
/* */ {
/* 109 */ msg = "";
/* */ }
/* 111 */ return "[" + msg.toString() + "]";
/* */ }
/* */
/* */
/* */ protected static String getParams(HttpServletRequest request) {
/* 116 */ Map<String, String[]> params = request.getParameterMap();
/* 117 */ return JSON.toJSONString(params);
/* */ }
/* */
/* */
/* */ protected static String getUsername() {
/* 122 */ return (String)SecurityUtils.getSubject().getPrincipal();
/* */ }
/* */
/* */
/* */ public static Logger getAccessLog() {
/* 127 */ return ACCESS_LOG;
/* */ }
/* */
/* */
/* */ public static Logger getErrorLog() {
/* 132 */ return ERROR_LOG;
/* */ }
/* */ }
import com.alibaba.fastjson.JSON;
import com.archive.common.utils.IpUtils;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class LogUtils
{
public static final Logger ERROR_LOG = LoggerFactory.getLogger("sys-error");
public static final Logger ACCESS_LOG = LoggerFactory.getLogger("sys-access");
public static void logAccess(HttpServletRequest request) {
String username = getUsername();
String jsessionId = request.getRequestedSessionId();
String ip = IpUtils.getIpAddr(request);
String accept = request.getHeader("accept");
String userAgent = request.getHeader("User-Agent");
String url = request.getRequestURI();
String params = getParams(request);
StringBuilder s = new StringBuilder();
s.append(getBlock(username));
s.append(getBlock(jsessionId));
s.append(getBlock(ip));
s.append(getBlock(accept));
s.append(getBlock(userAgent));
s.append(getBlock(url));
s.append(getBlock(params));
s.append(getBlock(request.getHeader("Referer")));
getAccessLog().info(s.toString());
}
public static void logError(String message, Throwable e) {
String username = getUsername();
StringBuilder s = new StringBuilder();
s.append(getBlock("exception"));
s.append(getBlock(username));
s.append(getBlock(message));
ERROR_LOG.error(s.toString(), e);
}
public static void logPageError(HttpServletRequest request) {
String username = getUsername();
Integer statusCode = (Integer)request.getAttribute("javax.servlet.error.status_code");
String message = (String)request.getAttribute("javax.servlet.error.message");
String uri = (String)request.getAttribute("javax.servlet.error.request_uri");
Throwable t = (Throwable)request.getAttribute("javax.servlet.error.exception");
if (statusCode == null)
{
statusCode = Integer.valueOf(0);
}
StringBuilder s = new StringBuilder();
s.append(getBlock((t == null) ? "page" : "exception"));
s.append(getBlock(username));
s.append(getBlock(statusCode));
s.append(getBlock(message));
s.append(getBlock(IpUtils.getIpAddr(request)));
s.append(getBlock(uri));
s.append(getBlock(request.getHeader("Referer")));
StringWriter sw = new StringWriter();
while (t != null) {
t.printStackTrace(new PrintWriter(sw));
t = t.getCause();
}
s.append(getBlock(sw.toString()));
getErrorLog().error(s.toString());
}
public static String getBlock(Object msg) {
if (msg == null)
{
msg = "";
}
return "[" + msg.toString() + "]";
}
protected static String getParams(HttpServletRequest request) {
Map<String, String[]> params = request.getParameterMap();
return JSON.toJSONString(params);
}
protected static String getUsername() {
return (String)SecurityUtils.getSubject().getPrincipal();
}
public static Logger getAccessLog() {
return ACCESS_LOG;
}
public static Logger getErrorLog() {
return ERROR_LOG;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\LogUtils.class

@ -1,59 +1,59 @@
/* */ package com.archive.common.utils
package com.archive.common.utils
;
/* */
/* */ import java.util.HashMap;
/* */ import java.util.Iterator;
/* */ import java.util.Map;
/* */ import javax.servlet.http.HttpServletRequest;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class MapDataUtil
/* */ {
/* */ public static Map<String, Object> convertDataMap(HttpServletRequest request) {
/* 18 */ Map<String, String[]> properties = request.getParameterMap();
/* 19 */ Map<String, Object> returnMap = new HashMap<>();
/* 20 */ Iterator<?> entries = properties.entrySet().iterator();
/* */
/* 22 */ String name = "";
/* 23 */ String value = "";
/* 24 */ while (entries.hasNext()) {
/* */
/* 26 */ Map.Entry<?, ?> entry = (Map.Entry<?, ?>)entries.next();
/* 27 */ name = (String)entry.getKey();
/* 28 */ Object valueObj = entry.getValue();
/* 29 */ if (null == valueObj) {
/* */
/* 31 */ value = "";
/* */ }
/* 33 */ else if (valueObj instanceof String[]) {
/* */
/* 35 */ String[] values = (String[])valueObj;
/* 36 */ value = "";
/* 37 */ for (int i = 0; i < values.length; i++)
/* */ {
/* 39 */ value = value + values[i] + ",";
/* */ }
/* 41 */ if (value.length() > 0)
/* */ {
/* 43 */ value = value.substring(0, value.length() - 1);
/* */ }
/* */ }
/* */ else {
/* */
/* 48 */ value = valueObj.toString();
/* */ }
/* 50 */ returnMap.put(name, value);
/* */ }
/* 52 */ return returnMap;
/* */ }
/* */ }
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
public class MapDataUtil
{
public static Map<String, Object> convertDataMap(HttpServletRequest request) {
Map<String, String[]> properties = request.getParameterMap();
Map<String, Object> returnMap = new HashMap<>();
Iterator<?> entries = properties.entrySet().iterator();
String name = "";
String value = "";
while (entries.hasNext()) {
Map.Entry<?, ?> entry = (Map.Entry<?, ?>)entries.next();
name = (String)entry.getKey();
Object valueObj = entry.getValue();
if (null == valueObj) {
value = "";
}
else if (valueObj instanceof String[]) {
String[] values = (String[])valueObj;
value = "";
for (int i = 0; i < values.length; i++)
{
value = value + values[i] + ",";
}
if (value.length() > 0)
{
value = value.substring(0, value.length() - 1);
}
}
else {
value = valueObj.toString();
}
returnMap.put(name, value);
}
return returnMap;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\MapDataUtil.class

@ -1,71 +1,71 @@
/* */ package com.archive.common.utils
package com.archive.common.utils
;
/* */
/* */ import java.security.MessageDigest;
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Md5Utils
/* */ {
/* 14 */ private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.Md5Utils.class);
/* */
/* */
/* */
/* */
/* */ private static byte[] md5(String s) {
/* */ try {
/* 21 */ MessageDigest algorithm = MessageDigest.getInstance("MD5");
/* 22 */ algorithm.reset();
/* 23 */ algorithm.update(s.getBytes("UTF-8"));
/* 24 */ byte[] messageDigest = algorithm.digest();
/* 25 */ return messageDigest;
/* */ }
/* 27 */ catch (Exception e) {
/* */
/* 29 */ log.error("MD5 Error...", e);
/* */
/* 31 */ return null;
/* */ }
/* */ }
/* */
/* */ private static final String toHex(byte[] hash) {
/* 36 */ if (hash == null)
/* */ {
/* 38 */ return null;
/* */ }
/* 40 */ StringBuffer buf = new StringBuffer(hash.length * 2);
/* */
/* */
/* 43 */ for (int i = 0; i < hash.length; i++) {
/* */
/* 45 */ if ((hash[i] & 0xFF) < 16)
/* */ {
/* 47 */ buf.append("0");
/* */ }
/* 49 */ buf.append(Long.toString((hash[i] & 0xFF), 16));
/* */ }
/* 51 */ return buf.toString();
/* */ }
/* */
/* */
/* */
/* */ public static String hash(String s) {
/* */ try {
/* 58 */ return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8");
/* */ }
/* 60 */ catch (Exception e) {
/* */
/* 62 */ log.error("not supported charset...{}", e);
/* 63 */ return s;
/* */ }
/* */ }
/* */ }
import java.security.MessageDigest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Md5Utils
{
private static final Logger log = LoggerFactory.getLogger(com.archive.common.utils.Md5Utils.class);
private static byte[] md5(String s) {
try {
MessageDigest algorithm = MessageDigest.getInstance("MD5");
algorithm.reset();
algorithm.update(s.getBytes("UTF-8"));
byte[] messageDigest = algorithm.digest();
return messageDigest;
}
catch (Exception e) {
log.error("MD5 Error...", e);
return null;
}
}
private static final String toHex(byte[] hash) {
if (hash == null)
{
return null;
}
StringBuffer buf = new StringBuffer(hash.length * 2);
for (int i = 0; i < hash.length; i++) {
if ((hash[i] & 0xFF) < 16)
{
buf.append("0");
}
buf.append(Long.toString((hash[i] & 0xFF), 16));
}
return buf.toString();
}
public static String hash(String s) {
try {
return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8");
}
catch (Exception e) {
log.error("not supported charset...{}", e);
return s;
}
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\Md5Utils.class

@ -1,30 +1,30 @@
/* */ package com.archive.common.utils
package com.archive.common.utils
;
/* */
/* */ import com.archive.common.utils.spring.SpringUtils;
/* */ import org.springframework.context.MessageSource;
/* */ import org.springframework.context.i18n.LocaleContextHolder;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class MessageUtils
/* */ {
/* */ public static String message(String code, Object... args) {
/* 23 */ MessageSource messageSource = (MessageSource)SpringUtils.getBean(MessageSource.class);
/* 24 */ return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
/* */ }
/* */ }
import com.archive.common.utils.spring.SpringUtils;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;
public class MessageUtils
{
public static String message(String code, Object... args) {
MessageSource messageSource = (MessageSource)SpringUtils.getBean(MessageSource.class);
return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\MessageUtils.class

@ -1,61 +1,61 @@
/* */ package com.archive.common.utils.file;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class MimeTypeUtils
/* */ {
/* */ public static final String IMAGE_PNG = "image/png";
/* */ public static final String IMAGE_JPG = "image/jpg";
/* */ public static final String IMAGE_JPEG = "image/jpeg";
/* */ public static final String IMAGE_BMP = "image/bmp";
/* */ public static final String IMAGE_GIF = "image/gif";
/* 20 */ public static final String[] IMAGE_EXTENSION = new String[] { "bmp", "gif", "jpg", "jpeg", "png" };
/* */
/* 22 */ public static final String[] FLASH_EXTENSION = new String[] { "swf", "flv" };
/* */
/* 24 */ public static final String[] MEDIA_EXTENSION = new String[] { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg", "asf", "rm", "rmvb" };
/* */
/* */
/* 27 */ public static final String[] VIDEO_EXTENSION = new String[] { "mp4", "avi", "rmvb" };
/* */
/* 29 */ public static final String[] DEFAULT_ALLOWED_EXTENSION = new String[] { "bmp", "gif", "jpg", "jpeg", "png", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", "rar", "zip", "gz", "bz2", "mp4", "avi", "rmvb", "pdf" };
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public static String getExtension(String prefix) {
/* 43 */ switch (prefix) {
/* */
/* */ case "image/png":
/* 46 */ return "png";
/* */ case "image/jpg":
/* 48 */ return "jpg";
/* */ case "image/jpeg":
/* 50 */ return "jpeg";
/* */ case "image/bmp":
/* 52 */ return "bmp";
/* */ case "image/gif":
/* 54 */ return "gif";
/* */ }
/* 56 */ return "";
/* */ }
/* */ }
package com.archive.common.utils.file;
public class MimeTypeUtils
{
public static final String IMAGE_PNG = "image/png";
public static final String IMAGE_JPG = "image/jpg";
public static final String IMAGE_JPEG = "image/jpeg";
public static final String IMAGE_BMP = "image/bmp";
public static final String IMAGE_GIF = "image/gif";
public static final String[] IMAGE_EXTENSION = new String[] { "bmp", "gif", "jpg", "jpeg", "png" };
public static final String[] FLASH_EXTENSION = new String[] { "swf", "flv" };
public static final String[] MEDIA_EXTENSION = new String[] { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg", "asf", "rm", "rmvb" };
public static final String[] VIDEO_EXTENSION = new String[] { "mp4", "avi", "rmvb" };
public static final String[] DEFAULT_ALLOWED_EXTENSION = new String[] { "bmp", "gif", "jpg", "jpeg", "png", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", "rar", "zip", "gz", "bz2", "mp4", "avi", "rmvb", "pdf" };
public static String getExtension(String prefix) {
switch (prefix) {
case "image/png":
return "png";
case "image/jpg":
return "jpg";
case "image/jpeg":
return "jpeg";
case "image/bmp":
return "bmp";
case "image/gif":
return "gif";
}
return "";
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\commo\\utils\file\MimeTypeUtils.class

@ -1,137 +1,137 @@
/* */ package com.archive.framework.config
package com.archive.framework.config
;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ import java.io.IOException;
/* */ import java.util.ArrayList;
/* */ import java.util.Arrays;
/* */ import java.util.HashSet;
/* */ import java.util.List;
/* */ import javax.sql.DataSource;
/* */ import org.apache.ibatis.io.VFS;
/* */ import org.apache.ibatis.session.SqlSessionFactory;
/* */ import org.mybatis.spring.SqlSessionFactoryBean;
/* */ import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.context.annotation.Bean;
/* */ import org.springframework.context.annotation.Configuration;
/* */ import org.springframework.core.env.Environment;
/* */ import org.springframework.core.io.DefaultResourceLoader;
/* */ import org.springframework.core.io.Resource;
/* */ import org.springframework.core.io.ResourceLoader;
/* */ import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
/* */ import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
/* */ import org.springframework.core.type.classreading.MetadataReader;
/* */ import org.springframework.util.ClassUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Configuration
/* */ public class MyBatisConfig
/* */ {
/* */ @Autowired
/* */ private Environment env;
/* */ static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
/* */
/* */ public static String setTypeAliasesPackage(String typeAliasesPackage) {
/* 42 */ PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver();
/* 43 */ CachingMetadataReaderFactory cachingMetadataReaderFactory = new CachingMetadataReaderFactory((ResourceLoader)pathMatchingResourcePatternResolver);
/* 44 */ List<String> allResult = new ArrayList<>();
/* */
/* */ try {
/* 47 */ for (String aliasesPackage : typeAliasesPackage.split(",")) {
/* */
/* 49 */ List<String> result = new ArrayList<>();
/* */
/* 51 */ aliasesPackage = "classpath*:" + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + "**/*.class";
/* 52 */ Resource[] resources = pathMatchingResourcePatternResolver.getResources(aliasesPackage);
/* 53 */ if (resources != null && resources.length > 0) {
/* */
/* 55 */ MetadataReader metadataReader = null;
/* 56 */ for (Resource resource : resources) {
/* */
/* 58 */ if (resource.isReadable()) {
/* */
/* 60 */ metadataReader = cachingMetadataReaderFactory.getMetadataReader(resource);
/* */
/* */ try {
/* 63 */ result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
/* */ }
/* 65 */ catch (ClassNotFoundException e) {
/* */
/* 67 */ e.printStackTrace();
/* */ }
/* */ }
/* */ }
/* */ }
/* 72 */ if (result.size() > 0) {
/* */
/* 74 */ HashSet<String> hashResult = new HashSet<>(result);
/* 75 */ allResult.addAll(hashResult);
/* */ }
/* */ }
/* 78 */ if (allResult.size() > 0)
/* */ {
/* 80 */ typeAliasesPackage = String.join(",", (CharSequence[])allResult.<String>toArray(new String[0]));
/* */ }
/* */ else
/* */ {
/* 84 */ throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
/* */ }
/* */
/* 87 */ } catch (IOException e) {
/* */
/* 89 */ e.printStackTrace();
/* */ }
/* 91 */ return typeAliasesPackage;
/* */ }
/* */
/* */
/* */ public Resource[] resolveMapperLocations(String[] mapperLocations) {
/* 96 */ PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver();
/* 97 */ List<Resource> resources = new ArrayList<>();
/* 98 */ if (mapperLocations != null)
/* */ {
/* 100 */ for (String mapperLocation : mapperLocations) {
/* */
/* */
/* */ try {
/* 104 */ Resource[] mappers = pathMatchingResourcePatternResolver.getResources(mapperLocation);
/* 105 */ resources.addAll(Arrays.asList(mappers));
/* */ }
/* 107 */ catch (IOException iOException) {}
/* */ }
/* */ }
/* */
/* */
/* */
/* 113 */ return resources.<Resource>toArray(new Resource[resources.size()]);
/* */ }
/* */
/* */
/* */ @Bean
/* */ public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception {
/* 119 */ String typeAliasesPackage = this.env.getProperty("mybatis.typeAliasesPackage");
/* 120 */ String mapperLocations = this.env.getProperty("mybatis.mapperLocations");
/* 121 */ String configLocation = this.env.getProperty("mybatis.configLocation");
/* 122 */ typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
/* 123 */ VFS.addImplClass(SpringBootVFS.class);
/* */
/* 125 */ SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
/* 126 */ sessionFactory.setDataSource(dataSource);
/* 127 */ sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
/* 128 */ sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
/* 129 */ sessionFactory.setConfigLocation((new DefaultResourceLoader()).getResource(configLocation));
/* 130 */ return sessionFactory.getObject();
/* */ }
/* */ }
import com.archive.common.utils.StringUtils;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import javax.sql.DataSource;
import org.apache.ibatis.io.VFS;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.util.ClassUtils;
@Configuration
public class MyBatisConfig
{
@Autowired
private Environment env;
static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
public static String setTypeAliasesPackage(String typeAliasesPackage) {
PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver();
CachingMetadataReaderFactory cachingMetadataReaderFactory = new CachingMetadataReaderFactory((ResourceLoader)pathMatchingResourcePatternResolver);
List<String> allResult = new ArrayList<>();
try {
for (String aliasesPackage : typeAliasesPackage.split(",")) {
List<String> result = new ArrayList<>();
aliasesPackage = "classpath*:" + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + "**/*.class";
Resource[] resources = pathMatchingResourcePatternResolver.getResources(aliasesPackage);
if (resources != null && resources.length > 0) {
MetadataReader metadataReader = null;
for (Resource resource : resources) {
if (resource.isReadable()) {
metadataReader = cachingMetadataReaderFactory.getMetadataReader(resource);
try {
result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
}
catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
}
if (result.size() > 0) {
HashSet<String> hashResult = new HashSet<>(result);
allResult.addAll(hashResult);
}
}
if (allResult.size() > 0)
{
typeAliasesPackage = String.join(",", (CharSequence[])allResult.<String>toArray(new String[0]));
}
else
{
throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
}
} catch (IOException e) {
e.printStackTrace();
}
return typeAliasesPackage;
}
public Resource[] resolveMapperLocations(String[] mapperLocations) {
PathMatchingResourcePatternResolver pathMatchingResourcePatternResolver = new PathMatchingResourcePatternResolver();
List<Resource> resources = new ArrayList<>();
if (mapperLocations != null)
{
for (String mapperLocation : mapperLocations) {
try {
Resource[] mappers = pathMatchingResourcePatternResolver.getResources(mapperLocation);
resources.addAll(Arrays.asList(mappers));
}
catch (IOException iOException) {}
}
}
return resources.<Resource>toArray(new Resource[resources.size()]);
}
@Bean
public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception {
String typeAliasesPackage = this.env.getProperty("mybatis.typeAliasesPackage");
String mapperLocations = this.env.getProperty("mybatis.mapperLocations");
String configLocation = this.env.getProperty("mybatis.configLocation");
typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
VFS.addImplClass(SpringBootVFS.class);
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setDataSource(dataSource);
sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
sessionFactory.setConfigLocation((new DefaultResourceLoader()).getResource(configLocation));
return sessionFactory.getObject();
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\config\MyBatisConfig.class

@ -1,145 +1,145 @@
/* */ package com.archive.framework.shiro.service
package com.archive.framework.shiro.service
;
/* */
/* */ import com.archive.common.exception.user.CaptchaException;
/* */ import com.archive.common.exception.user.UserBlockedException;
/* */ import com.archive.common.exception.user.UserDeleteException;
/* */ import com.archive.common.exception.user.UserNotExistsException;
/* */ import com.archive.common.exception.user.UserPasswordNotMatchException;
/* */ import com.archive.common.utils.DateUtils;
/* */ import com.archive.common.utils.MessageUtils;
/* */ import com.archive.common.utils.ServletUtils;
/* */ import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.framework.manager.AsyncManager;
/* */ import com.archive.framework.manager.factory.AsyncFactory;
/* */ import com.archive.framework.shiro.service.PasswordService;
/* */ import com.archive.project.system.user.domain.User;
/* */ import com.archive.project.system.user.domain.UserStatus;
/* */ import com.archive.project.system.user.service.IUserService;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Component;
/* */ import org.springframework.util.StringUtils;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Component
/* */ public class LoginService
/* */ {
/* */ @Autowired
/* */ private PasswordService passwordService;
/* */ @Autowired
/* */ private IUserService userService;
/* */
/* */ public User login(String username, String password) {
/* 44 */ if ("captchaError".equals(ServletUtils.getRequest().getAttribute("captcha"))) {
/* */
/* 46 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.jcaptcha.error", new Object[0]), new Object[0]));
/* 47 */ throw new CaptchaException();
/* */ }
/* */
/* 50 */ if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
/* */
/* 52 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("not.null", new Object[0]), new Object[0]));
/* 53 */ throw new UserNotExistsException();
/* */ }
/* */
/* 56 */ if (password.length() < 5 || password
/* 57 */ .length() > 20) {
/* */
/* 59 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.password.not.match", new Object[0]), new Object[0]));
/* 60 */ throw new UserPasswordNotMatchException();
/* */ }
/* */
/* */
/* 64 */ if (username.length() < 2 || username
/* 65 */ .length() > 20) {
/* */
/* 67 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.password.not.match", new Object[0]), new Object[0]));
/* 68 */ throw new UserPasswordNotMatchException();
/* */ }
/* */
/* */
/* 72 */ User user = this.userService.selectUserByLoginName(username);
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* 86 */ if (user == null) {
/* */
/* 88 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.not.exists", new Object[0]), new Object[0]));
/* 89 */ throw new UserNotExistsException();
/* */ }
/* */
/* 92 */ if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
/* */
/* 94 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.password.delete", new Object[0]), new Object[0]));
/* 95 */ throw new UserDeleteException();
/* */ }
/* */
/* 98 */ if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
/* */
/* 100 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.blocked", new Object[] { user.getRemark() }), new Object[0]));
/* 101 */ throw new UserBlockedException();
/* */ }
/* */
/* 104 */ this.passwordService.validate(user, password);
/* */
/* 106 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Success", MessageUtils.message("user.login.success", new Object[0]), new Object[0]));
/* 107 */ recordLoginInfo(user);
/* 108 */ return user;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void recordLoginInfo(User user) {
/* 136 */ user.setLoginIp(ShiroUtils.getIp());
/* 137 */ user.setLoginDate(DateUtils.getNowDate());
/* 138 */ this.userService.updateUserInfo(user);
/* */ }
/* */ }
import com.archive.common.exception.user.CaptchaException;
import com.archive.common.exception.user.UserBlockedException;
import com.archive.common.exception.user.UserDeleteException;
import com.archive.common.exception.user.UserNotExistsException;
import com.archive.common.exception.user.UserPasswordNotMatchException;
import com.archive.common.utils.DateUtils;
import com.archive.common.utils.MessageUtils;
import com.archive.common.utils.ServletUtils;
import com.archive.common.utils.security.ShiroUtils;
import com.archive.framework.manager.AsyncManager;
import com.archive.framework.manager.factory.AsyncFactory;
import com.archive.framework.shiro.service.PasswordService;
import com.archive.project.system.user.domain.User;
import com.archive.project.system.user.domain.UserStatus;
import com.archive.project.system.user.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
@Component
public class LoginService
{
@Autowired
private PasswordService passwordService;
@Autowired
private IUserService userService;
public User login(String username, String password) {
if ("captchaError".equals(ServletUtils.getRequest().getAttribute("captcha"))) {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.jcaptcha.error", new Object[0]), new Object[0]));
throw new CaptchaException();
}
if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("not.null", new Object[0]), new Object[0]));
throw new UserNotExistsException();
}
if (password.length() < 5 || password
.length() > 20) {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.password.not.match", new Object[0]), new Object[0]));
throw new UserPasswordNotMatchException();
}
if (username.length() < 2 || username
.length() > 20) {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.password.not.match", new Object[0]), new Object[0]));
throw new UserPasswordNotMatchException();
}
User user = this.userService.selectUserByLoginName(username);
if (user == null) {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.not.exists", new Object[0]), new Object[0]));
throw new UserNotExistsException();
}
if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.password.delete", new Object[0]), new Object[0]));
throw new UserDeleteException();
}
if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Error", MessageUtils.message("user.blocked", new Object[] { user.getRemark() }), new Object[0]));
throw new UserBlockedException();
}
this.passwordService.validate(user, password);
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, "Success", MessageUtils.message("user.login.success", new Object[0]), new Object[0]));
recordLoginInfo(user);
return user;
}
public void recordLoginInfo(User user) {
user.setLoginIp(ShiroUtils.getIp());
user.setLoginDate(DateUtils.getNowDate());
this.userService.updateUserInfo(user);
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\service\LoginService.class

@ -1,95 +1,95 @@
/* */ package com.archive.framework.shiro.web.filter
package com.archive.framework.shiro.web.filter
;
/* */
/* */ import com.archive.common.utils.MessageUtils;
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.common.utils.spring.SpringUtils;
/* */ import com.archive.framework.manager.AsyncManager;
/* */ import com.archive.framework.manager.factory.AsyncFactory;
/* */ import com.archive.project.monitor.online.service.UserOnlineServiceImpl;
/* */ import com.archive.project.system.user.domain.User;
/* */ import javax.servlet.ServletRequest;
/* */ import javax.servlet.ServletResponse;
/* */ import org.apache.shiro.session.SessionException;
/* */ import org.apache.shiro.subject.Subject;
/* */
/* */ import org.slf4j.Logger;
/* */ import org.slf4j.LoggerFactory;
/* */
/* */
/* */
/* */
/* */
/* */ public class LogoutFilter
/* */ extends org.apache.shiro.web.filter.authc.LogoutFilter
/* */ {
/* 26 */ private static final Logger log = LoggerFactory.getLogger(com.archive.framework.shiro.web.filter.LogoutFilter.class);
/* */
/* */
/* */
/* */ private String loginUrl;
/* */
/* */
/* */
/* */ public String getLoginUrl() {
/* 35 */ return this.loginUrl;
/* */ }
/* */
/* */
/* */ public void setLoginUrl(String loginUrl) {
/* 40 */ this.loginUrl = loginUrl;
/* */ }
/* */
/* */
/* */
/* */ @Override
/* */ protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception {
/* */ try {
/* 48 */ Subject subject = getSubject(request, response);
/* 49 */ String redirectUrl = getRedirectUrl(request, response, subject);
/* */
/* */ try {
/* 52 */ User user = ShiroUtils.getSysUser();
/* 53 */ if (StringUtils.isNotNull(user)) {
/* */
/* 55 */ String loginName = user.getLoginName();
/* */
/* 57 */ AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginName, "Logout", MessageUtils.message("user.logout.success", new Object[0]), new Object[0]));
/* */
/* 59 */ ((UserOnlineServiceImpl)SpringUtils.getBean(UserOnlineServiceImpl.class)).removeUserCache(loginName, ShiroUtils.getSessionId());
/* */ }
/* */
/* 62 */ subject.logout();
/* */ }
/* 64 */ catch (SessionException ise) {
/* */
/* 66 */ log.error("logout fail.", (Throwable)ise);
/* */ }
/* 68 */ issueRedirect(request, response, redirectUrl);
/* */ }
/* 70 */ catch (Exception e) {
/* */
/* 72 */ log.error("Encountered session exception during logout. This can generally safely be ignored.", e);
/* */ }
/* 74 */ return false;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @Override
/* */ protected String getRedirectUrl(ServletRequest request, ServletResponse response, Subject subject) {
/* 83 */ String url = getLoginUrl();
/* 84 */ if (StringUtils.isNotEmpty(url))
/* */ {
/* 86 */ return url;
/* */ }
/* 88 */ return super.getRedirectUrl(request, response, subject);
/* */ }
/* */ }
import com.archive.common.utils.MessageUtils;
import com.archive.common.utils.StringUtils;
import com.archive.common.utils.security.ShiroUtils;
import com.archive.common.utils.spring.SpringUtils;
import com.archive.framework.manager.AsyncManager;
import com.archive.framework.manager.factory.AsyncFactory;
import com.archive.project.monitor.online.service.UserOnlineServiceImpl;
import com.archive.project.system.user.domain.User;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import org.apache.shiro.session.SessionException;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class LogoutFilter
extends org.apache.shiro.web.filter.authc.LogoutFilter
{
private static final Logger log = LoggerFactory.getLogger(com.archive.framework.shiro.web.filter.LogoutFilter.class);
private String loginUrl;
public String getLoginUrl() {
return this.loginUrl;
}
public void setLoginUrl(String loginUrl) {
this.loginUrl = loginUrl;
}
@Override
protected boolean preHandle(ServletRequest request, ServletResponse response) throws Exception {
try {
Subject subject = getSubject(request, response);
String redirectUrl = getRedirectUrl(request, response, subject);
try {
User user = ShiroUtils.getSysUser();
if (StringUtils.isNotNull(user)) {
String loginName = user.getLoginName();
AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginName, "Logout", MessageUtils.message("user.logout.success", new Object[0]), new Object[0]));
((UserOnlineServiceImpl)SpringUtils.getBean(UserOnlineServiceImpl.class)).removeUserCache(loginName, ShiroUtils.getSessionId());
}
subject.logout();
}
catch (SessionException ise) {
log.error("logout fail.", (Throwable)ise);
}
issueRedirect(request, response, redirectUrl);
}
catch (Exception e) {
log.error("Encountered session exception during logout. This can generally safely be ignored.", e);
}
return false;
}
@Override
protected String getRedirectUrl(ServletRequest request, ServletResponse response, Subject subject) {
String url = getLoginUrl();
if (StringUtils.isNotEmpty(url))
{
return url;
}
return super.getRedirectUrl(request, response, subject);
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\filter\LogoutFilter.class

@ -1,104 +1,104 @@
/* */ package com.archive.framework.shiro.web.filter.online
package com.archive.framework.shiro.web.filter.online
;
/* */
/* */ import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.framework.shiro.session.OnlineSessionDAO;
/* */ import com.archive.project.monitor.online.domain.OnlineSession;
/* */ import com.archive.project.monitor.online.domain.OnlineStatus;
import com.archive.common.utils.security.ShiroUtils;
import com.archive.framework.shiro.session.OnlineSessionDAO;
import com.archive.project.monitor.online.domain.OnlineSession;
import com.archive.project.monitor.online.domain.OnlineStatus;
import com.archive.project.system.user.domain.User;
/* */ import java.io.IOException;
/* */ import javax.servlet.ServletRequest;
/* */ import javax.servlet.ServletResponse;
/* */ import org.apache.shiro.session.Session;
/* */ import org.apache.shiro.subject.Subject;
/* */ import org.apache.shiro.web.filter.AccessControlFilter;
/* */ import org.apache.shiro.web.util.WebUtils;
/* */ import org.springframework.beans.factory.annotation.Value;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class OnlineSessionFilter
/* */ extends AccessControlFilter
/* */ {
/* */ @Value("${shiro.user.loginUrl}")
/* */ private String loginUrl;
/* */ private OnlineSessionDAO onlineSessionDAO;
/* */ @Override
/* */ protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception {
/* 39 */ Subject subject = getSubject(request, response);
/* 40 */ if (subject == null || subject.getSession() == null)
/* */ {
/* 42 */ return true;
/* */ }
/* 44 */ Session session = this.onlineSessionDAO.readSession(subject.getSession().getId());
/* 45 */ if (session != null && session instanceof OnlineSession) {
/* */
/* 47 */ OnlineSession onlineSession = (OnlineSession)session;
/* 48 */ request.setAttribute("online_session", onlineSession);
/* */
/* 50 */ boolean isGuest = (onlineSession.getUserId() == null || onlineSession.getUserId().longValue() == 0L);
/* 51 */ if (isGuest == true) {
/* */
/* 53 */ User user = ShiroUtils.getSysUser();
/* 54 */ if (user != null) {
/* */
/* 56 */ onlineSession.setUserId(user.getUserId());
/* 57 */ onlineSession.setLoginName(user.getLoginName());
/* 58 */ onlineSession.setAvatar(user.getAvatar());
/* 59 */ onlineSession.setDeptName(user.getDept().getDeptName());
/* 60 */ onlineSession.markAttributeChanged();
/* */ }
/* */ }
/* */
/* 64 */ if (onlineSession.getStatus() == OnlineStatus.off_line)
/* */ {
/* 66 */ return false;
/* */ }
/* */ }
/* 69 */ return true;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @Override
/* */ protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
/* 78 */ Subject subject = getSubject(request, response);
/* 79 */ if (subject != null)
/* */ {
/* 81 */ subject.logout();
/* */ }
/* 83 */ saveRequestAndRedirectToLogin(request, response);
/* 84 */ return false;
/* */ }
/* */
/* */
/* */
/* */ @Override
/* */ protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
/* 91 */ WebUtils.issueRedirect(request, response, this.loginUrl);
/* */ }
/* */
/* */
/* */ public void setOnlineSessionDAO(OnlineSessionDAO onlineSessionDAO) {
/* 96 */ this.onlineSessionDAO = onlineSessionDAO;
/* */ }
/* */ }
import java.io.IOException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.filter.AccessControlFilter;
import org.apache.shiro.web.util.WebUtils;
import org.springframework.beans.factory.annotation.Value;
public class OnlineSessionFilter
extends AccessControlFilter
{
@Value("${shiro.user.loginUrl}")
private String loginUrl;
private OnlineSessionDAO onlineSessionDAO;
@Override
protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception {
Subject subject = getSubject(request, response);
if (subject == null || subject.getSession() == null)
{
return true;
}
Session session = this.onlineSessionDAO.readSession(subject.getSession().getId());
if (session != null && session instanceof OnlineSession) {
OnlineSession onlineSession = (OnlineSession)session;
request.setAttribute("online_session", onlineSession);
boolean isGuest = (onlineSession.getUserId() == null || onlineSession.getUserId().longValue() == 0L);
if (isGuest == true) {
User user = ShiroUtils.getSysUser();
if (user != null) {
onlineSession.setUserId(user.getUserId());
onlineSession.setLoginName(user.getLoginName());
onlineSession.setAvatar(user.getAvatar());
onlineSession.setDeptName(user.getDept().getDeptName());
onlineSession.markAttributeChanged();
}
}
if (onlineSession.getStatus() == OnlineStatus.off_line)
{
return false;
}
}
return true;
}
@Override
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
Subject subject = getSubject(request, response);
if (subject != null)
{
subject.logout();
}
saveRequestAndRedirectToLogin(request, response);
return false;
}
@Override
protected void redirectToLogin(ServletRequest request, ServletResponse response) throws IOException {
WebUtils.issueRedirect(request, response, this.loginUrl);
}
public void setOnlineSessionDAO(OnlineSessionDAO onlineSessionDAO) {
this.onlineSessionDAO = onlineSessionDAO;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\framework\shiro\web\filter\online\OnlineSessionFilter.class

@ -1,88 +1,88 @@
/* */ package com.archive.project.dajs.mldr.controller
package com.archive.project.dajs.mldr.controller
;
/* */
/* */ import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType;
/* */ import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.framework.web.page.TableDataInfo;
/* */ import com.archive.project.dajs.mldr.service.IMldrService;
/* */ import com.archive.project.system.dict.service.IDictTypeService;
/* */ import java.io.IOException;
/* */ import java.util.ArrayList;
/* */ import java.util.List;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap;
/* */ import org.springframework.validation.annotation.Validated;
/* */ import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Controller
/* */ @RequestMapping({"/dajs/mldr"})
/* */ public class MldrController
/* */ extends BaseController
/* */ {
/* 35 */ private String prefix = "dajs/mldr";
/* */
/* */
/* */ @Autowired
/* */ private IMldrService mldrService;
/* */
/* */ @Autowired
/* */ private IDictTypeService dictTypeService;
/* */
/* */
/* */ @RequiresPermissions({"dajs:mldr"})
/* */ @GetMapping
/* */ public String mldr(ModelMap mmap) {
/* 48 */ return this.prefix + "/mldr";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/list"})
/* */ @ResponseBody
/* */ public TableDataInfo list(String key, int page, int size) throws IOException {
/* 60 */ startPage();
/* */
/* 62 */ List<Object> list = new ArrayList();
/* 63 */ return getDataTable(list);
/* */ }
/* */
/* */
/* */ @Log(title = "目录导入-案卷卷内关联", businessType = BusinessType.ZLRK)
/* */ @PostMapping({"/dhgl"})
/* */ @ResponseBody
/* */ public AjaxResult dhgl(@Validated String id) {
/* 71 */ boolean flag = false;
/* */ try {
/* 73 */ flag = this.mldrService.dhgl(id);
/* 74 */ } catch (Exception ex) {
/* 75 */ System.out.println("关联出现异常:" + ex.getMessage());
/* 76 */ return error("关联失败!");
/* */ }
/* 78 */ if (flag) {
/* 79 */ return success("关联成功!");
/* */ }
/* 81 */ return error("关联失败!");
/* */ }
/* */ }
import com.archive.framework.aspectj.lang.annotation.Log;
import com.archive.framework.aspectj.lang.enums.BusinessType;
import com.archive.framework.web.controller.BaseController;
import com.archive.framework.web.domain.AjaxResult;
import com.archive.framework.web.page.TableDataInfo;
import com.archive.project.dajs.mldr.service.IMldrService;
import com.archive.project.system.dict.service.IDictTypeService;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping({"/dajs/mldr"})
public class MldrController
extends BaseController
{
private String prefix = "dajs/mldr";
@Autowired
private IMldrService mldrService;
@Autowired
private IDictTypeService dictTypeService;
@RequiresPermissions({"dajs:mldr"})
@GetMapping
public String mldr(ModelMap mmap) {
return this.prefix + "/mldr";
}
@GetMapping({"/list"})
@ResponseBody
public TableDataInfo list(String key, int page, int size) throws IOException {
startPage();
List<Object> list = new ArrayList();
return getDataTable(list);
}
@Log(title = "目录导入-案卷卷内关联", businessType = BusinessType.ZLRK)
@PostMapping({"/dhgl"})
@ResponseBody
public AjaxResult dhgl(@Validated String id) {
boolean flag = false;
try {
flag = this.mldrService.dhgl(id);
} catch (Exception ex) {
System.out.println("关联出现异常:" + ex.getMessage());
return error("关联失败!");
}
if (flag) {
return success("关联成功!");
}
return error("关联失败!");
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\mldr\controller\MldrController.class

@ -1,69 +1,69 @@
/* */ package com.archive.project.dajs.mldr.service.impl
package com.archive.project.dajs.mldr.service.impl
;
/* */
/* */ import com.archive.project.common.service.IExecuteSqlService;
/* */ import com.archive.project.dajs.archiveimportbatch.domain.ArchiveImportBatch;
/* */ import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService;
/* */ import com.archive.project.dajs.mldr.service.IMldrService;
/* */ import com.archive.project.dasz.archivetype.mapper.ArchiveTypeMapper;
/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper;
/* */ import java.util.LinkedHashMap;
/* */ import java.util.List;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service
/* */ public class MldrServiceImpl
/* */ implements IMldrService
/* */ {
/* */ @Autowired
/* */ private ArchiveTypeMapper archiveTypeMapper;
/* */ @Autowired
/* */ private PhysicalTableMapper physicalTableMapper;
/* */ @Autowired
/* */ private IExecuteSqlService executeSqlService;
/* */ @Autowired
/* */ private IArchiveImportBatchService archiveImportBatchService;
/* */
/* */ public boolean dhgl(String id) {
/* 40 */ boolean res = false;
/* 41 */ ArchiveImportBatch archiveImportBatch = new ArchiveImportBatch();
/* 42 */ archiveImportBatch.setId(Long.valueOf(Long.parseLong(id)));
/* 43 */ List<ArchiveImportBatch> list = this.archiveImportBatchService.selectArchiveImportBatchList(archiveImportBatch);
/* 44 */ if (list.size() > 0 && list.get(0) != null) {
/* 45 */ String batchNo = ((ArchiveImportBatch)list.get(0)).getBatchno();
/* 46 */ String code = ((ArchiveImportBatch)list.get(0)).getBatcharchivetypecode();
/* */
/* */
/* */
/* */
/* 51 */ String sql2 = "select id,dh from t_ar_" + code + "_folder where batchNo='" + batchNo + "'";
/* 52 */ List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql2);
/* 53 */ for (int i = 0; i < datalist.size(); i++) {
/* 54 */ String folderid = (((LinkedHashMap)datalist.get(i)).get("id") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("id").toString();
/* 55 */ String folderdh = (((LinkedHashMap)datalist.get(i)).get("dh") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("dh").toString();
/* 56 */ folderdh = folderdh.trim();
/* */
/* 58 */ String updatesql = "update t_ar_" + code + "_file set ownerid=" + folderid + " where dh like '" + folderdh + "%'";
/* 59 */ this.executeSqlService.update(updatesql);
/* */ }
/* */ }
/* 62 */ return res;
/* */ }
/* */ }
import com.archive.project.common.service.IExecuteSqlService;
import com.archive.project.dajs.archiveimportbatch.domain.ArchiveImportBatch;
import com.archive.project.dajs.archiveimportbatch.service.IArchiveImportBatchService;
import com.archive.project.dajs.mldr.service.IMldrService;
import com.archive.project.dasz.archivetype.mapper.ArchiveTypeMapper;
import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper;
import java.util.LinkedHashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class MldrServiceImpl
implements IMldrService
{
@Autowired
private ArchiveTypeMapper archiveTypeMapper;
@Autowired
private PhysicalTableMapper physicalTableMapper;
@Autowired
private IExecuteSqlService executeSqlService;
@Autowired
private IArchiveImportBatchService archiveImportBatchService;
public boolean dhgl(String id) {
boolean res = false;
ArchiveImportBatch archiveImportBatch = new ArchiveImportBatch();
archiveImportBatch.setId(Long.valueOf(Long.parseLong(id)));
List<ArchiveImportBatch> list = this.archiveImportBatchService.selectArchiveImportBatchList(archiveImportBatch);
if (list.size() > 0 && list.get(0) != null) {
String batchNo = ((ArchiveImportBatch)list.get(0)).getBatchno();
String code = ((ArchiveImportBatch)list.get(0)).getBatcharchivetypecode();
String sql2 = "select id,dh from t_ar_" + code + "_folder where batchNo='" + batchNo + "'";
List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql2);
for (int i = 0; i < datalist.size(); i++) {
String folderid = (((LinkedHashMap)datalist.get(i)).get("id") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("id").toString();
String folderdh = (((LinkedHashMap)datalist.get(i)).get("dh") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("dh").toString();
folderdh = folderdh.trim();
String updatesql = "update t_ar_" + code + "_file set ownerid=" + folderid + " where dh like '" + folderdh + "%'";
this.executeSqlService.update(updatesql);
}
}
return res;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dajs\mldr\service\impl\MldrServiceImpl.class

@ -1,131 +1,131 @@
/* */ package com.archive.project.dasz.mgc.controller
package com.archive.project.dasz.mgc.controller
;
/* */
/* */ import com.archive.common.utils.poi.ExcelUtil;
/* */ import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType;
/* */ import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.framework.web.page.TableDataInfo;
/* */ import com.archive.project.dasz.mgc.domain.Mgc;
/* */ import com.archive.project.dasz.mgc.service.IMgcService;
/* */ import java.util.List;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap;
/* */ import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PathVariable;
/* */ import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Controller
/* */ @RequestMapping({"/dasz/mgc"})
/* */ public class MgcController
/* */ extends BaseController
/* */ {
/* 32 */ private String prefix = "dasz/mgc";
/* */
/* */ @Autowired
/* */ private IMgcService mgcService;
/* */
/* */
/* */ @RequiresPermissions({"dasz:mgc:view"})
/* */ @GetMapping
/* */ public String mgc() {
/* 41 */ return this.prefix + "/mgc";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"dasz:mgc:list"})
/* */ @PostMapping({"/list"})
/* */ @ResponseBody
/* */ public TableDataInfo list(Mgc mgc) {
/* 52 */ startPage();
/* 53 */ List<Mgc> list = this.mgcService.selectMgcList(mgc);
/* 54 */ return getDataTable(list);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"dasz:mgc:export"})
/* */ @Log(title = "敏感词管理", businessType = BusinessType.EXPORT)
/* */ @PostMapping({"/export"})
/* */ @ResponseBody
/* */ public AjaxResult export(Mgc mgc) {
/* 66 */ List<Mgc> list = this.mgcService.selectMgcList(mgc);
/* 67 */ ExcelUtil<Mgc> util = new ExcelUtil(Mgc.class);
/* 68 */ return util.exportExcel(list, "mgc");
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/add"})
/* */ public String add() {
/* 77 */ return this.prefix + "/add";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"dasz:mgc:add"})
/* */ @Log(title = "敏感词管理", businessType = BusinessType.INSERT)
/* */ @PostMapping({"/add"})
/* */ @ResponseBody
/* */ public AjaxResult addSave(Mgc mgc) {
/* 89 */ return toAjax(this.mgcService.insertMgc(mgc));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/edit/{id}"})
/* */ public String edit(@PathVariable("id") Integer id, ModelMap mmap) {
/* 98 */ Mgc mgc = this.mgcService.selectMgcById(id);
/* 99 */ mmap.put("mgc", mgc);
/* 100 */ return this.prefix + "/edit";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"dasz:mgc:edit"})
/* */ @Log(title = "敏感词管理", businessType = BusinessType.UPDATE)
/* */ @PostMapping({"/edit"})
/* */ @ResponseBody
/* */ public AjaxResult editSave(Mgc mgc) {
/* 112 */ return toAjax(this.mgcService.updateMgc(mgc));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"dasz:mgc:remove"})
/* */ @Log(title = "敏感词管理", businessType = BusinessType.DELETE)
/* */ @PostMapping({"/remove"})
/* */ @ResponseBody
/* */ public AjaxResult remove(String ids) {
/* 124 */ return toAjax(this.mgcService.deleteMgcByIds(ids));
/* */ }
/* */ }
import com.archive.common.utils.poi.ExcelUtil;
import com.archive.framework.aspectj.lang.annotation.Log;
import com.archive.framework.aspectj.lang.enums.BusinessType;
import com.archive.framework.web.controller.BaseController;
import com.archive.framework.web.domain.AjaxResult;
import com.archive.framework.web.page.TableDataInfo;
import com.archive.project.dasz.mgc.domain.Mgc;
import com.archive.project.dasz.mgc.service.IMgcService;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping({"/dasz/mgc"})
public class MgcController
extends BaseController
{
private String prefix = "dasz/mgc";
@Autowired
private IMgcService mgcService;
@RequiresPermissions({"dasz:mgc:view"})
@GetMapping
public String mgc() {
return this.prefix + "/mgc";
}
@RequiresPermissions({"dasz:mgc:list"})
@PostMapping({"/list"})
@ResponseBody
public TableDataInfo list(Mgc mgc) {
startPage();
List<Mgc> list = this.mgcService.selectMgcList(mgc);
return getDataTable(list);
}
@RequiresPermissions({"dasz:mgc:export"})
@Log(title = "敏感词管理", businessType = BusinessType.EXPORT)
@PostMapping({"/export"})
@ResponseBody
public AjaxResult export(Mgc mgc) {
List<Mgc> list = this.mgcService.selectMgcList(mgc);
ExcelUtil<Mgc> util = new ExcelUtil(Mgc.class);
return util.exportExcel(list, "mgc");
}
@GetMapping({"/add"})
public String add() {
return this.prefix + "/add";
}
@RequiresPermissions({"dasz:mgc:add"})
@Log(title = "敏感词管理", businessType = BusinessType.INSERT)
@PostMapping({"/add"})
@ResponseBody
public AjaxResult addSave(Mgc mgc) {
return toAjax(this.mgcService.insertMgc(mgc));
}
@GetMapping({"/edit/{id}"})
public String edit(@PathVariable("id") Integer id, ModelMap mmap) {
Mgc mgc = this.mgcService.selectMgcById(id);
mmap.put("mgc", mgc);
return this.prefix + "/edit";
}
@RequiresPermissions({"dasz:mgc:edit"})
@Log(title = "敏感词管理", businessType = BusinessType.UPDATE)
@PostMapping({"/edit"})
@ResponseBody
public AjaxResult editSave(Mgc mgc) {
return toAjax(this.mgcService.updateMgc(mgc));
}
@RequiresPermissions({"dasz:mgc:remove"})
@Log(title = "敏感词管理", businessType = BusinessType.DELETE)
@PostMapping({"/remove"})
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(this.mgcService.deleteMgcByIds(ids));
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\mgc\controller\MgcController.class

@ -1,71 +1,71 @@
/* */ package com.archive.project.dasz.mgc.domain
package com.archive.project.dasz.mgc.domain
;
/* */
/* */ import com.archive.framework.aspectj.lang.annotation.Excel;
/* */ import com.archive.framework.web.domain.BaseEntity;
/* */ import org.apache.commons.lang3.builder.ToStringBuilder;
/* */ import org.apache.commons.lang3.builder.ToStringStyle;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Mgc
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ private Integer id;
/* */ @Excel(name = "敏感词类型")
/* */ private String mgc;
/* */ @Excel(name = "敏感词类型")
/* */ private String mgclx;
/* */
/* */ public void setId(Integer id) {
/* 31 */ this.id = id;
/* */ }
/* */
/* */
/* */ public Integer getId() {
/* 36 */ return this.id;
/* */ }
/* */
/* */ public void setMgc(String mgc) {
/* 40 */ this.mgc = mgc;
/* */ }
/* */
/* */
/* */ public String getMgc() {
/* 45 */ return this.mgc;
/* */ }
/* */
/* */ public void setMgclx(String mgclx) {
/* 49 */ this.mgclx = mgclx;
/* */ }
/* */
/* */
/* */ public String getMgclx() {
/* 54 */ return this.mgclx;
/* */ }
/* */
/* */
/* */ public String toString() {
/* 59 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 60 */ .append("id", getId())
/* 61 */ .append("mgc", getMgc())
/* 62 */ .append("remark", getRemark())
/* 63 */ .append("mgclx", getMgclx())
/* 64 */ .toString();
/* */ }
/* */ }
import com.archive.framework.aspectj.lang.annotation.Excel;
import com.archive.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
public class Mgc
extends BaseEntity
{
private static final long serialVersionUID = 1L;
private Integer id;
@Excel(name = "敏感词类型")
private String mgc;
@Excel(name = "敏感词类型")
private String mgclx;
public void setId(Integer id) {
this.id = id;
}
public Integer getId() {
return this.id;
}
public void setMgc(String mgc) {
this.mgc = mgc;
}
public String getMgc() {
return this.mgc;
}
public void setMgclx(String mgclx) {
this.mgclx = mgclx;
}
public String getMgclx() {
return this.mgclx;
}
public String toString() {
return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
.append("id", getId())
.append("mgc", getMgc())
.append("remark", getRemark())
.append("mgclx", getMgclx())
.toString();
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\mgc\domain\Mgc.class

@ -1,99 +1,99 @@
/* */ package com.archive.project.dasz.mgc.service.impl
package com.archive.project.dasz.mgc.service.impl
;
/* */
/* */ import com.archive.common.utils.text.Convert;
/* */ import com.archive.project.dasz.mgc.domain.Mgc;
/* */ import com.archive.project.dasz.mgc.mapper.MgcMapper;
/* */ import com.archive.project.dasz.mgc.service.IMgcService;
/* */ import java.util.List;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service
/* */ public class MgcServiceImpl
/* */ implements IMgcService
/* */ {
/* */ @Autowired
/* */ private MgcMapper mgcMapper;
/* */
/* */ public Mgc selectMgcById(Integer id) {
/* 32 */ return this.mgcMapper.selectMgcById(id);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Mgc> selectMgcList(Mgc mgc) {
/* 44 */ return this.mgcMapper.selectMgcList(mgc);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int insertMgc(Mgc mgc) {
/* 56 */ return this.mgcMapper.insertMgc(mgc);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int updateMgc(Mgc mgc) {
/* 68 */ return this.mgcMapper.updateMgc(mgc);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteMgcByIds(String ids) {
/* 80 */ return this.mgcMapper.deleteMgcByIds(Convert.toStrArray(ids));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteMgcById(Integer id) {
/* 92 */ return this.mgcMapper.deleteMgcById(id);
/* */ }
/* */ }
import com.archive.common.utils.text.Convert;
import com.archive.project.dasz.mgc.domain.Mgc;
import com.archive.project.dasz.mgc.mapper.MgcMapper;
import com.archive.project.dasz.mgc.service.IMgcService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class MgcServiceImpl
implements IMgcService
{
@Autowired
private MgcMapper mgcMapper;
public Mgc selectMgcById(Integer id) {
return this.mgcMapper.selectMgcById(id);
}
public List<Mgc> selectMgcList(Mgc mgc) {
return this.mgcMapper.selectMgcList(mgc);
}
public int insertMgc(Mgc mgc) {
return this.mgcMapper.insertMgc(mgc);
}
public int updateMgc(Mgc mgc) {
return this.mgcMapper.updateMgc(mgc);
}
public int deleteMgcByIds(String ids) {
return this.mgcMapper.deleteMgcByIds(Convert.toStrArray(ids));
}
public int deleteMgcById(Integer id) {
return this.mgcMapper.deleteMgcById(id);
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\dasz\mgc\service\impl\MgcServiceImpl.class

@ -1,99 +1,99 @@
/* */ package com.archive.project.monitor.logininfor.controller
package com.archive.project.monitor.logininfor.controller
;
/* */
/* */ import com.archive.common.utils.poi.ExcelUtil;
/* */ import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType;
/* */ import com.archive.framework.shiro.service.PasswordService;
/* */ import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.framework.web.page.TableDataInfo;
/* */ import com.archive.project.monitor.logininfor.domain.Logininfor;
/* */ import com.archive.project.monitor.logininfor.service.ILogininforService;
/* */ import java.util.List;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller;
/* */ import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */ @Controller
/* */ @RequestMapping({"/monitor/logininfor"})
/* */ public class LogininforController
/* */ extends BaseController
/* */ {
/* 30 */ private String prefix = "monitor/logininfor";
/* */
/* */ @Autowired
/* */ private ILogininforService logininforService;
/* */
/* */ @Autowired
/* */ private PasswordService passwordService;
/* */
/* */
/* */ @RequiresPermissions({"monitor:logininfor:view"})
/* */ @GetMapping
/* */ public String logininfor() {
/* 42 */ return this.prefix + "/logininfor";
/* */ }
/* */
/* */
/* */ @RequiresPermissions({"monitor:logininfor:list"})
/* */ @PostMapping({"/list"})
/* */ @ResponseBody
/* */ public TableDataInfo list(Logininfor logininfor) {
/* 50 */ startPage();
/* 51 */ List<Logininfor> list = this.logininforService.selectLogininforList(logininfor);
/* 52 */ return getDataTable(list);
/* */ }
/* */
/* */
/* */ @Log(title = "登录日志", businessType = BusinessType.EXPORT)
/* */ @RequiresPermissions({"monitor:logininfor:export"})
/* */ @PostMapping({"/export"})
/* */ @ResponseBody
/* */ public AjaxResult export(Logininfor logininfor) {
/* 61 */ List<Logininfor> list = this.logininforService.selectLogininforList(logininfor);
/* 62 */ ExcelUtil<Logininfor> util = new ExcelUtil(Logininfor.class);
/* 63 */ return util.exportExcel(list, "登录日志");
/* */ }
/* */
/* */
/* */ @RequiresPermissions({"monitor:logininfor:remove"})
/* */ @Log(title = "登录日志", businessType = BusinessType.DELETE)
/* */ @PostMapping({"/remove"})
/* */ @ResponseBody
/* */ public AjaxResult remove(String ids) {
/* 72 */ return toAjax(this.logininforService.deleteLogininforByIds(ids));
/* */ }
/* */
/* */
/* */ @RequiresPermissions({"monitor:logininfor:remove"})
/* */ @Log(title = "登录日志", businessType = BusinessType.CLEAN)
/* */ @PostMapping({"/clean"})
/* */ @ResponseBody
/* */ public AjaxResult clean() {
/* 81 */ this.logininforService.cleanLogininfor();
/* 82 */ return success();
/* */ }
/* */
/* */
/* */ @RequiresPermissions({"monitor:logininfor:unlock"})
/* */ @Log(title = "账户解锁", businessType = BusinessType.OTHER)
/* */ @PostMapping({"/unlock"})
/* */ @ResponseBody
/* */ public AjaxResult unlock(String loginName) {
/* 91 */ this.passwordService.clearLoginRecordCache(loginName);
/* 92 */ return success();
/* */ }
/* */ }
import com.archive.common.utils.poi.ExcelUtil;
import com.archive.framework.aspectj.lang.annotation.Log;
import com.archive.framework.aspectj.lang.enums.BusinessType;
import com.archive.framework.shiro.service.PasswordService;
import com.archive.framework.web.controller.BaseController;
import com.archive.framework.web.domain.AjaxResult;
import com.archive.framework.web.page.TableDataInfo;
import com.archive.project.monitor.logininfor.domain.Logininfor;
import com.archive.project.monitor.logininfor.service.ILogininforService;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping({"/monitor/logininfor"})
public class LogininforController
extends BaseController
{
private String prefix = "monitor/logininfor";
@Autowired
private ILogininforService logininforService;
@Autowired
private PasswordService passwordService;
@RequiresPermissions({"monitor:logininfor:view"})
@GetMapping
public String logininfor() {
return this.prefix + "/logininfor";
}
@RequiresPermissions({"monitor:logininfor:list"})
@PostMapping({"/list"})
@ResponseBody
public TableDataInfo list(Logininfor logininfor) {
startPage();
List<Logininfor> list = this.logininforService.selectLogininforList(logininfor);
return getDataTable(list);
}
@Log(title = "登录日志", businessType = BusinessType.EXPORT)
@RequiresPermissions({"monitor:logininfor:export"})
@PostMapping({"/export"})
@ResponseBody
public AjaxResult export(Logininfor logininfor) {
List<Logininfor> list = this.logininforService.selectLogininforList(logininfor);
ExcelUtil<Logininfor> util = new ExcelUtil(Logininfor.class);
return util.exportExcel(list, "登录日志");
}
@RequiresPermissions({"monitor:logininfor:remove"})
@Log(title = "登录日志", businessType = BusinessType.DELETE)
@PostMapping({"/remove"})
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(this.logininforService.deleteLogininforByIds(ids));
}
@RequiresPermissions({"monitor:logininfor:remove"})
@Log(title = "登录日志", businessType = BusinessType.CLEAN)
@PostMapping({"/clean"})
@ResponseBody
public AjaxResult clean() {
this.logininforService.cleanLogininfor();
return success();
}
@RequiresPermissions({"monitor:logininfor:unlock"})
@Log(title = "账户解锁", businessType = BusinessType.OTHER)
@PostMapping({"/unlock"})
@ResponseBody
public AjaxResult unlock(String loginName) {
this.passwordService.clearLoginRecordCache(loginName);
return success();
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\logininfor\controller\LogininforController.class

@ -1,90 +1,90 @@
/* */ package com.archive.project.monitor.logininfor.service
package com.archive.project.monitor.logininfor.service
;
/* */
/* */ import com.archive.common.utils.text.Convert;
/* */ import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.project.monitor.logininfor.domain.Logininfor;
/* */ import com.archive.project.monitor.logininfor.mapper.LogininforMapper;
/* */ import com.archive.project.monitor.logininfor.service.ILogininforService;
/* */ import java.util.List;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service
/* */ public class LogininforServiceImpl
/* */ implements ILogininforService
/* */ {
/* */ @Autowired
/* */ private LogininforMapper logininforMapper;
/* */ @Autowired
/* */ private ArchiveConfig archiveConfig;
/* */
/* */ public void insertLogininfor(Logininfor logininfor) {
/* 35 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 36 */ this.logininforMapper.insertLogininfor(logininfor);
/* */ }
/* 38 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 39 */ this.logininforMapper.insertLogininforSqlite(logininfor);
/* */ } else {
/* 41 */ this.logininforMapper.insertLogininfor(logininfor);
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Logininfor> selectLogininforList(Logininfor logininfor) {
/* 54 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 55 */ return this.logininforMapper.selectLogininforList(logininfor);
/* */ }
/* 57 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 58 */ return this.logininforMapper.selectLogininforListSqlite(logininfor);
/* */ }
/* 60 */ return this.logininforMapper.selectLogininforList(logininfor);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteLogininforByIds(String ids) {
/* 74 */ return this.logininforMapper.deleteLogininforByIds(Convert.toStrArray(ids));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void cleanLogininfor() {
/* 83 */ this.logininforMapper.cleanLogininfor();
/* */ }
/* */ }
import com.archive.common.utils.text.Convert;
import com.archive.framework.config.ArchiveConfig;
import com.archive.project.monitor.logininfor.domain.Logininfor;
import com.archive.project.monitor.logininfor.mapper.LogininforMapper;
import com.archive.project.monitor.logininfor.service.ILogininforService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class LogininforServiceImpl
implements ILogininforService
{
@Autowired
private LogininforMapper logininforMapper;
@Autowired
private ArchiveConfig archiveConfig;
public void insertLogininfor(Logininfor logininfor) {
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
this.logininforMapper.insertLogininfor(logininfor);
}
else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
this.logininforMapper.insertLogininforSqlite(logininfor);
} else {
this.logininforMapper.insertLogininfor(logininfor);
}
}
public List<Logininfor> selectLogininforList(Logininfor logininfor) {
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
return this.logininforMapper.selectLogininforList(logininfor);
}
if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
return this.logininforMapper.selectLogininforListSqlite(logininfor);
}
return this.logininforMapper.selectLogininforList(logininfor);
}
public int deleteLogininforByIds(String ids) {
return this.logininforMapper.deleteLogininforByIds(Convert.toStrArray(ids));
}
public void cleanLogininfor() {
this.logininforMapper.cleanLogininfor();
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\logininfor\service\LogininforServiceImpl.class

@ -1,171 +1,171 @@
/* */ package com.archive.project.monitor.online.domain
package com.archive.project.monitor.online.domain
;
/* */
/* */ import org.apache.commons.lang3.builder.ToStringBuilder;
/* */ import org.apache.commons.lang3.builder.ToStringStyle;
/* */ import org.apache.shiro.session.mgt.SimpleSession;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class OnlineSession
/* */ extends SimpleSession
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ private Long userId;
/* */ private String loginName;
/* */ private String deptName;
/* */ private String avatar;
/* */ private String host;
/* */ private String browser;
/* */ private String os;
/* 38 */ private OnlineStatus status = OnlineStatus.on_line;
/* */
/* */
/* */ private transient boolean attributeChanged = false;
/* */
/* */
/* */
/* */ public String getHost() {
/* 46 */ return this.host;
/* */ }
/* */
/* */
/* */
/* */ public void setHost(String host) {
/* 52 */ this.host = host;
/* */ }
/* */
/* */
/* */ public String getBrowser() {
/* 57 */ return this.browser;
/* */ }
/* */
/* */
/* */ public void setBrowser(String browser) {
/* 62 */ this.browser = browser;
/* */ }
/* */
/* */
/* */ public String getOs() {
/* 67 */ return this.os;
/* */ }
/* */
/* */
/* */ public void setOs(String os) {
/* 72 */ this.os = os;
/* */ }
/* */
/* */
/* */ public Long getUserId() {
/* 77 */ return this.userId;
/* */ }
/* */
/* */
/* */ public void setUserId(Long userId) {
/* 82 */ this.userId = userId;
/* */ }
/* */
/* */
/* */ public String getLoginName() {
/* 87 */ return this.loginName;
/* */ }
/* */
/* */
/* */ public void setLoginName(String loginName) {
/* 92 */ this.loginName = loginName;
/* */ }
/* */
/* */
/* */ public String getDeptName() {
/* 97 */ return this.deptName;
/* */ }
/* */
/* */
/* */ public void setDeptName(String deptName) {
/* 102 */ this.deptName = deptName;
/* */ }
/* */
/* */
/* */ public OnlineStatus getStatus() {
/* 107 */ return this.status;
/* */ }
/* */
/* */
/* */ public void setStatus(OnlineStatus status) {
/* 112 */ this.status = status;
/* */ }
/* */
/* */
/* */ public void markAttributeChanged() {
/* 117 */ this.attributeChanged = true;
/* */ }
/* */
/* */
/* */ public void resetAttributeChanged() {
/* 122 */ this.attributeChanged = false;
/* */ }
/* */
/* */
/* */ public boolean isAttributeChanged() {
/* 127 */ return this.attributeChanged;
/* */ }
/* */
/* */
/* */ public String getAvatar() {
/* 132 */ return this.avatar;
/* */ }
/* */
/* */
/* */ public void setAvatar(String avatar) {
/* 137 */ this.avatar = avatar;
/* */ }
/* */
/* */
/* */
/* */ public void setAttribute(Object key, Object value) {
/* 143 */ super.setAttribute(key, value);
/* */ }
/* */
/* */
/* */
/* */ public Object removeAttribute(Object key) {
/* 149 */ return super.removeAttribute(key);
/* */ }
/* */
/* */
/* */ public String toString() {
/* 154 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 155 */ .append("userId", getUserId())
/* 156 */ .append("loginName", getLoginName())
/* 157 */ .append("deptName", getDeptName())
/* 158 */ .append("avatar", getAvatar())
/* 159 */ .append("host", getHost())
/* 160 */ .append("browser", getBrowser())
/* 161 */ .append("os", getOs())
/* 162 */ .append("status", getStatus())
/* 163 */ .append("attributeChanged", isAttributeChanged())
/* 164 */ .toString();
/* */ }
/* */ }
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.shiro.session.mgt.SimpleSession;
public class OnlineSession
extends SimpleSession
{
private static final long serialVersionUID = 1L;
private Long userId;
private String loginName;
private String deptName;
private String avatar;
private String host;
private String browser;
private String os;
private OnlineStatus status = OnlineStatus.on_line;
private transient boolean attributeChanged = false;
public String getHost() {
return this.host;
}
public void setHost(String host) {
this.host = host;
}
public String getBrowser() {
return this.browser;
}
public void setBrowser(String browser) {
this.browser = browser;
}
public String getOs() {
return this.os;
}
public void setOs(String os) {
this.os = os;
}
public Long getUserId() {
return this.userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getLoginName() {
return this.loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getDeptName() {
return this.deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public OnlineStatus getStatus() {
return this.status;
}
public void setStatus(OnlineStatus status) {
this.status = status;
}
public void markAttributeChanged() {
this.attributeChanged = true;
}
public void resetAttributeChanged() {
this.attributeChanged = false;
}
public boolean isAttributeChanged() {
return this.attributeChanged;
}
public String getAvatar() {
return this.avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public void setAttribute(Object key, Object value) {
super.setAttribute(key, value);
}
public Object removeAttribute(Object key) {
return super.removeAttribute(key);
}
public String toString() {
return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
.append("userId", getUserId())
.append("loginName", getLoginName())
.append("deptName", getDeptName())
.append("avatar", getAvatar())
.append("host", getHost())
.append("browser", getBrowser())
.append("os", getOs())
.append("status", getStatus())
.append("attributeChanged", isAttributeChanged())
.toString();
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\online\domain\OnlineSession.class

@ -1,187 +1,187 @@
/* */ package com.archive.project.monitor.online.domain
package com.archive.project.monitor.online.domain
;
/* */
/* */ import com.archive.project.monitor.online.domain.OnlineSession;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public enum OnlineStatus
/* */ {
/* 170 */ on_line("在线"), off_line("离线");
/* */
/* */ private final String info;
/* */
/* */ OnlineStatus(String info) {
/* 175 */ this.info = info;
/* */ }
/* */
/* */
/* */ public String getInfo() {
/* 180 */ return this.info;
/* */ }
/* */ }
import com.archive.project.monitor.online.domain.OnlineSession;
public enum OnlineStatus
{
on_line("在线"), off_line("离线");
private final String info;
OnlineStatus(String info) {
this.info = info;
}
public String getInfo() {
return this.info;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\online\domain\OnlineSession$OnlineStatus.class

@ -1,66 +1,66 @@
/* */ package com.archive.project.monitor.server.domain
package com.archive.project.monitor.server.domain
;
/* */
/* */ import com.archive.common.utils.Arith;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Mem
/* */ {
/* */ private double total;
/* */ private double used;
/* */ private double free;
/* */
/* */ public double getTotal() {
/* 29 */ return Arith.div(this.total, 1.073741824E9D, 2);
/* */ }
/* */
/* */
/* */ public void setTotal(long total) {
/* 34 */ this.total = total;
/* */ }
/* */
/* */
/* */ public double getUsed() {
/* 39 */ return Arith.div(this.used, 1.073741824E9D, 2);
/* */ }
/* */
/* */
/* */ public void setUsed(long used) {
/* 44 */ this.used = used;
/* */ }
/* */
/* */
/* */ public double getFree() {
/* 49 */ return Arith.div(this.free, 1.073741824E9D, 2);
/* */ }
/* */
/* */
/* */ public void setFree(long free) {
/* 54 */ this.free = free;
/* */ }
/* */
/* */
/* */ public double getUsage() {
/* 59 */ return Arith.mul(Arith.div(this.used, this.total, 4), 100.0D);
/* */ }
/* */ }
import com.archive.common.utils.Arith;
public class Mem
{
private double total;
private double used;
private double free;
public double getTotal() {
return Arith.div(this.total, 1.073741824E9D, 2);
}
public void setTotal(long total) {
this.total = total;
}
public double getUsed() {
return Arith.div(this.used, 1.073741824E9D, 2);
}
public void setUsed(long used) {
this.used = used;
}
public double getFree() {
return Arith.div(this.free, 1.073741824E9D, 2);
}
public void setFree(long free) {
this.free = free;
}
public double getUsage() {
return Arith.mul(Arith.div(this.used, this.total, 4), 100.0D);
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\monitor\server\domain\Mem.class

@ -1,196 +1,196 @@
/* */ package com.archive.project.system.menu.controller
package com.archive.project.system.menu.controller
;
/* */
/* */ import com.archive.common.utils.security.AuthorizationUtils;
/* */ import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType;
/* */ import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.framework.web.domain.Ztree;
/* */ import com.archive.project.system.menu.domain.Menu;
/* */ import com.archive.project.system.menu.service.IMenuService;
/* */ import com.archive.project.system.role.domain.Role;
/* */ import java.util.List;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap;
/* */ import org.springframework.validation.annotation.Validated;
/* */ import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PathVariable;
/* */ import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Controller
/* */ @RequestMapping({"/system/menu"})
/* */ public class MenuController
/* */ extends BaseController
/* */ {
/* 34 */ private String prefix = "system/menu";
/* */
/* */ @Autowired
/* */ private IMenuService menuService;
/* */
/* */
/* */ @RequiresPermissions({"system:menu:view"})
/* */ @GetMapping
/* */ public String menu() {
/* 43 */ return this.prefix + "/menu";
/* */ }
/* */
/* */
/* */ @RequiresPermissions({"system:menu:list"})
/* */ @PostMapping({"/list"})
/* */ @ResponseBody
/* */ public List<Menu> list(Menu menu) {
/* 51 */ List<Menu> menuList = this.menuService.selectMenuList(menu);
/* 52 */ return menuList;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "菜单管理", businessType = BusinessType.DELETE)
/* */ @RequiresPermissions({"system:menu:remove"})
/* */ @GetMapping({"/remove/{menuId}"})
/* */ @ResponseBody
/* */ public AjaxResult remove(@PathVariable("menuId") Long menuId) {
/* 64 */ if (this.menuService.selectCountMenuByParentId(menuId) > 0)
/* */ {
/* 66 */ return AjaxResult.warn("存在子菜单,不允许删除");
/* */ }
/* 68 */ if (this.menuService.selectCountRoleMenuByMenuId(menuId) > 0)
/* */ {
/* 70 */ return AjaxResult.warn("菜单已分配,不允许删除");
/* */ }
/* 72 */ AuthorizationUtils.clearAllCachedAuthorizationInfo();
/* 73 */ return toAjax(this.menuService.deleteMenuById(menuId));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/add/{parentId}"})
/* */ public String add(@PathVariable("parentId") Long parentId, ModelMap mmap) {
/* 82 */ Menu menu = null;
/* 83 */ if (0L != parentId.longValue()) {
/* */
/* 85 */ menu = this.menuService.selectMenuById(parentId);
/* */ }
/* */ else {
/* */
/* 89 */ menu = new Menu();
/* 90 */ menu.setMenuId(Long.valueOf(0L));
/* 91 */ menu.setMenuName("主目录");
/* */ }
/* 93 */ mmap.put("menu", menu);
/* 94 */ return this.prefix + "/add";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "菜单管理", businessType = BusinessType.INSERT)
/* */ @RequiresPermissions({"system:menu:add"})
/* */ @PostMapping({"/add"})
/* */ @ResponseBody
/* */ public AjaxResult addSave(@Validated Menu menu) {
/* 106 */ if ("1".equals(this.menuService.checkMenuNameUnique(menu)))
/* */ {
/* 108 */ return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
/* */ }
/* 110 */ AuthorizationUtils.clearAllCachedAuthorizationInfo();
/* 111 */ return toAjax(this.menuService.insertMenu(menu));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/edit/{menuId}"})
/* */ public String edit(@PathVariable("menuId") Long menuId, ModelMap mmap) {
/* 120 */ mmap.put("menu", this.menuService.selectMenuById(menuId));
/* 121 */ return this.prefix + "/edit";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @Log(title = "菜单管理", businessType = BusinessType.UPDATE)
/* */ @RequiresPermissions({"system:menu:edit"})
/* */ @PostMapping({"/edit"})
/* */ @ResponseBody
/* */ public AjaxResult editSave(@Validated Menu menu) {
/* 133 */ if ("1".equals(this.menuService.checkMenuNameUnique(menu)))
/* */ {
/* 135 */ return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
/* */ }
/* 137 */ AuthorizationUtils.clearAllCachedAuthorizationInfo();
/* 138 */ return toAjax(this.menuService.updateMenu(menu));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/icon"})
/* */ public String icon() {
/* 147 */ return this.prefix + "/icon";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @PostMapping({"/checkMenuNameUnique"})
/* */ @ResponseBody
/* */ public String checkMenuNameUnique(Menu menu) {
/* 157 */ return this.menuService.checkMenuNameUnique(menu);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/roleMenuTreeData"})
/* */ @ResponseBody
/* */ public List<Ztree> roleMenuTreeData(Role role) {
/* 167 */ List<Ztree> ztrees = this.menuService.roleMenuTreeData(role);
/* 168 */ return ztrees;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/menuTreeData"})
/* */ @ResponseBody
/* */ public List<Ztree> menuTreeData(Role role) {
/* 178 */ List<Ztree> ztrees = this.menuService.menuTreeData();
/* 179 */ return ztrees;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/selectMenuTree/{menuId}"})
/* */ public String selectMenuTree(@PathVariable("menuId") Long menuId, ModelMap mmap) {
/* 188 */ mmap.put("menu", this.menuService.selectMenuById(menuId));
/* 189 */ return this.prefix + "/tree";
/* */ }
/* */ }
import com.archive.common.utils.security.AuthorizationUtils;
import com.archive.framework.aspectj.lang.annotation.Log;
import com.archive.framework.aspectj.lang.enums.BusinessType;
import com.archive.framework.web.controller.BaseController;
import com.archive.framework.web.domain.AjaxResult;
import com.archive.framework.web.domain.Ztree;
import com.archive.project.system.menu.domain.Menu;
import com.archive.project.system.menu.service.IMenuService;
import com.archive.project.system.role.domain.Role;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping({"/system/menu"})
public class MenuController
extends BaseController
{
private String prefix = "system/menu";
@Autowired
private IMenuService menuService;
@RequiresPermissions({"system:menu:view"})
@GetMapping
public String menu() {
return this.prefix + "/menu";
}
@RequiresPermissions({"system:menu:list"})
@PostMapping({"/list"})
@ResponseBody
public List<Menu> list(Menu menu) {
List<Menu> menuList = this.menuService.selectMenuList(menu);
return menuList;
}
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
@RequiresPermissions({"system:menu:remove"})
@GetMapping({"/remove/{menuId}"})
@ResponseBody
public AjaxResult remove(@PathVariable("menuId") Long menuId) {
if (this.menuService.selectCountMenuByParentId(menuId) > 0)
{
return AjaxResult.warn("存在子菜单,不允许删除");
}
if (this.menuService.selectCountRoleMenuByMenuId(menuId) > 0)
{
return AjaxResult.warn("菜单已分配,不允许删除");
}
AuthorizationUtils.clearAllCachedAuthorizationInfo();
return toAjax(this.menuService.deleteMenuById(menuId));
}
@GetMapping({"/add/{parentId}"})
public String add(@PathVariable("parentId") Long parentId, ModelMap mmap) {
Menu menu = null;
if (0L != parentId.longValue()) {
menu = this.menuService.selectMenuById(parentId);
}
else {
menu = new Menu();
menu.setMenuId(Long.valueOf(0L));
menu.setMenuName("主目录");
}
mmap.put("menu", menu);
return this.prefix + "/add";
}
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
@RequiresPermissions({"system:menu:add"})
@PostMapping({"/add"})
@ResponseBody
public AjaxResult addSave(@Validated Menu menu) {
if ("1".equals(this.menuService.checkMenuNameUnique(menu)))
{
return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
}
AuthorizationUtils.clearAllCachedAuthorizationInfo();
return toAjax(this.menuService.insertMenu(menu));
}
@GetMapping({"/edit/{menuId}"})
public String edit(@PathVariable("menuId") Long menuId, ModelMap mmap) {
mmap.put("menu", this.menuService.selectMenuById(menuId));
return this.prefix + "/edit";
}
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
@RequiresPermissions({"system:menu:edit"})
@PostMapping({"/edit"})
@ResponseBody
public AjaxResult editSave(@Validated Menu menu) {
if ("1".equals(this.menuService.checkMenuNameUnique(menu)))
{
return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
}
AuthorizationUtils.clearAllCachedAuthorizationInfo();
return toAjax(this.menuService.updateMenu(menu));
}
@GetMapping({"/icon"})
public String icon() {
return this.prefix + "/icon";
}
@PostMapping({"/checkMenuNameUnique"})
@ResponseBody
public String checkMenuNameUnique(Menu menu) {
return this.menuService.checkMenuNameUnique(menu);
}
@GetMapping({"/roleMenuTreeData"})
@ResponseBody
public List<Ztree> roleMenuTreeData(Role role) {
List<Ztree> ztrees = this.menuService.roleMenuTreeData(role);
return ztrees;
}
@GetMapping({"/menuTreeData"})
@ResponseBody
public List<Ztree> menuTreeData(Role role) {
List<Ztree> ztrees = this.menuService.menuTreeData();
return ztrees;
}
@GetMapping({"/selectMenuTree/{menuId}"})
public String selectMenuTree(@PathVariable("menuId") Long menuId, ModelMap mmap) {
mmap.put("menu", this.menuService.selectMenuById(menuId));
return this.prefix + "/tree";
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\menu\controller\MenuController.class

@ -1,219 +1,219 @@
/* */ package com.archive.project.system.menu.domain
package com.archive.project.system.menu.domain
;
/* */
/* */ import com.archive.framework.web.domain.BaseEntity;
/* */ import java.util.ArrayList;
/* */ import java.util.List;
/* */ import javax.validation.constraints.NotBlank;
/* */ import javax.validation.constraints.Size;
/* */ import org.apache.commons.lang3.builder.ToStringBuilder;
/* */ import org.apache.commons.lang3.builder.ToStringStyle;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Menu
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ private Long menuId;
/* */ private String menuName;
/* */ private String parentName;
/* */ private Long parentId;
/* */ private String orderNum;
/* */ private String url;
/* */ private String target;
/* */ private String menuType;
/* */ private String visible;
/* */ private String isRefresh;
/* */ private String perms;
/* */ private String icon;
/* 56 */ private List<Menu> children = new ArrayList<>();
/* */
/* */
/* */ public Long getMenuId() {
/* 60 */ return this.menuId;
/* */ }
/* */
/* */
/* */ public void setMenuId(Long menuId) {
/* 65 */ this.menuId = menuId;
/* */ }
/* */
/* */
/* */ @NotBlank(message = "菜单名称不能为空")
/* */ @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
/* */ public String getMenuName() {
/* 72 */ return this.menuName;
/* */ }
/* */
/* */
/* */ public void setMenuName(String menuName) {
/* 77 */ this.menuName = menuName;
/* */ }
/* */
/* */
/* */ public String getParentName() {
/* 82 */ return this.parentName;
/* */ }
/* */
/* */
/* */ public void setParentName(String parentName) {
/* 87 */ this.parentName = parentName;
/* */ }
/* */
/* */
/* */ public Long getParentId() {
/* 92 */ return this.parentId;
/* */ }
/* */
/* */
/* */ public void setParentId(Long parentId) {
/* 97 */ this.parentId = parentId;
/* */ }
/* */
/* */
/* */ @NotBlank(message = "显示顺序不能为空")
/* */ public String getOrderNum() {
/* 103 */ return this.orderNum;
/* */ }
/* */
/* */
/* */ public void setOrderNum(String orderNum) {
/* 108 */ this.orderNum = orderNum;
/* */ }
/* */
/* */
/* */ @Size(min = 0, max = 200, message = "请求地址不能超过200个字符")
/* */ public String getUrl() {
/* 114 */ return this.url;
/* */ }
/* */
/* */
/* */ public void setUrl(String url) {
/* 119 */ this.url = url;
/* */ }
/* */
/* */
/* */ public String getTarget() {
/* 124 */ return this.target;
/* */ }
/* */
/* */
/* */ public void setTarget(String target) {
/* 129 */ this.target = target;
/* */ }
/* */
/* */
/* */ @NotBlank(message = "菜单类型不能为空")
/* */ public String getMenuType() {
/* 135 */ return this.menuType;
/* */ }
/* */
/* */
/* */ public void setMenuType(String menuType) {
/* 140 */ this.menuType = menuType;
/* */ }
/* */
/* */
/* */ public String getVisible() {
/* 145 */ return this.visible;
/* */ }
/* */
/* */
/* */ public void setVisible(String visible) {
/* 150 */ this.visible = visible;
/* */ }
/* */
/* */
/* */ public String getIsRefresh() {
/* 155 */ return this.isRefresh;
/* */ }
/* */
/* */
/* */ public void setIsRefresh(String isRefresh) {
/* 160 */ this.isRefresh = isRefresh;
/* */ }
/* */
/* */
/* */ @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
/* */ public String getPerms() {
/* 166 */ return this.perms;
/* */ }
/* */
/* */
/* */ public void setPerms(String perms) {
/* 171 */ this.perms = perms;
/* */ }
/* */
/* */
/* */ public String getIcon() {
/* 176 */ return this.icon;
/* */ }
/* */
/* */
/* */ public void setIcon(String icon) {
/* 181 */ this.icon = icon;
/* */ }
/* */
/* */
/* */ public List<Menu> getChildren() {
/* 186 */ return this.children;
/* */ }
/* */
/* */
/* */ public void setChildren(List<Menu> children) {
/* 191 */ this.children = children;
/* */ }
/* */
/* */
/* */ public String toString() {
/* 196 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 197 */ .append("menuId", getMenuId())
/* 198 */ .append("menuName", getMenuName())
/* 199 */ .append("parentId", getParentId())
/* 200 */ .append("orderNum", getOrderNum())
/* 201 */ .append("url", getUrl())
/* 202 */ .append("target", getTarget())
/* 203 */ .append("menuType", getMenuType())
/* 204 */ .append("visible", getVisible())
/* 205 */ .append("perms", getPerms())
/* 206 */ .append("icon", getIcon())
/* 207 */ .append("createBy", getCreateBy())
/* 208 */ .append("createTime", getCreateTime())
/* 209 */ .append("updateBy", getUpdateBy())
/* 210 */ .append("updateTime", getUpdateTime())
/* 211 */ .append("remark", getRemark())
/* 212 */ .toString();
/* */ }
/* */ }
import com.archive.framework.web.domain.BaseEntity;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
public class Menu
extends BaseEntity
{
private static final long serialVersionUID = 1L;
private Long menuId;
private String menuName;
private String parentName;
private Long parentId;
private String orderNum;
private String url;
private String target;
private String menuType;
private String visible;
private String isRefresh;
private String perms;
private String icon;
private List<Menu> children = new ArrayList<>();
public Long getMenuId() {
return this.menuId;
}
public void setMenuId(Long menuId) {
this.menuId = menuId;
}
@NotBlank(message = "菜单名称不能为空")
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
public String getMenuName() {
return this.menuName;
}
public void setMenuName(String menuName) {
this.menuName = menuName;
}
public String getParentName() {
return this.parentName;
}
public void setParentName(String parentName) {
this.parentName = parentName;
}
public Long getParentId() {
return this.parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
@NotBlank(message = "显示顺序不能为空")
public String getOrderNum() {
return this.orderNum;
}
public void setOrderNum(String orderNum) {
this.orderNum = orderNum;
}
@Size(min = 0, max = 200, message = "请求地址不能超过200个字符")
public String getUrl() {
return this.url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTarget() {
return this.target;
}
public void setTarget(String target) {
this.target = target;
}
@NotBlank(message = "菜单类型不能为空")
public String getMenuType() {
return this.menuType;
}
public void setMenuType(String menuType) {
this.menuType = menuType;
}
public String getVisible() {
return this.visible;
}
public void setVisible(String visible) {
this.visible = visible;
}
public String getIsRefresh() {
return this.isRefresh;
}
public void setIsRefresh(String isRefresh) {
this.isRefresh = isRefresh;
}
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
public String getPerms() {
return this.perms;
}
public void setPerms(String perms) {
this.perms = perms;
}
public String getIcon() {
return this.icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public List<Menu> getChildren() {
return this.children;
}
public void setChildren(List<Menu> children) {
this.children = children;
}
public String toString() {
return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
.append("menuId", getMenuId())
.append("menuName", getMenuName())
.append("parentId", getParentId())
.append("orderNum", getOrderNum())
.append("url", getUrl())
.append("target", getTarget())
.append("menuType", getMenuType())
.append("visible", getVisible())
.append("perms", getPerms())
.append("icon", getIcon())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\menu\domain\Menu.class

@ -1,329 +1,329 @@
/* */ package com.archive.project.system.menu.service
package com.archive.project.system.menu.service
;
/* */
/* */ import com.archive.common.utils.StringUtils;
/* */ import com.archive.common.utils.TreeUtils;
/* */ import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.framework.web.domain.Ztree;
/* */ import com.archive.project.system.menu.domain.Menu;
/* */ import com.archive.project.system.menu.mapper.MenuMapper;
/* */ import com.archive.project.system.menu.service.IMenuService;
/* */ import com.archive.project.system.role.domain.Role;
/* */ import com.archive.project.system.role.mapper.RoleMenuMapper;
/* */ import com.archive.project.system.user.domain.User;
/* */ import java.text.MessageFormat;
/* */ import java.util.ArrayList;
/* */ import java.util.Arrays;
/* */ import java.util.HashSet;
/* */ import java.util.LinkedHashMap;
/* */ import java.util.LinkedList;
/* */ import java.util.List;
/* */ import java.util.Map;
/* */ import java.util.Set;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service
/* */ public class MenuServiceImpl
/* */ implements IMenuService
/* */ {
/* */ public static final String PREMISSION_STRING = "perms[\"{0}\"]";
/* */ @Autowired
/* */ private MenuMapper menuMapper;
/* */ @Autowired
/* */ private RoleMenuMapper roleMenuMapper;
/* */
/* */ public List<Menu> selectMenusByUser(User user) {
/* 49 */ List<Menu> menus = new LinkedList<>();
/* */
/* 51 */ if (user.isAdmin()) {
/* */
/* 53 */ menus = this.menuMapper.selectMenuNormalAll();
/* */ }
/* */ else {
/* */
/* 57 */ menus = this.menuMapper.selectMenusByUserId(user.getUserId());
/* */ }
/* 59 */ return TreeUtils.getChildPerms(menus, 0);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Menu> selectMenuList(Menu menu) {
/* 70 */ List<Menu> menuList = null;
/* 71 */ User user = ShiroUtils.getSysUser();
/* 72 */ if (user.isAdmin()) {
/* */
/* 74 */ menuList = this.menuMapper.selectMenuList(menu);
/* */ }
/* */ else {
/* */
/* 78 */ menu.getParams().put("userId", user.getUserId());
/* 79 */ menuList = this.menuMapper.selectMenuListByUserId(menu);
/* */ }
/* 81 */ return menuList;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Menu> selectMenuAll() {
/* 92 */ List<Menu> menuList = null;
/* 93 */ User user = ShiroUtils.getSysUser();
/* 94 */ if (user.isAdmin()) {
/* */
/* 96 */ menuList = this.menuMapper.selectMenuAll();
/* */ }
/* */ else {
/* */
/* 100 */ menuList = this.menuMapper.selectMenuAllByUserId(user.getUserId());
/* */ }
/* 102 */ return menuList;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Set<String> selectPermsByUserId(Long userId) {
/* 114 */ List<String> perms = this.menuMapper.selectPermsByUserId(userId);
/* 115 */ Set<String> permsSet = new HashSet<>();
/* 116 */ for (String perm : perms) {
/* */
/* 118 */ if (StringUtils.isNotEmpty(perm))
/* */ {
/* 120 */ permsSet.addAll(Arrays.asList(perm.trim().split(",")));
/* */ }
/* */ }
/* 123 */ return permsSet;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Ztree> roleMenuTreeData(Role role) {
/* 135 */ Long roleId = role.getRoleId();
/* 136 */ List<Ztree> ztrees = new ArrayList<>();
/* 137 */ List<Menu> menuList = selectMenuAll();
/* 138 */ if (StringUtils.isNotNull(roleId)) {
/* */
/* 140 */ List<String> roleMenuList = this.menuMapper.selectMenuTree(roleId);
/* 141 */ ztrees = initZtree(menuList, roleMenuList, true);
/* */ }
/* */ else {
/* */
/* 145 */ ztrees = initZtree(menuList, null, true);
/* */ }
/* 147 */ return ztrees;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Ztree> menuTreeData() {
/* 158 */ List<Menu> menuList = selectMenuAll();
/* 159 */ List<Ztree> ztrees = initZtree(menuList);
/* 160 */ return ztrees;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public LinkedHashMap<String, String> selectPermsAll() {
/* 171 */ LinkedHashMap<String, String> section = new LinkedHashMap<>();
/* 172 */ List<Menu> permissions = selectMenuAll();
/* 173 */ if (StringUtils.isNotEmpty(permissions))
/* */ {
/* 175 */ for (Menu menu : permissions) {
/* */
/* 177 */ section.put(menu.getUrl(), MessageFormat.format("perms[\"{0}\"]", new Object[] { menu.getPerms() }));
/* */ }
/* */ }
/* 180 */ return section;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Ztree> initZtree(List<Menu> menuList) {
/* 191 */ return initZtree(menuList, null, false);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Ztree> initZtree(List<Menu> menuList, List<String> roleMenuList, boolean permsFlag) {
/* 204 */ List<Ztree> ztrees = new ArrayList<>();
/* 205 */ boolean isCheck = StringUtils.isNotNull(roleMenuList);
/* 206 */ for (Menu menu : menuList) {
/* */
/* 208 */ Ztree ztree = new Ztree();
/* 209 */ ztree.setId(menu.getMenuId());
/* 210 */ ztree.setpId(menu.getParentId());
/* 211 */ ztree.setName(transMenuName(menu, permsFlag));
/* 212 */ ztree.setTitle(menu.getMenuName());
/* 213 */ if (isCheck)
/* */ {
/* 215 */ ztree.setChecked(roleMenuList.contains(menu.getMenuId() + menu.getPerms()));
/* */ }
/* 217 */ ztrees.add(ztree);
/* */ }
/* 219 */ return ztrees;
/* */ }
/* */
/* */
/* */ public String transMenuName(Menu menu, boolean permsFlag) {
/* 224 */ StringBuffer sb = new StringBuffer();
/* 225 */ sb.append(menu.getMenuName());
/* 226 */ if (permsFlag)
/* */ {
/* 228 */ sb.append("<font color=\"#888\">&nbsp;&nbsp;&nbsp;" + menu.getPerms() + "</font>");
/* */ }
/* 230 */ return sb.toString();
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteMenuById(Long menuId) {
/* 242 */ return this.menuMapper.deleteMenuById(menuId);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Menu selectMenuById(Long menuId) {
/* 254 */ return this.menuMapper.selectMenuById(menuId);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int selectCountMenuByParentId(Long parentId) {
/* 266 */ return this.menuMapper.selectCountMenuByParentId(parentId);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int selectCountRoleMenuByMenuId(Long menuId) {
/* 278 */ return this.roleMenuMapper.selectCountRoleMenuByMenuId(menuId);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int insertMenu(Menu menu) {
/* 290 */ menu.setCreateBy(ShiroUtils.getLoginName());
/* 291 */ return this.menuMapper.insertMenu(menu);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int updateMenu(Menu menu) {
/* 303 */ menu.setUpdateBy(ShiroUtils.getLoginName());
/* 304 */ return this.menuMapper.updateMenu(menu);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public String checkMenuNameUnique(Menu menu) {
/* 316 */ Long menuId = Long.valueOf(StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId().longValue());
/* 317 */ Menu info = this.menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId());
/* 318 */ if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue())
/* */ {
/* 320 */ return "1";
/* */ }
/* 322 */ return "0";
/* */ }
/* */ }
import com.archive.common.utils.StringUtils;
import com.archive.common.utils.TreeUtils;
import com.archive.common.utils.security.ShiroUtils;
import com.archive.framework.web.domain.Ztree;
import com.archive.project.system.menu.domain.Menu;
import com.archive.project.system.menu.mapper.MenuMapper;
import com.archive.project.system.menu.service.IMenuService;
import com.archive.project.system.role.domain.Role;
import com.archive.project.system.role.mapper.RoleMenuMapper;
import com.archive.project.system.user.domain.User;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class MenuServiceImpl
implements IMenuService
{
public static final String PREMISSION_STRING = "perms[\"{0}\"]";
@Autowired
private MenuMapper menuMapper;
@Autowired
private RoleMenuMapper roleMenuMapper;
public List<Menu> selectMenusByUser(User user) {
List<Menu> menus = new LinkedList<>();
if (user.isAdmin()) {
menus = this.menuMapper.selectMenuNormalAll();
}
else {
menus = this.menuMapper.selectMenusByUserId(user.getUserId());
}
return TreeUtils.getChildPerms(menus, 0);
}
public List<Menu> selectMenuList(Menu menu) {
List<Menu> menuList = null;
User user = ShiroUtils.getSysUser();
if (user.isAdmin()) {
menuList = this.menuMapper.selectMenuList(menu);
}
else {
menu.getParams().put("userId", user.getUserId());
menuList = this.menuMapper.selectMenuListByUserId(menu);
}
return menuList;
}
public List<Menu> selectMenuAll() {
List<Menu> menuList = null;
User user = ShiroUtils.getSysUser();
if (user.isAdmin()) {
menuList = this.menuMapper.selectMenuAll();
}
else {
menuList = this.menuMapper.selectMenuAllByUserId(user.getUserId());
}
return menuList;
}
public Set<String> selectPermsByUserId(Long userId) {
List<String> perms = this.menuMapper.selectPermsByUserId(userId);
Set<String> permsSet = new HashSet<>();
for (String perm : perms) {
if (StringUtils.isNotEmpty(perm))
{
permsSet.addAll(Arrays.asList(perm.trim().split(",")));
}
}
return permsSet;
}
public List<Ztree> roleMenuTreeData(Role role) {
Long roleId = role.getRoleId();
List<Ztree> ztrees = new ArrayList<>();
List<Menu> menuList = selectMenuAll();
if (StringUtils.isNotNull(roleId)) {
List<String> roleMenuList = this.menuMapper.selectMenuTree(roleId);
ztrees = initZtree(menuList, roleMenuList, true);
}
else {
ztrees = initZtree(menuList, null, true);
}
return ztrees;
}
public List<Ztree> menuTreeData() {
List<Menu> menuList = selectMenuAll();
List<Ztree> ztrees = initZtree(menuList);
return ztrees;
}
public LinkedHashMap<String, String> selectPermsAll() {
LinkedHashMap<String, String> section = new LinkedHashMap<>();
List<Menu> permissions = selectMenuAll();
if (StringUtils.isNotEmpty(permissions))
{
for (Menu menu : permissions) {
section.put(menu.getUrl(), MessageFormat.format("perms[\"{0}\"]", new Object[] { menu.getPerms() }));
}
}
return section;
}
public List<Ztree> initZtree(List<Menu> menuList) {
return initZtree(menuList, null, false);
}
public List<Ztree> initZtree(List<Menu> menuList, List<String> roleMenuList, boolean permsFlag) {
List<Ztree> ztrees = new ArrayList<>();
boolean isCheck = StringUtils.isNotNull(roleMenuList);
for (Menu menu : menuList) {
Ztree ztree = new Ztree();
ztree.setId(menu.getMenuId());
ztree.setpId(menu.getParentId());
ztree.setName(transMenuName(menu, permsFlag));
ztree.setTitle(menu.getMenuName());
if (isCheck)
{
ztree.setChecked(roleMenuList.contains(menu.getMenuId() + menu.getPerms()));
}
ztrees.add(ztree);
}
return ztrees;
}
public String transMenuName(Menu menu, boolean permsFlag) {
StringBuffer sb = new StringBuffer();
sb.append(menu.getMenuName());
if (permsFlag)
{
sb.append("<font color=\"#888\">&nbsp;&nbsp;&nbsp;" + menu.getPerms() + "</font>");
}
return sb.toString();
}
public int deleteMenuById(Long menuId) {
return this.menuMapper.deleteMenuById(menuId);
}
public Menu selectMenuById(Long menuId) {
return this.menuMapper.selectMenuById(menuId);
}
public int selectCountMenuByParentId(Long parentId) {
return this.menuMapper.selectCountMenuByParentId(parentId);
}
public int selectCountRoleMenuByMenuId(Long menuId) {
return this.roleMenuMapper.selectCountRoleMenuByMenuId(menuId);
}
public int insertMenu(Menu menu) {
menu.setCreateBy(ShiroUtils.getLoginName());
return this.menuMapper.insertMenu(menu);
}
public int updateMenu(Menu menu) {
menu.setUpdateBy(ShiroUtils.getLoginName());
return this.menuMapper.updateMenu(menu);
}
public String checkMenuNameUnique(Menu menu) {
Long menuId = Long.valueOf(StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId().longValue());
Menu info = this.menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId());
if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue())
{
return "1";
}
return "0";
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\menu\service\MenuServiceImpl.class

@ -1,114 +1,114 @@
/* */ package com.archive.project.system.notice.controller
package com.archive.project.system.notice.controller
;
/* */
/* */ import com.archive.framework.aspectj.lang.annotation.Log;
/* */ import com.archive.framework.aspectj.lang.enums.BusinessType;
/* */ import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.framework.web.page.TableDataInfo;
/* */ import com.archive.project.system.notice.domain.Notice;
/* */ import com.archive.project.system.notice.service.INoticeService;
/* */ import java.util.List;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap;
/* */ import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.PathVariable;
/* */ import org.springframework.web.bind.annotation.PostMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */
/* */
/* */
/* */
/* */ @Controller
/* */ @RequestMapping({"/system/notice"})
/* */ public class NoticeController
/* */ extends BaseController
/* */ {
/* 30 */ private String prefix = "system/notice";
/* */
/* */ @Autowired
/* */ private INoticeService noticeService;
/* */
/* */
/* */ @RequiresPermissions({"system:notice:view"})
/* */ @GetMapping
/* */ public String notice() {
/* 39 */ return this.prefix + "/notice";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"system:notice:list"})
/* */ @PostMapping({"/list"})
/* */ @ResponseBody
/* */ public TableDataInfo list(Notice notice) {
/* 50 */ startPage();
/* 51 */ List<Notice> list = this.noticeService.selectNoticeList(notice);
/* 52 */ return getDataTable(list);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/add"})
/* */ public String add() {
/* 61 */ return this.prefix + "/add";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"system:notice:add"})
/* */ @Log(title = "通知公告", businessType = BusinessType.INSERT)
/* */ @PostMapping({"/add"})
/* */ @ResponseBody
/* */ public AjaxResult addSave(Notice notice) {
/* 73 */ return toAjax(this.noticeService.insertNotice(notice));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/edit/{noticeId}"})
/* */ public String edit(@PathVariable("noticeId") Long noticeId, ModelMap mmap) {
/* 82 */ mmap.put("notice", this.noticeService.selectNoticeById(noticeId));
/* 83 */ return this.prefix + "/edit";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"system:notice:edit"})
/* */ @Log(title = "通知公告", businessType = BusinessType.UPDATE)
/* */ @PostMapping({"/edit"})
/* */ @ResponseBody
/* */ public AjaxResult editSave(Notice notice) {
/* 95 */ return toAjax(this.noticeService.updateNotice(notice));
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"system:notice:remove"})
/* */ @Log(title = "通知公告", businessType = BusinessType.DELETE)
/* */ @PostMapping({"/remove"})
/* */ @ResponseBody
/* */ public AjaxResult remove(String ids) {
/* 107 */ return toAjax(this.noticeService.deleteNoticeByIds(ids));
/* */ }
/* */ }
import com.archive.framework.aspectj.lang.annotation.Log;
import com.archive.framework.aspectj.lang.enums.BusinessType;
import com.archive.framework.web.controller.BaseController;
import com.archive.framework.web.domain.AjaxResult;
import com.archive.framework.web.page.TableDataInfo;
import com.archive.project.system.notice.domain.Notice;
import com.archive.project.system.notice.service.INoticeService;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping({"/system/notice"})
public class NoticeController
extends BaseController
{
private String prefix = "system/notice";
@Autowired
private INoticeService noticeService;
@RequiresPermissions({"system:notice:view"})
@GetMapping
public String notice() {
return this.prefix + "/notice";
}
@RequiresPermissions({"system:notice:list"})
@PostMapping({"/list"})
@ResponseBody
public TableDataInfo list(Notice notice) {
startPage();
List<Notice> list = this.noticeService.selectNoticeList(notice);
return getDataTable(list);
}
@GetMapping({"/add"})
public String add() {
return this.prefix + "/add";
}
@RequiresPermissions({"system:notice:add"})
@Log(title = "通知公告", businessType = BusinessType.INSERT)
@PostMapping({"/add"})
@ResponseBody
public AjaxResult addSave(Notice notice) {
return toAjax(this.noticeService.insertNotice(notice));
}
@GetMapping({"/edit/{noticeId}"})
public String edit(@PathVariable("noticeId") Long noticeId, ModelMap mmap) {
mmap.put("notice", this.noticeService.selectNoticeById(noticeId));
return this.prefix + "/edit";
}
@RequiresPermissions({"system:notice:edit"})
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PostMapping({"/edit"})
@ResponseBody
public AjaxResult editSave(Notice notice) {
return toAjax(this.noticeService.updateNotice(notice));
}
@RequiresPermissions({"system:notice:remove"})
@Log(title = "通知公告", businessType = BusinessType.DELETE)
@PostMapping({"/remove"})
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(this.noticeService.deleteNoticeByIds(ids));
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\notice\controller\NoticeController.class

@ -1,105 +1,105 @@
/* */ package com.archive.project.system.notice.domain
package com.archive.project.system.notice.domain
;
/* */
/* */ import com.archive.framework.web.domain.BaseEntity;
/* */ import javax.validation.constraints.NotBlank;
/* */ import javax.validation.constraints.Size;
/* */ import org.apache.commons.lang3.builder.ToStringBuilder;
/* */ import org.apache.commons.lang3.builder.ToStringStyle;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class Notice
/* */ extends BaseEntity
/* */ {
/* */ private static final long serialVersionUID = 1L;
/* */ private Long noticeId;
/* */ private String noticeTitle;
/* */ private String noticeType;
/* */ private String noticeContent;
/* */ private String status;
/* */
/* */ public Long getNoticeId() {
/* 35 */ return this.noticeId;
/* */ }
/* */
/* */
/* */ public void setNoticeId(Long noticeId) {
/* 40 */ this.noticeId = noticeId;
/* */ }
/* */
/* */
/* */ public void setNoticeTitle(String noticeTitle) {
/* 45 */ this.noticeTitle = noticeTitle;
/* */ }
/* */
/* */
/* */ @NotBlank(message = "公告标题不能为空")
/* */ @Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
/* */ public String getNoticeTitle() {
/* 52 */ return this.noticeTitle;
/* */ }
/* */
/* */
/* */ public void setNoticeType(String noticeType) {
/* 57 */ this.noticeType = noticeType;
/* */ }
/* */
/* */
/* */ public String getNoticeType() {
/* 62 */ return this.noticeType;
/* */ }
/* */
/* */
/* */ public void setNoticeContent(String noticeContent) {
/* 67 */ this.noticeContent = noticeContent;
/* */ }
/* */
/* */
/* */ public String getNoticeContent() {
/* 72 */ return this.noticeContent;
/* */ }
/* */
/* */
/* */ public void setStatus(String status) {
/* 77 */ this.status = status;
/* */ }
/* */
/* */
/* */ public String getStatus() {
/* 82 */ return this.status;
/* */ }
/* */
/* */
/* */ public String toString() {
/* 87 */ return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
/* 88 */ .append("noticeId", getNoticeId())
/* 89 */ .append("noticeTitle", getNoticeTitle())
/* 90 */ .append("noticeType", getNoticeType())
/* 91 */ .append("noticeContent", getNoticeContent())
/* 92 */ .append("status", getStatus())
/* 93 */ .append("createBy", getCreateBy())
/* 94 */ .append("createTime", getCreateTime())
/* 95 */ .append("updateBy", getUpdateBy())
/* 96 */ .append("updateTime", getUpdateTime())
/* 97 */ .append("remark", getRemark())
/* 98 */ .toString();
/* */ }
/* */ }
import com.archive.framework.web.domain.BaseEntity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
public class Notice
extends BaseEntity
{
private static final long serialVersionUID = 1L;
private Long noticeId;
private String noticeTitle;
private String noticeType;
private String noticeContent;
private String status;
public Long getNoticeId() {
return this.noticeId;
}
public void setNoticeId(Long noticeId) {
this.noticeId = noticeId;
}
public void setNoticeTitle(String noticeTitle) {
this.noticeTitle = noticeTitle;
}
@NotBlank(message = "公告标题不能为空")
@Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
public String getNoticeTitle() {
return this.noticeTitle;
}
public void setNoticeType(String noticeType) {
this.noticeType = noticeType;
}
public String getNoticeType() {
return this.noticeType;
}
public void setNoticeContent(String noticeContent) {
this.noticeContent = noticeContent;
}
public String getNoticeContent() {
return this.noticeContent;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return this.status;
}
public String toString() {
return (new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE))
.append("noticeId", getNoticeId())
.append("noticeTitle", getNoticeTitle())
.append("noticeType", getNoticeType())
.append("noticeContent", getNoticeContent())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\notice\domain\Notice.class

@ -1,120 +1,120 @@
/* */ package com.archive.project.system.notice.service
package com.archive.project.system.notice.service
;
/* */
/* */ import com.archive.common.utils.security.ShiroUtils;
/* */ import com.archive.common.utils.text.Convert;
/* */ import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.project.system.notice.domain.Notice;
/* */ import com.archive.project.system.notice.mapper.NoticeMapper;
/* */ import com.archive.project.system.notice.service.INoticeService;
/* */ import java.util.List;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service
/* */ public class NoticeServiceImpl
/* */ implements INoticeService
/* */ {
/* */ @Autowired
/* */ private NoticeMapper noticeMapper;
/* */ @Autowired
/* */ private ArchiveConfig archiveConfig;
/* */
/* */ public Notice selectNoticeById(Long noticeId) {
/* 39 */ return this.noticeMapper.selectNoticeById(noticeId);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Notice> selectNoticeList(Notice notice) {
/* 51 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 52 */ return this.noticeMapper.selectNoticeList(notice);
/* */ }
/* 54 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 55 */ return this.noticeMapper.selectNoticeListSqlite(notice);
/* */ }
/* 57 */ return this.noticeMapper.selectNoticeList(notice);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int insertNotice(Notice notice) {
/* 71 */ notice.setCreateBy(ShiroUtils.getLoginName());
/* 72 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 73 */ return this.noticeMapper.insertNotice(notice);
/* */ }
/* 75 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 76 */ return this.noticeMapper.insertNoticeSqlite(notice);
/* */ }
/* 78 */ return this.noticeMapper.insertNotice(notice);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int updateNotice(Notice notice) {
/* 92 */ notice.setUpdateBy(ShiroUtils.getLoginName());
/* 93 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 94 */ return this.noticeMapper.updateNotice(notice);
/* */ }
/* 96 */ if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 97 */ return this.noticeMapper.updateNoticeSqlite(notice);
/* */ }
/* 99 */ return this.noticeMapper.updateNotice(notice);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public int deleteNoticeByIds(String ids) {
/* 113 */ return this.noticeMapper.deleteNoticeByIds(Convert.toStrArray(ids));
/* */ }
/* */ }
import com.archive.common.utils.security.ShiroUtils;
import com.archive.common.utils.text.Convert;
import com.archive.framework.config.ArchiveConfig;
import com.archive.project.system.notice.domain.Notice;
import com.archive.project.system.notice.mapper.NoticeMapper;
import com.archive.project.system.notice.service.INoticeService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class NoticeServiceImpl
implements INoticeService
{
@Autowired
private NoticeMapper noticeMapper;
@Autowired
private ArchiveConfig archiveConfig;
public Notice selectNoticeById(Long noticeId) {
return this.noticeMapper.selectNoticeById(noticeId);
}
public List<Notice> selectNoticeList(Notice notice) {
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
return this.noticeMapper.selectNoticeList(notice);
}
if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
return this.noticeMapper.selectNoticeListSqlite(notice);
}
return this.noticeMapper.selectNoticeList(notice);
}
public int insertNotice(Notice notice) {
notice.setCreateBy(ShiroUtils.getLoginName());
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
return this.noticeMapper.insertNotice(notice);
}
if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
return this.noticeMapper.insertNoticeSqlite(notice);
}
return this.noticeMapper.insertNotice(notice);
}
public int updateNotice(Notice notice) {
notice.setUpdateBy(ShiroUtils.getLoginName());
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
return this.noticeMapper.updateNotice(notice);
}
if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
return this.noticeMapper.updateNoticeSqlite(notice);
}
return this.noticeMapper.updateNotice(notice);
}
public int deleteNoticeByIds(String ids) {
return this.noticeMapper.deleteNoticeByIds(Convert.toStrArray(ids));
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\system\notice\service\NoticeServiceImpl.class

@ -1,186 +1,186 @@
/* */ package com.archive.project.zhtj.lytj.controller
package com.archive.project.zhtj.lytj.controller
;
/* */
/* */ import com.archive.framework.web.controller.BaseController;
/* */ import com.archive.framework.web.domain.AjaxResult;
/* */ import com.archive.project.jyly.borrow.domain.TArchiveBorrow;
/* */ import com.archive.project.jyly.borrow.service.ITArchiveBorrowService;
/* */ import com.archive.project.zhtj.lytj.service.ILytjService;
/* */ import java.text.ParseException;
/* */ import java.util.ArrayList;
/* */ import java.util.HashMap;
/* */ import java.util.List;
/* */ import java.util.Map;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap;
/* */ import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping;
/* */ import org.springframework.web.bind.annotation.ResponseBody;
/* */
/* */ @Controller
/* */ @RequestMapping({"/zhtj/lytj"})
/* */ public class LytjController extends BaseController {
/* 24 */ private String prefix = "zhtj/lytj";
/* */
/* */ @Autowired
/* */ private ILytjService lytjService;
/* */
/* */ @Autowired
/* */ private ITArchiveBorrowService tArchiveBorrowService;
/* */
/* */
/* */ @RequiresPermissions({"zhtj:lytj:view"})
/* */ @GetMapping
/* */ public String archivesearch(ModelMap mmap) {
/* 36 */ return this.prefix + "/lytj";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"zhtj:datj:view"})
/* */ @GetMapping({"/lyrcndtj"})
/* */ public String lyrcndtj(ModelMap mmap) {
/* 48 */ return this.prefix + "/lyrcndtj";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"zhtj:datj:view"})
/* */ @GetMapping({"/lymxtj"})
/* */ public String lymxtj(ModelMap mmap) {
/* 60 */ return this.prefix + "/lymxtj";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @RequiresPermissions({"zhtj:datj:view"})
/* */ @GetMapping({"/mydtj"})
/* */ public String mydtj(ModelMap mmap) {
/* 72 */ return this.prefix + "/mydtj";
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/getRctjTableData"})
/* */ @ResponseBody
/* */ public AjaxResult getRctjTableData() {
/* 83 */ List<Map<String, String>> list = new ArrayList<>();
/* */ try {
/* 85 */ list = this.lytjService.getRctjTableData();
/* 86 */ } catch (Exception e) {
/* 87 */ e.printStackTrace();
/* */ }
/* 89 */ return AjaxResult.success(list);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/getLymxtjTableData"})
/* */ @ResponseBody
/* */ public AjaxResult getLymxtjTableData() {
/* 100 */ List<Map<String, String>> list = new ArrayList<>();
/* */ try {
/* 102 */ list = this.lytjService.getLymxtjTableData();
/* 103 */ } catch (Exception e) {
/* 104 */ e.printStackTrace();
/* */ }
/* 106 */ return AjaxResult.success(list);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/getLymxtjTxData"})
/* */ @ResponseBody
/* */ public AjaxResult getLymxtjTxData() {
/* 116 */ Map<String, Object> list = new HashMap<>();
/* */ try {
/* 118 */ list = this.lytjService.getLymxtjTxData();
/* 119 */ } catch (Exception e) {
/* 120 */ e.printStackTrace();
/* */ }
/* 122 */ return AjaxResult.success(list);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/getMydTableData"})
/* */ @ResponseBody
/* */ public AjaxResult getMydTableData() {
/* 133 */ List<Map<String, String>> list = new ArrayList<>();
/* */ try {
/* 135 */ list = this.lytjService.getMydTableData();
/* 136 */ } catch (Exception e) {
/* 137 */ e.printStackTrace();
/* */ }
/* 139 */ return AjaxResult.success(list);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/getMydTxData"})
/* */ @ResponseBody
/* */ public AjaxResult getMydTxData() {
/* 149 */ List<Map<String, Object>> list = new ArrayList<>();
/* */ try {
/* 151 */ list = this.lytjService.getMydTxData();
/* 152 */ } catch (Exception e) {
/* 153 */ e.printStackTrace();
/* */ }
/* 155 */ return AjaxResult.success(list);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ @GetMapping({"/getLyjl"})
/* */ @ResponseBody
/* */ public AjaxResult getLyjl() throws ParseException {
/* 165 */ TArchiveBorrow tArchiveBorrow = new TArchiveBorrow();
/* 166 */ List<TArchiveBorrow> list = this.tArchiveBorrowService.selectTArchiveBorrowList(tArchiveBorrow);
/* 167 */ if (list.size() > 15) {
/* 168 */ for (int i = 0; i < list.size(); i++) {
/* 169 */ if (list.size() - i > 15) {
/* 170 */ list.remove(i);
/* */ }
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* 179 */ return AjaxResult.success(list);
/* */ }
/* */ }
import com.archive.framework.web.controller.BaseController;
import com.archive.framework.web.domain.AjaxResult;
import com.archive.project.jyly.borrow.domain.TArchiveBorrow;
import com.archive.project.jyly.borrow.service.ITArchiveBorrowService;
import com.archive.project.zhtj.lytj.service.ILytjService;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping({"/zhtj/lytj"})
public class LytjController extends BaseController {
private String prefix = "zhtj/lytj";
@Autowired
private ILytjService lytjService;
@Autowired
private ITArchiveBorrowService tArchiveBorrowService;
@RequiresPermissions({"zhtj:lytj:view"})
@GetMapping
public String archivesearch(ModelMap mmap) {
return this.prefix + "/lytj";
}
@RequiresPermissions({"zhtj:datj:view"})
@GetMapping({"/lyrcndtj"})
public String lyrcndtj(ModelMap mmap) {
return this.prefix + "/lyrcndtj";
}
@RequiresPermissions({"zhtj:datj:view"})
@GetMapping({"/lymxtj"})
public String lymxtj(ModelMap mmap) {
return this.prefix + "/lymxtj";
}
@RequiresPermissions({"zhtj:datj:view"})
@GetMapping({"/mydtj"})
public String mydtj(ModelMap mmap) {
return this.prefix + "/mydtj";
}
@GetMapping({"/getRctjTableData"})
@ResponseBody
public AjaxResult getRctjTableData() {
List<Map<String, String>> list = new ArrayList<>();
try {
list = this.lytjService.getRctjTableData();
} catch (Exception e) {
e.printStackTrace();
}
return AjaxResult.success(list);
}
@GetMapping({"/getLymxtjTableData"})
@ResponseBody
public AjaxResult getLymxtjTableData() {
List<Map<String, String>> list = new ArrayList<>();
try {
list = this.lytjService.getLymxtjTableData();
} catch (Exception e) {
e.printStackTrace();
}
return AjaxResult.success(list);
}
@GetMapping({"/getLymxtjTxData"})
@ResponseBody
public AjaxResult getLymxtjTxData() {
Map<String, Object> list = new HashMap<>();
try {
list = this.lytjService.getLymxtjTxData();
} catch (Exception e) {
e.printStackTrace();
}
return AjaxResult.success(list);
}
@GetMapping({"/getMydTableData"})
@ResponseBody
public AjaxResult getMydTableData() {
List<Map<String, String>> list = new ArrayList<>();
try {
list = this.lytjService.getMydTableData();
} catch (Exception e) {
e.printStackTrace();
}
return AjaxResult.success(list);
}
@GetMapping({"/getMydTxData"})
@ResponseBody
public AjaxResult getMydTxData() {
List<Map<String, Object>> list = new ArrayList<>();
try {
list = this.lytjService.getMydTxData();
} catch (Exception e) {
e.printStackTrace();
}
return AjaxResult.success(list);
}
@GetMapping({"/getLyjl"})
@ResponseBody
public AjaxResult getLyjl() throws ParseException {
TArchiveBorrow tArchiveBorrow = new TArchiveBorrow();
List<TArchiveBorrow> list = this.tArchiveBorrowService.selectTArchiveBorrowList(tArchiveBorrow);
if (list.size() > 15) {
for (int i = 0; i < list.size(); i++) {
if (list.size() - i > 15) {
list.remove(i);
}
}
}
return AjaxResult.success(list);
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\lytj\controller\LytjController.class

@ -1,322 +1,322 @@
/* */ package com.archive.project.zhtj.lytj.service.impl
package com.archive.project.zhtj.lytj.service.impl
;
/* */
/* */ import com.archive.framework.config.ArchiveConfig;
/* */ import com.archive.project.common.service.IExecuteSqlService;
/* */ import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper;
/* */ import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper;
/* */ import com.archive.project.system.config.service.IConfigService;
/* */ import com.archive.project.system.dict.service.IDictTypeService;
/* */ import com.archive.project.zhtj.lytj.service.ILytjService;
/* */ import java.util.ArrayList;
/* */ import java.util.HashMap;
/* */ import java.util.LinkedHashMap;
/* */ import java.util.List;
/* */ import java.util.Map;
/* */ import org.springframework.beans.factory.annotation.Autowired;
/* */ import org.springframework.stereotype.Service;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Service
/* */ public class LytjServiceImpl
/* */ implements ILytjService
/* */ {
/* */ @Autowired
/* */ private PhysicalTableMapper physicalTableMapper;
/* */ @Autowired
/* */ private PhysicalTableColumnMapper physicalTableColumnMapper;
/* */ @Autowired
/* */ private IExecuteSqlService executeSqlService;
/* */ @Autowired
/* */ private IConfigService configService;
/* */ @Autowired
/* */ private IDictTypeService dictTypeService;
/* */ @Autowired
/* */ private ArchiveConfig archiveConfig;
/* */
/* */ public List<Map<String, String>> getRctjTableData() {
/* 53 */ List<Map<String, String>> list = new ArrayList<>();
/* 54 */ String sql = "";
/* 55 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 56 */ sql = "SELECT SUBSTRING(borrow_data,1,4) as nd,SUBSTRING(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2) ORDER BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2)";
/* */ }
/* 58 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 59 */ sql = "SELECT SUBSTR(borrow_data,1,4) as nd,SUBSTR(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2) ORDER BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2)";
/* */ }
/* */
/* */
/* 63 */ List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql);
/* 64 */ for (int i = 0; i < datalist.size(); i++) {
/* 65 */ String nd = (((LinkedHashMap)datalist.get(i)).get("nd") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("nd").toString();
/* 66 */ String yf = (((LinkedHashMap)datalist.get(i)).get("yf") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("yf").toString();
/* 67 */ Map<String, String> map1 = new HashMap<>();
/* 68 */ map1.put("nd", nd);
/* 69 */ map1.put("yf", yf);
/* */
/* 71 */ String str1 = "";
/* 72 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 73 */ str1 = "select SUM(pborrow_state) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' ";
/* 74 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 75 */ str1 = "select SUM(pborrow_state) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' ";
/* */ }
/* 77 */ String str2 = this.executeSqlService.getSingle(str1);
/* 78 */ if (str2.equals("")) {
/* 79 */ str2 = "0";
/* */ }
/* 81 */ map1.put("rc", str2);
/* */
/* 83 */ String str3 = "";
/* 84 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 85 */ str3 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='1'";
/* 86 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 87 */ str3 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='1'";
/* */ }
/* 89 */ String str4 = this.executeSqlService.getSingle(str3);
/* 90 */ map1.put("dzjy", str4);
/* */
/* 92 */ String str5 = "";
/* 93 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 94 */ str5 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='2'";
/* 95 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 96 */ str5 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='2'";
/* */ }
/* 98 */ String str6 = this.executeSqlService.getSingle(str5);
/* 99 */ map1.put("stjy", str6);
/* 100 */ list.add(map1);
/* */ }
/* */
/* 103 */ Map<String, String> map = new HashMap<>();
/* 104 */ map.put("nd", "合计");
/* 105 */ map.put("yf", "");
/* */
/* 107 */ String rcsql = "select SUM(pborrow_state) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id ";
/* 108 */ String rc = this.executeSqlService.getSingle(rcsql);
/* 109 */ if (rc.equals("")) {
/* 110 */ rc = "0";
/* */ }
/* 112 */ map.put("rc", rc);
/* */
/* 114 */ String dzsql = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='1'";
/* 115 */ String dzjy = this.executeSqlService.getSingle(dzsql);
/* 116 */ map.put("dzjy", dzjy);
/* */
/* 118 */ String stsql = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='2'";
/* 119 */ String stjy = this.executeSqlService.getSingle(stsql);
/* 120 */ map.put("stjy", stjy);
/* 121 */ list.add(map);
/* 122 */ return list;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Map<String, String>> getLymxtjTableData() {
/* 132 */ List<Map<String, String>> list = new ArrayList<>();
/* 133 */ String sql = "select b.table_name as name,count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id group by b.table_name";
/* 134 */ List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql);
/* 135 */ for (int i = 0; i < datalist.size(); i++) {
/* 136 */ String name = (((LinkedHashMap)datalist.get(i)).get("name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("name").toString();
/* 137 */ String str1 = (((LinkedHashMap)datalist.get(i)).get("zs") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("zs").toString();
/* 138 */ Map<String, String> map1 = new HashMap<>();
/* 139 */ map1.put("name", name);
/* 140 */ map1.put("zs", str1);
/* */
/* */
/* 143 */ String str2 = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where b.table_name='" + name + "' and a.borrow_type='1'";
/* 144 */ String str3 = this.executeSqlService.getSingle(str2);
/* 145 */ map1.put("dzjy", str3);
/* */
/* 147 */ String str4 = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where b.table_name='" + name + "' and a.borrow_type='2'";
/* 148 */ String str5 = this.executeSqlService.getSingle(str4);
/* 149 */ map1.put("stjy", str5);
/* 150 */ list.add(map1);
/* */ }
/* */
/* 153 */ Map<String, String> map = new HashMap<>();
/* 154 */ map.put("name", "合计");
/* */
/* 156 */ String rcsql = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id ";
/* 157 */ String zs = this.executeSqlService.getSingle(rcsql);
/* 158 */ map.put("zs", zs);
/* */
/* */
/* 161 */ String dzsql = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='1'";
/* 162 */ String dzjy = this.executeSqlService.getSingle(dzsql);
/* 163 */ map.put("dzjy", dzjy);
/* */
/* 165 */ String stsql = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='2'";
/* 166 */ String stjy = this.executeSqlService.getSingle(stsql);
/* 167 */ map.put("stjy", stjy);
/* 168 */ list.add(map);
/* 169 */ return list;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public Map<String, Object> getLymxtjTxData() {
/* 179 */ Map<String, Object> res = new HashMap<>();
/* 180 */ List<String> nameList = new ArrayList<>();
/* 181 */ List<Map<String, Object>> list = new ArrayList<>();
/* 182 */ String sql = "select b.table_name as name,count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id group by b.table_name";
/* 183 */ List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql);
/* 184 */ for (int i = 0; i < datalist.size(); i++) {
/* 185 */ String name = (((LinkedHashMap)datalist.get(i)).get("name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("name").toString();
/* 186 */ String zs = (((LinkedHashMap)datalist.get(i)).get("zs") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("zs").toString();
/* 187 */ Map<String, Object> map = new HashMap<>();
/* 188 */ map.put("name", name);
/* 189 */ map.put("value", Integer.valueOf(Integer.parseInt(zs)));
/* 190 */ nameList.add(name);
/* 191 */ list.add(map);
/* */ }
/* 193 */ res.put("names", nameList);
/* 194 */ res.put("mapData", list);
/* 195 */ return res;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Map<String, String>> getMydTableData() {
/* 205 */ List<Map<String, String>> list = new ArrayList<>();
/* */
/* 207 */ String sql = "";
/* 208 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 209 */ sql = "SELECT SUBSTRING(borrow_data,1,4) as nd,SUBSTRING(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2) ORDER BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2)";
/* */ }
/* 211 */ else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 212 */ sql = "SELECT SUBSTR(borrow_data,1,4) as nd,SUBSTR(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2) ORDER BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2)";
/* */ }
/* 214 */ List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql);
/* 215 */ for (int i = 0; i < datalist.size(); i++) {
/* 216 */ String nd = (((LinkedHashMap)datalist.get(i)).get("nd") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("nd").toString();
/* 217 */ String yf = (((LinkedHashMap)datalist.get(i)).get("yf") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("yf").toString();
/* 218 */ Map<String, String> map1 = new HashMap<>();
/* 219 */ map1.put("nd", nd);
/* 220 */ map1.put("yf", yf);
/* */
/* */
/* 223 */ String str1 = "";
/* 224 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 225 */ str1 = "select SUM(pborrow_state) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' ";
/* 226 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 227 */ str1 = "select SUM(pborrow_state) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' ";
/* */ }
/* 229 */ String str2 = this.executeSqlService.getSingle(str1);
/* 230 */ map1.put("rc", str2);
/* */
/* 232 */ String str3 = "";
/* 233 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 234 */ str3 = "select count(1) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and (a.using_effect='1' or a.using_effect='' or a.using_effect is null)";
/* 235 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 236 */ str3 = "select count(1) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and (a.using_effect='1' or a.using_effect='' or a.using_effect is null)";
/* */ }
/* 238 */ String str4 = this.executeSqlService.getSingle(str3);
/* 239 */ map1.put("fcmy", str4);
/* */
/* 241 */ String str5 = "";
/* 242 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 243 */ str5 = "select count(1) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.using_effect='2'";
/* 244 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 245 */ str5 = "select count(1) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.using_effect='2'";
/* */ }
/* 247 */ String str6 = this.executeSqlService.getSingle(str5);
/* 248 */ map1.put("my", str6);
/* */
/* 250 */ String str7 = "";
/* 251 */ if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
/* 252 */ str7 = "select count(1) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.using_effect='3'";
/* 253 */ } else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
/* 254 */ str7 = "select count(1) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.using_effect='3'";
/* */ }
/* 256 */ String str8 = this.executeSqlService.getSingle(str7);
/* 257 */ map1.put("bmy", str8);
/* 258 */ list.add(map1);
/* */ }
/* */
/* 261 */ Map<String, String> map = new HashMap<>();
/* 262 */ map.put("nd", "合计");
/* 263 */ map.put("yf", "");
/* */
/* 265 */ String rcsql = "select SUM(pborrow_state) from t_archive_borrow ";
/* 266 */ String rc = this.executeSqlService.getSingle(rcsql);
/* 267 */ if (rc.equals("")) {
/* 268 */ rc = "0";
/* */ }
/* 270 */ map.put("rc", rc);
/* */
/* 272 */ String fcmysql = "select count(1) from t_archive_borrow a where (a.using_effect='1' or a.using_effect='' or a.using_effect is null)";
/* 273 */ String fcmy = this.executeSqlService.getSingle(fcmysql);
/* 274 */ map.put("fcmy", fcmy);
/* */
/* 276 */ String mysql = "select count(1) from t_archive_borrow a where a.using_effect='2'";
/* 277 */ String my = this.executeSqlService.getSingle(mysql);
/* 278 */ map.put("my", my);
/* */
/* 280 */ String bmysql = "select count(1) from t_archive_borrow a where a.using_effect='3'";
/* 281 */ String bmy = this.executeSqlService.getSingle(bmysql);
/* 282 */ map.put("bmy", bmy);
/* 283 */ list.add(map);
/* 284 */ return list;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public List<Map<String, Object>> getMydTxData() {
/* 293 */ List<Map<String, Object>> list = new ArrayList<>();
/* */
/* 295 */ Map<String, Object> fcmymap = new HashMap<>();
/* 296 */ String fcmysql = "select count(1) from t_archive_borrow a where (a.using_effect='1' or a.using_effect='' or a.using_effect is null)";
/* 297 */ String fcmy = this.executeSqlService.getSingle(fcmysql);
/* 298 */ fcmymap.put("name", "非常满意");
/* 299 */ fcmymap.put("value", Integer.valueOf(Integer.parseInt(fcmy)));
/* 300 */ list.add(fcmymap);
/* */
/* 302 */ Map<String, Object> mymap = new HashMap<>();
/* 303 */ String mysql = "select count(1) from t_archive_borrow a where a.using_effect='2'";
/* 304 */ String my = this.executeSqlService.getSingle(mysql);
/* 305 */ mymap.put("name", "满意");
/* 306 */ mymap.put("value", Integer.valueOf(Integer.parseInt(my)));
/* 307 */ list.add(mymap);
/* */
/* 309 */ Map<String, Object> bmymap = new HashMap<>();
/* 310 */ String bmysql = "select count(1) from t_archive_borrow a where a.using_effect='3'";
/* 311 */ String bmy = this.executeSqlService.getSingle(bmysql);
/* 312 */ bmymap.put("name", "不满意");
/* 313 */ bmymap.put("value", Integer.valueOf(Integer.parseInt(bmy)));
/* 314 */ list.add(bmymap);
/* 315 */ return list;
/* */ }
/* */ }
import com.archive.framework.config.ArchiveConfig;
import com.archive.project.common.service.IExecuteSqlService;
import com.archive.project.dasz.physicaltable.mapper.PhysicalTableMapper;
import com.archive.project.dasz.physicaltablecolumn.mapper.PhysicalTableColumnMapper;
import com.archive.project.system.config.service.IConfigService;
import com.archive.project.system.dict.service.IDictTypeService;
import com.archive.project.zhtj.lytj.service.ILytjService;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class LytjServiceImpl
implements ILytjService
{
@Autowired
private PhysicalTableMapper physicalTableMapper;
@Autowired
private PhysicalTableColumnMapper physicalTableColumnMapper;
@Autowired
private IExecuteSqlService executeSqlService;
@Autowired
private IConfigService configService;
@Autowired
private IDictTypeService dictTypeService;
@Autowired
private ArchiveConfig archiveConfig;
public List<Map<String, String>> getRctjTableData() {
List<Map<String, String>> list = new ArrayList<>();
String sql = "";
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
sql = "SELECT SUBSTRING(borrow_data,1,4) as nd,SUBSTRING(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2) ORDER BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2)";
}
else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
sql = "SELECT SUBSTR(borrow_data,1,4) as nd,SUBSTR(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2) ORDER BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2)";
}
List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql);
for (int i = 0; i < datalist.size(); i++) {
String nd = (((LinkedHashMap)datalist.get(i)).get("nd") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("nd").toString();
String yf = (((LinkedHashMap)datalist.get(i)).get("yf") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("yf").toString();
Map<String, String> map1 = new HashMap<>();
map1.put("nd", nd);
map1.put("yf", yf);
String str1 = "";
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
str1 = "select SUM(pborrow_state) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' ";
} else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
str1 = "select SUM(pborrow_state) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' ";
}
String str2 = this.executeSqlService.getSingle(str1);
if (str2.equals("")) {
str2 = "0";
}
map1.put("rc", str2);
String str3 = "";
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
str3 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='1'";
} else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
str3 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='1'";
}
String str4 = this.executeSqlService.getSingle(str3);
map1.put("dzjy", str4);
String str5 = "";
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
str5 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='2'";
} else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
str5 = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.borrow_type='2'";
}
String str6 = this.executeSqlService.getSingle(str5);
map1.put("stjy", str6);
list.add(map1);
}
Map<String, String> map = new HashMap<>();
map.put("nd", "合计");
map.put("yf", "");
String rcsql = "select SUM(pborrow_state) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id ";
String rc = this.executeSqlService.getSingle(rcsql);
if (rc.equals("")) {
rc = "0";
}
map.put("rc", rc);
String dzsql = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='1'";
String dzjy = this.executeSqlService.getSingle(dzsql);
map.put("dzjy", dzjy);
String stsql = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='2'";
String stjy = this.executeSqlService.getSingle(stsql);
map.put("stjy", stjy);
list.add(map);
return list;
}
public List<Map<String, String>> getLymxtjTableData() {
List<Map<String, String>> list = new ArrayList<>();
String sql = "select b.table_name as name,count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id group by b.table_name";
List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql);
for (int i = 0; i < datalist.size(); i++) {
String name = (((LinkedHashMap)datalist.get(i)).get("name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("name").toString();
String str1 = (((LinkedHashMap)datalist.get(i)).get("zs") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("zs").toString();
Map<String, String> map1 = new HashMap<>();
map1.put("name", name);
map1.put("zs", str1);
String str2 = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where b.table_name='" + name + "' and a.borrow_type='1'";
String str3 = this.executeSqlService.getSingle(str2);
map1.put("dzjy", str3);
String str4 = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where b.table_name='" + name + "' and a.borrow_type='2'";
String str5 = this.executeSqlService.getSingle(str4);
map1.put("stjy", str5);
list.add(map1);
}
Map<String, String> map = new HashMap<>();
map.put("name", "合计");
String rcsql = "select count(1) from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id ";
String zs = this.executeSqlService.getSingle(rcsql);
map.put("zs", zs);
String dzsql = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='1'";
String dzjy = this.executeSqlService.getSingle(dzsql);
map.put("dzjy", dzjy);
String stsql = "select count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id where a.borrow_type='2'";
String stjy = this.executeSqlService.getSingle(stsql);
map.put("stjy", stjy);
list.add(map);
return list;
}
public Map<String, Object> getLymxtjTxData() {
Map<String, Object> res = new HashMap<>();
List<String> nameList = new ArrayList<>();
List<Map<String, Object>> list = new ArrayList<>();
String sql = "select b.table_name as name,count(1) as zs from t_archive_borrow a inner join t_archive_borrow_detail b on a.id=b.owner_id group by b.table_name";
List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql);
for (int i = 0; i < datalist.size(); i++) {
String name = (((LinkedHashMap)datalist.get(i)).get("name") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("name").toString();
String zs = (((LinkedHashMap)datalist.get(i)).get("zs") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("zs").toString();
Map<String, Object> map = new HashMap<>();
map.put("name", name);
map.put("value", Integer.valueOf(Integer.parseInt(zs)));
nameList.add(name);
list.add(map);
}
res.put("names", nameList);
res.put("mapData", list);
return res;
}
public List<Map<String, String>> getMydTableData() {
List<Map<String, String>> list = new ArrayList<>();
String sql = "";
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
sql = "SELECT SUBSTRING(borrow_data,1,4) as nd,SUBSTRING(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2) ORDER BY SUBSTRING(borrow_data,1,4),SUBSTRING(borrow_data,6,2)";
}
else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
sql = "SELECT SUBSTR(borrow_data,1,4) as nd,SUBSTR(borrow_data,6,2) as yf FROM t_archive_borrow GROUP BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2) ORDER BY SUBSTR(borrow_data,1,4),SUBSTR(borrow_data,6,2)";
}
List<LinkedHashMap<String, Object>> datalist = this.executeSqlService.queryList(sql);
for (int i = 0; i < datalist.size(); i++) {
String nd = (((LinkedHashMap)datalist.get(i)).get("nd") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("nd").toString();
String yf = (((LinkedHashMap)datalist.get(i)).get("yf") == null) ? "" : ((LinkedHashMap)datalist.get(i)).get("yf").toString();
Map<String, String> map1 = new HashMap<>();
map1.put("nd", nd);
map1.put("yf", yf);
String str1 = "";
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
str1 = "select SUM(pborrow_state) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' ";
} else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
str1 = "select SUM(pborrow_state) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' ";
}
String str2 = this.executeSqlService.getSingle(str1);
map1.put("rc", str2);
String str3 = "";
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
str3 = "select count(1) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and (a.using_effect='1' or a.using_effect='' or a.using_effect is null)";
} else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
str3 = "select count(1) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and (a.using_effect='1' or a.using_effect='' or a.using_effect is null)";
}
String str4 = this.executeSqlService.getSingle(str3);
map1.put("fcmy", str4);
String str5 = "";
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
str5 = "select count(1) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.using_effect='2'";
} else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
str5 = "select count(1) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.using_effect='2'";
}
String str6 = this.executeSqlService.getSingle(str5);
map1.put("my", str6);
String str7 = "";
if ("mysql".equals(this.archiveConfig.getDatabaseType())) {
str7 = "select count(1) from t_archive_borrow a where SUBSTRING(a.borrow_data,1,4)='" + nd + "' and SUBSTRING(a.borrow_data,6,2)='" + yf + "' and a.using_effect='3'";
} else if ("sqlite".equals(this.archiveConfig.getDatabaseType())) {
str7 = "select count(1) from t_archive_borrow a where SUBSTR(a.borrow_data,1,4)='" + nd + "' and SUBSTR(a.borrow_data,6,2)='" + yf + "' and a.using_effect='3'";
}
String str8 = this.executeSqlService.getSingle(str7);
map1.put("bmy", str8);
list.add(map1);
}
Map<String, String> map = new HashMap<>();
map.put("nd", "合计");
map.put("yf", "");
String rcsql = "select SUM(pborrow_state) from t_archive_borrow ";
String rc = this.executeSqlService.getSingle(rcsql);
if (rc.equals("")) {
rc = "0";
}
map.put("rc", rc);
String fcmysql = "select count(1) from t_archive_borrow a where (a.using_effect='1' or a.using_effect='' or a.using_effect is null)";
String fcmy = this.executeSqlService.getSingle(fcmysql);
map.put("fcmy", fcmy);
String mysql = "select count(1) from t_archive_borrow a where a.using_effect='2'";
String my = this.executeSqlService.getSingle(mysql);
map.put("my", my);
String bmysql = "select count(1) from t_archive_borrow a where a.using_effect='3'";
String bmy = this.executeSqlService.getSingle(bmysql);
map.put("bmy", bmy);
list.add(map);
return list;
}
public List<Map<String, Object>> getMydTxData() {
List<Map<String, Object>> list = new ArrayList<>();
Map<String, Object> fcmymap = new HashMap<>();
String fcmysql = "select count(1) from t_archive_borrow a where (a.using_effect='1' or a.using_effect='' or a.using_effect is null)";
String fcmy = this.executeSqlService.getSingle(fcmysql);
fcmymap.put("name", "非常满意");
fcmymap.put("value", Integer.valueOf(Integer.parseInt(fcmy)));
list.add(fcmymap);
Map<String, Object> mymap = new HashMap<>();
String mysql = "select count(1) from t_archive_borrow a where a.using_effect='2'";
String my = this.executeSqlService.getSingle(mysql);
mymap.put("name", "满意");
mymap.put("value", Integer.valueOf(Integer.parseInt(my)));
list.add(mymap);
Map<String, Object> bmymap = new HashMap<>();
String bmysql = "select count(1) from t_archive_borrow a where a.using_effect='3'";
String bmy = this.executeSqlService.getSingle(bmysql);
bmymap.put("name", "不满意");
bmymap.put("value", Integer.valueOf(Integer.parseInt(bmy)));
list.add(bmymap);
return list;
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\lytj\service\impl\LytjServiceImpl.class

@ -1,36 +1,36 @@
/* */ package com.archive.project.zhtj.nbtj.controller
package com.archive.project.zhtj.nbtj.controller
;
/* */
/* */ import com.archive.framework.web.controller.BaseController;
/* */ import org.apache.shiro.authz.annotation.RequiresPermissions;
/* */ import org.springframework.stereotype.Controller;
/* */ import org.springframework.ui.ModelMap;
/* */ import org.springframework.web.bind.annotation.GetMapping;
/* */ import org.springframework.web.bind.annotation.RequestMapping;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ @Controller
/* */ @RequestMapping({"/zhtj/nbtj"})
/* */ public class NbtjController
/* */ extends BaseController
/* */ {
/* 23 */ private String prefix = "zhtj/nbtj";
/* */
/* */
/* */ @RequiresPermissions({"zhtj:nbtj:view"})
/* */ @GetMapping
/* */ public String nbtj(ModelMap mmap) {
/* 29 */ return this.prefix + "/nbtj";
/* */ }
/* */ }
import com.archive.framework.web.controller.BaseController;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping({"/zhtj/nbtj"})
public class NbtjController
extends BaseController
{
private String prefix = "zhtj/nbtj";
@RequiresPermissions({"zhtj:nbtj:view"})
@GetMapping
public String nbtj(ModelMap mmap) {
return this.prefix + "/nbtj";
}
}
/* Location: C:\Users\Administrator\Desktop\extracted.zip!\extracted\BOOT-INF\classes\com\archive\project\zhtj\nbtj\controller\NbtjController.class

Loading…
Cancel
Save