diff --git a/crmeb/.mvn/wrapper/MavenWrapperDownloader.java b/crmeb/.mvn/wrapper/MavenWrapperDownloader.java
deleted file mode 100644
index a45eb6ba..00000000
--- a/crmeb/.mvn/wrapper/MavenWrapperDownloader.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2007-present the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.net.*;
-import java.io.*;
-import java.nio.channels.*;
-import java.util.Properties;
-
-public class MavenWrapperDownloader {
-
- private static final String WRAPPER_VERSION = "0.5.6";
- /**
- * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
- */
- private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
- + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
-
- /**
- * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
- * use instead of the default one.
- */
- private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
- ".mvn/wrapper/maven-wrapper.properties";
-
- /**
- * Path where the maven-wrapper.jar will be saved to.
- */
- private static final String MAVEN_WRAPPER_JAR_PATH =
- ".mvn/wrapper/maven-wrapper.jar";
-
- /**
- * Name of the property which should be used to override the default download url for the wrapper.
- */
- private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
-
- public static void main(String args[]) {
- System.out.println("- Downloader started");
- File baseDirectory = new File(args[0]);
- System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
-
- // If the maven-wrapper.properties exists, read it and check if it contains a custom
- // wrapperUrl parameter.
- File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
- String url = DEFAULT_DOWNLOAD_URL;
- if (mavenWrapperPropertyFile.exists()) {
- FileInputStream mavenWrapperPropertyFileInputStream = null;
- try {
- mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
- Properties mavenWrapperProperties = new Properties();
- mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
- url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
- } catch (IOException e) {
- System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
- } finally {
- try {
- if (mavenWrapperPropertyFileInputStream != null) {
- mavenWrapperPropertyFileInputStream.close();
- }
- } catch (IOException e) {
- // Ignore ...
- }
- }
- }
- System.out.println("- Downloading from: " + url);
-
- File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
- if (!outputFile.getParentFile().exists()) {
- if (!outputFile.getParentFile().mkdirs()) {
- System.out.println(
- "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
- }
- }
- System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
- try {
- downloadFileFromURL(url, outputFile);
- System.out.println("Done");
- System.exit(0);
- } catch (Throwable e) {
- System.out.println("- Error downloading");
- e.printStackTrace();
- System.exit(1);
- }
- }
-
- private static void downloadFileFromURL(String urlString, File destination) throws Exception {
- if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
- String username = System.getenv("MVNW_USERNAME");
- char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
- Authenticator.setDefault(new Authenticator() {
- @Override
- protected PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication(username, password);
- }
- });
- }
- URL website = new URL(urlString);
- ReadableByteChannel rbc;
- rbc = Channels.newChannel(website.openStream());
- FileOutputStream fos = new FileOutputStream(destination);
- fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
- fos.close();
- rbc.close();
- }
-
-}
diff --git a/crmeb/.mvn/wrapper/maven-wrapper.jar b/crmeb/.mvn/wrapper/maven-wrapper.jar
deleted file mode 100644
index 2cc7d4a5..00000000
Binary files a/crmeb/.mvn/wrapper/maven-wrapper.jar and /dev/null differ
diff --git a/crmeb/.mvn/wrapper/maven-wrapper.properties b/crmeb/.mvn/wrapper/maven-wrapper.properties
deleted file mode 100644
index 642d572c..00000000
--- a/crmeb/.mvn/wrapper/maven-wrapper.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
-wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
diff --git a/crmeb/crmeb-admin/pom.xml b/crmeb/crmeb-admin/pom.xml
index c7d7994e..d7579585 100644
--- a/crmeb/crmeb-admin/pom.xml
+++ b/crmeb/crmeb-admin/pom.xml
@@ -22,6 +22,29 @@
crmeb-service
${crmeb-service}
+
+
+ org.springframework.boot
+ spring-boot-starter-quartz
+
+
+
+
+ com.github.oshi
+ oshi-core
+ 5.8.6
+
+
+ net.java.dev.jna
+ jna
+ 5.13.0
+
+
+ net.java.dev.jna
+ jna-platform
+ 5.13.0
+
+
@@ -40,6 +63,21 @@
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+
+
+ true
+
+ woff
+ woff2
+ eot
+ ttf
+ svg
+
+
+
@@ -71,6 +109,17 @@
**/*.xml
+
+
+ true
+ src/main/resources
+
+ **/*.woff
+ **/*.ttf
+ **/*.eot
+ **/*.svg
+
+
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/CrmebAdminApplication.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/CrmebAdminApplication.java
index 79514992..969f00d2 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/CrmebAdminApplication.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/CrmebAdminApplication.java
@@ -15,7 +15,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
@@ -27,6 +27,12 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableTransactionManagement
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) //去掉数据源
+//@ComponentScan(basePackages={"com.utils",
+// "com.zbkj.crmeb",
+// "com.exception",
+// "com.common",
+// "com.aop"}) //扫描utils包和父包
+//@MapperScan(basePackages = {"com.zbkj.crmeb.*.dao", "com.zbkj.crmeb.*.*.dao"})
@ComponentScan(basePackages = {"com.zbkj"})
@MapperScan(basePackages = {"com.zbkj.**.dao"})
public class CrmebAdminApplication {
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/acpect/ControllerAspect.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/acpect/ControllerAspect.java
deleted file mode 100644
index 1e043a8c..00000000
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/acpect/ControllerAspect.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.zbkj.admin.acpect;
-
-import org.aspectj.lang.ProceedingJoinPoint;
-import org.aspectj.lang.annotation.Around;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Pointcut;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import java.util.Arrays;
-
-
-/**
- * +----------------------------------------------------------------------
- * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
- * +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
- * +----------------------------------------------------------------------
- * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
- * +----------------------------------------------------------------------
- * | Author: CRMEB Team
- * +----------------------------------------------------------------------
- * 所有的前端controller层的拦截业务,方法的执行时间长度,
- */
-@Aspect
-@Component
-public class ControllerAspect {
-
- Logger logger = LoggerFactory.getLogger(ControllerAspect.class);
-
- @Pointcut("execution(* com.zbkj.admin.controller.*.*(..))")
- private void pointCutMethodController() {
-
- }
-
- @Around("pointCutMethodController()")
- public Object doAroundService(ProceedingJoinPoint pjp) throws Throwable {
-
- long begin = System.nanoTime();
-
- Object obj = pjp.proceed();
-
- long end = System.nanoTime();
-
- logger.info("Controller method:{},prams:{},cost time:{} ns,cost:{} ms",
-
- pjp.getSignature().toString(), Arrays.toString(pjp.getArgs()), (end - begin), (end - begin) / 1000000);
-
- return obj;
- }
-
-}
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/CorsConfig.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/CorsConfig.java
index b28c73c0..5ef768aa 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/CorsConfig.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/CorsConfig.java
@@ -10,7 +10,7 @@ import org.springframework.web.filter.CorsFilter;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
@@ -21,20 +21,16 @@ import org.springframework.web.filter.CorsFilter;
public class CorsConfig{
private CorsConfiguration buildConfig() {
CorsConfiguration corsConfiguration = new CorsConfiguration();
- //允许任何域名
- corsConfiguration.addAllowedOrigin("*");
- //允许任何头
- corsConfiguration.addAllowedHeader("*");
- //允许任何方法
- corsConfiguration.addAllowedMethod("*");
+ corsConfiguration.addAllowedOrigin("*"); //允许任何域名
+ corsConfiguration.addAllowedHeader("*"); //允许任何头
+ corsConfiguration.addAllowedMethod("*"); //允许任何方法
return corsConfiguration;
}
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
- //注册
- source.registerCorsConfiguration("/**", buildConfig());
+ source.registerCorsConfiguration("/**", buildConfig()); //注册
return new CorsFilter(source);
}
}
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/DruidConfig.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/DruidConfig.java
index 07d6b576..4ef0b288 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/DruidConfig.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/DruidConfig.java
@@ -16,7 +16,7 @@ import javax.sql.DataSource;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
@@ -35,18 +35,20 @@ public class DruidConfig {
servletRegistrationBean.addInitParameter("loginUsername", "kf"); // 用户名
servletRegistrationBean.addInitParameter("loginPassword", "654321"); // 密码
servletRegistrationBean.addInitParameter("resetEnable", "true"); // 是否可以重置数据源
- return servletRegistrationBean ;
+ return servletRegistrationBean;
}
+
@Bean
public FilterRegistrationBean filterRegistrationBean() {
- FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean() ;
+ FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
filterRegistrationBean.setFilter(new WebStatFilter());
filterRegistrationBean.addUrlPatterns("/*"); // 所有请求进行监控处理
//不必监控的请求
filterRegistrationBean.addInitParameter("exclusions", "*.html,*.png,*.ico,*.js,*.gif,*.jpg,*.css,/druid/*");
- return filterRegistrationBean ;
+ return filterRegistrationBean;
}
+
@Bean("dataSource")
@ConfigurationProperties(prefix = "spring.datasource")
public DataSource druidDataSource() {
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/JacksonConfig.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/JacksonConfig.java
index b67e03ae..bdbc9b67 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/JacksonConfig.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/JacksonConfig.java
@@ -12,7 +12,7 @@ import java.math.BigDecimal;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/RestTemplateConfig.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/RestTemplateConfig.java
index e06a3fc1..4a0c4f74 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/RestTemplateConfig.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/RestTemplateConfig.java
@@ -18,7 +18,7 @@ import java.util.List;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/SchedulerConfig.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/SchedulerConfig.java
index eacb3378..748054f2 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/SchedulerConfig.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/SchedulerConfig.java
@@ -11,7 +11,7 @@ import org.springframework.scheduling.config.ScheduledTaskRegistrar;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/SwaggerConfig.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/SwaggerConfig.java
index 92202171..f28a3640 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/SwaggerConfig.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/SwaggerConfig.java
@@ -25,7 +25,7 @@ import static com.google.common.collect.Lists.newArrayList;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/TaskExecutorConfig.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/TaskExecutorConfig.java
index 5d1b8763..a37cbd12 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/TaskExecutorConfig.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/TaskExecutorConfig.java
@@ -13,7 +13,7 @@ import java.util.concurrent.ThreadPoolExecutor;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/WebConfig.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/WebConfig.java
index a71594da..0d737f20 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/WebConfig.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/WebConfig.java
@@ -1,9 +1,10 @@
package com.zbkj.admin.config;
+import com.zbkj.common.constants.Constants;
+import com.zbkj.common.constants.UploadConstants;
+import com.zbkj.common.interceptor.SwaggerInterceptor;
import com.zbkj.admin.filter.ResponseFilter;
import com.zbkj.common.config.CrmebConfig;
-import com.zbkj.common.constants.Constants;
-import com.zbkj.common.interceptor.SwaggerInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@@ -15,12 +16,14 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.handler.MappedInterceptor;
+import java.io.File;
+
/**
* token验证拦截器
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
@@ -90,17 +93,21 @@ public class WebConfig implements WebMvcConfigurer {
.addResourceLocations("classpath:/META-INF/resources/webjars/");
/** 本地文件上传路径 */
- registry.addResourceHandler(Constants.UPLOAD_TYPE_IMAGE + "/**")
- .addResourceLocations("file:" + crmebConfig.getImagePath() + "/" + Constants.UPLOAD_TYPE_IMAGE + "/");
+ registry.addResourceHandler(UploadConstants.UPLOAD_FILE_KEYWORD + "/**")
+ .addResourceLocations("file:" + crmebConfig.getImagePath() + "/" + UploadConstants.UPLOAD_FILE_KEYWORD + "/");
+
+ registry.addResourceHandler(UploadConstants.UPLOAD_AFTER_FILE_KEYWORD + "/**")
+ .addResourceLocations("file:" +crmebConfig.getImagePath() + "/" + UploadConstants.UPLOAD_AFTER_FILE_KEYWORD + "/" );
+
}
@Bean
- public FilterRegistrationBean filterRegister() {
+ public FilterRegistrationBean filterRegister()
+ {
//注册过滤器
FilterRegistrationBean registration = new FilterRegistrationBean(responseFilter());
// 仅仅api前缀的请求才会拦截
- registration.addUrlPatterns("/api/admin/*");
- registration.addUrlPatterns("/api/front/*");
+ registration.addUrlPatterns("/api/*");
return registration;
}
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/WebSecurityConfig.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/WebSecurityConfig.java
index 73912e8b..24aa5a4c 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/WebSecurityConfig.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/config/WebSecurityConfig.java
@@ -5,6 +5,7 @@ import com.zbkj.admin.manager.AuthenticationEntryPointImpl;
import com.zbkj.admin.manager.CustomAccessDeniedHandler;
import com.zbkj.admin.manager.CustomAuthenticationProvider;
import com.zbkj.common.constants.Constants;
+import com.zbkj.common.constants.UploadConstants;
import com.zbkj.service.service.impl.UserDetailServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
@@ -25,7 +26,7 @@ import org.springframework.web.filter.CorsFilter;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
@@ -77,7 +78,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
// }
@Override
- protected void configure(AuthenticationManagerBuilder auth) {
+ protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.authenticationProvider(new CustomAuthenticationProvider(new UserDetailServiceImpl()));
}
@@ -110,16 +111,18 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.authorizeRequests()
// 跨域预检请求
// .antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
- // 对于登录login 验证码captchaImage 和其他放行的目录 允许匿名访问"/citylife/front/**"
- .antMatchers("/api/admin/login", "/api/admin/validate/code/get").permitAll()
- .antMatchers("/api/admin/getLoginPic").permitAll()
+ // 对于登录login 验证码captchaImage 和其他放行的目录 允许匿名访问"/citylife/front/**"
+ .antMatchers("/api/admin/login", "/api/admin/validate/code/get").permitAll()
+ .antMatchers("/api/admin/getLoginPic").permitAll()
+ .antMatchers("/api/admin/login/account/detection").permitAll()
+ .antMatchers("/api/admin/validate/code/getcaptchaconfig").permitAll()
// 放行资源路径
- .antMatchers("/"+ Constants.UPLOAD_TYPE_IMAGE +"/**").anonymous()
+ .antMatchers("/"+ UploadConstants.UPLOAD_FILE_KEYWORD +"/**").permitAll()
+ .antMatchers("/"+ UploadConstants.DOWNLOAD_FILE_KEYWORD +"/**").permitAll()
+ .antMatchers("/"+ UploadConstants.UPLOAD_AFTER_FILE_KEYWORD +"/**").permitAll()
// 放行图片、文件上传
- .antMatchers("/api/admin/upload/image").permitAll()
- .antMatchers("/api/admin/upload/file").permitAll()
- // 代码生成器
- .antMatchers("/api/codegen/code").permitAll()
+ .antMatchers("/api/admin/upload/image").permitAll()
+ .antMatchers("/api/admin/upload/file").permitAll()
// .antMatchers("/wx/user/*/login","/citylife/nocheck/**").anonymous()
.antMatchers(
HttpMethod.GET,
@@ -140,7 +143,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/druid/**").anonymous()
.antMatchers("/captcha/get", "/captcha/check").anonymous()
.antMatchers("/api/admin/payment/callback/**").anonymous()
- .antMatchers("/api/public/**").anonymous()
+ .antMatchers("/api/public/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated()
.and()
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/AdminLoginController.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/AdminLoginController.java
index 110bc28c..87d391f2 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/AdminLoginController.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/AdminLoginController.java
@@ -1,12 +1,15 @@
package com.zbkj.admin.controller;
+import com.zbkj.admin.service.AdminLoginService;
+import com.zbkj.common.request.AdminAccountDetectionRequest;
+import com.zbkj.common.request.LoginAdminUpdatePasswordRequest;
+import com.zbkj.common.request.LoginAdminUpdateRequest;
import com.zbkj.common.request.SystemAdminLoginRequest;
-import com.zbkj.common.response.CommonResult;
import com.zbkj.common.response.MenusResponse;
import com.zbkj.common.response.SystemAdminResponse;
import com.zbkj.common.response.SystemLoginResponse;
+import com.zbkj.common.result.CommonResult;
import com.zbkj.common.utils.CrmebUtil;
-import com.zbkj.admin.service.AdminLoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -24,7 +27,7 @@ import java.util.Map;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
@@ -45,7 +48,7 @@ public class AdminLoginController {
public CommonResult SystemAdminLogin(@RequestBody @Validated SystemAdminLoginRequest systemAdminLoginRequest, HttpServletRequest request) {
String ip = CrmebUtil.getClientIp(request);
SystemLoginResponse systemAdminResponse = adminLoginService.login(systemAdminLoginRequest, ip);
- return CommonResult.success(systemAdminResponse, "login success");
+ return CommonResult.success(systemAdminResponse);
}
@PreAuthorize("hasAuthority('admin:logout')")
@@ -53,7 +56,7 @@ public class AdminLoginController {
@GetMapping(value = "/logout")
public CommonResult SystemAdminLogout() {
adminLoginService.logout();
- return CommonResult.success("logout success");
+ return CommonResult.success();
}
@PreAuthorize("hasAuthority('admin:info')")
@@ -83,4 +86,30 @@ public class AdminLoginController {
return CommonResult.success(adminLoginService.getMenus());
}
+
+ @ApiOperation(value="账号登录检测")
+ @RequestMapping(value = "/login/account/detection", method = RequestMethod.POST)
+ public CommonResult accountDetection(@RequestBody @Validated AdminAccountDetectionRequest request) {
+ return CommonResult.success(adminLoginService.accountDetection(request.getAccount()));
+ }
+
+ @PreAuthorize("hasAuthority('admin:update:name')")
+ @ApiOperation(value="修改登录用户信息")
+ @RequestMapping(value = "/login/admin/update", method = RequestMethod.POST)
+ public CommonResult loginAdminUpdate(@RequestBody @Validated LoginAdminUpdateRequest request) {
+ if (adminLoginService.loginAdminUpdate(request)) {
+ return CommonResult.success();
+ }
+ return CommonResult.failed();
+ }
+
+ @PreAuthorize("hasAuthority('admin:update:password')")
+ @ApiOperation(value="修改登录用户密码")
+ @RequestMapping(value = "/login/update/password", method = RequestMethod.POST)
+ public CommonResult loginAdminUpdatePwd(@RequestBody @Validated LoginAdminUpdatePasswordRequest request) {
+ if (adminLoginService.loginAdminUpdatePwd(request)) {
+ return CommonResult.success();
+ }
+ return CommonResult.failed();
+ }
}
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/ArticleController.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/ArticleController.java
index 4023dc03..56f07ee5 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/ArticleController.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/ArticleController.java
@@ -5,7 +5,7 @@ import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.ArticleRequest;
import com.zbkj.common.request.ArticleSearchRequest;
import com.zbkj.common.request.PageParamRequest;
-import com.zbkj.common.response.CommonResult;
+import com.zbkj.common.result.CommonResult;
import com.zbkj.common.vo.ArticleVo;
import com.zbkj.service.service.ArticleService;
import io.swagger.annotations.Api;
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.*;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CallbackController.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CallbackController.java
index 4079e9e7..9574c5b2 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CallbackController.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CallbackController.java
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CategoryController.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CategoryController.java
index 36049046..7e96b6e7 100644
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CategoryController.java
+++ b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CategoryController.java
@@ -6,7 +6,7 @@ import com.zbkj.common.page.CommonPage;
import com.zbkj.common.request.CategoryRequest;
import com.zbkj.common.request.CategorySearchRequest;
import com.zbkj.common.request.PageParamRequest;
-import com.zbkj.common.response.CommonResult;
+import com.zbkj.common.result.CommonResult;
import com.zbkj.common.utils.CrmebUtil;
import com.zbkj.common.vo.CategoryTreeVo;
import com.zbkj.service.service.CategoryService;
@@ -29,7 +29,7 @@ import java.util.List;
* +----------------------------------------------------------------------
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
* +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
* +----------------------------------------------------------------------
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
* +----------------------------------------------------------------------
@@ -49,18 +49,16 @@ public class CategoryController {
private SystemAttachmentService systemAttachmentService;
/**
- * 分页显示分类表
+ * 显示分类表
* @param request 搜索条件
- * @param pageParamRequest 分页参数
* @author Mr.Zhang
* @since 2020-04-16
*/
@PreAuthorize("hasAuthority('admin:category:list')")
- @ApiOperation(value = "分页分类列表")
+ @ApiOperation(value = "分类列表")
@RequestMapping(value = "/list", method = RequestMethod.GET)
- public CommonResult> getList(@ModelAttribute CategorySearchRequest request, @ModelAttribute PageParamRequest pageParamRequest) {
- CommonPage categoryCommonPage = CommonPage.restPage(categoryService.getList(request, pageParamRequest));
- return CommonResult.success(categoryCommonPage);
+ public CommonResult> getList(@ModelAttribute CategorySearchRequest request) {
+ return CommonResult.success(categoryService.getList(request));
}
/**
diff --git a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CodeGenerator.java b/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CodeGenerator.java
deleted file mode 100644
index d3374671..00000000
--- a/crmeb/crmeb-admin/src/main/java/com/zbkj/admin/controller/CodeGenerator.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.zbkj.admin.controller;
-
-import com.zbkj.common.constants.Constants;
-import com.zbkj.common.response.CommonResult;
-import com.zbkj.common.utils.DateUtil;
-import com.zbkj.common.utils.genutils.GenCodePageListUtils;
-import com.zbkj.common.utils.genutils.GenCodePageQueryUtils;
-import com.zbkj.service.service.impl.CrmebGeneratorCodeService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.io.IOUtils;
-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.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.Date;
-import java.util.Map;
-
-/**
- * 前后端代码生成器 controller
- * +----------------------------------------------------------------------
- * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
- * +----------------------------------------------------------------------
- * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
- * +----------------------------------------------------------------------
- * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
- * +----------------------------------------------------------------------
- * | Author: CRMEB Team
- * +----------------------------------------------------------------------
- */
-@Controller
-@RequestMapping("api/codegen")
-@Api(tags = "代码生成")
-public class CodeGenerator {
-
- @Autowired
- private CrmebGeneratorCodeService crmebGeneratorCodeService;
-
- @ResponseBody
- @ApiOperation(value="代码生成-新列表")
- @GetMapping("/list")
- public CommonResult