【fix】优化代码,删掉不需要的内容
【modify】修改公告标题模糊查询的逻辑
This commit is contained in:
-1
@@ -162,7 +162,6 @@ public class TranslationAspect {
|
||||
if (!StringUtils.isEmpty(table)){
|
||||
tmpValue = commonAPI.queryTableDictTextByKey(table,text,code,k.trim());
|
||||
}else {
|
||||
// tmpValue = dictService.queryDictTextByKey(code, k.trim());
|
||||
List<SysDictItemCore> listNew = listDict.stream().filter(o-> Objects.equals(o.getDictCode(),code) && Objects.equals(o.getItemValue(),k.trim())).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(listNew)){
|
||||
tmpValue = listNew.get(0).getItemText();
|
||||
|
||||
+1
-8
@@ -12,14 +12,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @Author zhangweijian
|
||||
* @since 2018-12-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
|
||||
-18
@@ -12,10 +12,8 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.ParameterBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.schema.ModelRef;
|
||||
import springfox.documentation.service.*;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||
@@ -79,19 +77,6 @@ public class Swagger2Config implements WebMvcConfigurer {
|
||||
SecurityScheme securityScheme() {
|
||||
return new ApiKey(CommonConstant.X_ACCESS_TOKEN, CommonConstant.X_ACCESS_TOKEN, "header");
|
||||
}
|
||||
/**
|
||||
* JWT token
|
||||
* @return
|
||||
* @deprecated 未调用
|
||||
*/
|
||||
@Deprecated
|
||||
private List<Parameter> setHeaderToken() {
|
||||
ParameterBuilder tokenPar = new ParameterBuilder();
|
||||
List<Parameter> pars = new ArrayList<>();
|
||||
tokenPar.name(CommonConstant.X_ACCESS_TOKEN).description("token").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
|
||||
pars.add(tokenPar.build());
|
||||
return pars;
|
||||
}
|
||||
|
||||
/**
|
||||
* api文档的详细信息函数,注意这里的注解引用的是哪个
|
||||
@@ -104,11 +89,8 @@ public class Swagger2Config implements WebMvcConfigurer {
|
||||
.title("jero-boot 后台服务API接口文档")
|
||||
// 版本号
|
||||
.version("1.0")
|
||||
// .termsOfServiceUrl("NO terms of service")
|
||||
// 描述
|
||||
.description("后台API接口")
|
||||
// 作者
|
||||
.contact("JERO团队")
|
||||
.license("The Apache License, Version 2.0")
|
||||
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
|
||||
.build();
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class WebConfig {
|
||||
@Bean
|
||||
public FilterRegistrationBean<CorsFilter> corsFilter() {
|
||||
FilterRegistrationBean<CorsFilter> registration = new FilterRegistrationBean<>();
|
||||
registration.setFilter(new CorsFilter(originIp,notFilter));
|
||||
registration.setFilter(new CorsFilter(originIp, notFilter));
|
||||
registration.addUrlPatterns("/*");
|
||||
registration.setName("corsFilter");
|
||||
registration.setOrder(2);
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public class CorsFilter implements Filter {
|
||||
HttpServletRequest req = (HttpServletRequest) request;
|
||||
|
||||
final String origin = ((HttpServletRequest) request).getHeader("Origin");
|
||||
//请求头与系统的origin不通则咔嚓
|
||||
//请求头与系统的origin不同则咔嚓
|
||||
String[] split = originIp.split(",");
|
||||
if (Objects.nonNull(origin) && !ArrayUtils.contains(split,origin)){
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user