BUGFIX: format;
This commit is contained in:
@@ -20,25 +20,26 @@ public class FileProperties {
|
||||
|
||||
private String linuxDomain;
|
||||
|
||||
public ElPath getSys(){
|
||||
public ElPath getSys() {
|
||||
String os = System.getProperty("os.name");
|
||||
if(os.toLowerCase().startsWith("win")) {
|
||||
if (os.toLowerCase().startsWith("win")) {
|
||||
return windows;
|
||||
} else if(os.toLowerCase().startsWith("mac")){
|
||||
} else if (os.toLowerCase().startsWith("mac")) {
|
||||
return mac;
|
||||
}
|
||||
return linux;
|
||||
}
|
||||
public String getLinuxDomain(){
|
||||
|
||||
public String getLinuxDomain() {
|
||||
String os = System.getProperty("os.name");
|
||||
if((!os.toLowerCase().startsWith("win") )&& (!os.toLowerCase().startsWith("mac"))) {
|
||||
if ((!os.toLowerCase().startsWith("win")) && (!os.toLowerCase().startsWith("mac"))) {
|
||||
return linuxDomain;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ElPath{
|
||||
public static class ElPath {
|
||||
private String path;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,10 +18,11 @@ public class MinIoClientConfig {
|
||||
|
||||
/**
|
||||
* 注入minio 客户端
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public MinioClient minioClient(){
|
||||
public MinioClient minioClient() {
|
||||
|
||||
return MinioClient.builder()
|
||||
.endpoint(endpoint)
|
||||
|
||||
@@ -14,7 +14,7 @@ public class BusinessException extends RuntimeException {
|
||||
private Integer code;
|
||||
private String msg;
|
||||
|
||||
public BusinessException(ResultEnum resultEnum){
|
||||
public BusinessException(ResultEnum resultEnum) {
|
||||
super(resultEnum.getMsg());
|
||||
this.code = resultEnum.getCode();
|
||||
this.msg = resultEnum.getMsg();
|
||||
|
||||
@@ -51,11 +51,12 @@ public class ExceptionCatch {
|
||||
return Response.error(resultEnum.getCode(), resultEnum.getMsg());
|
||||
}
|
||||
}
|
||||
return Response.error(ResultEnum.ERROR.getCode(), e.getMessage()==null?ResultEnum.ERROR.getMsg():e.getMessage());
|
||||
return Response.error(ResultEnum.ERROR.getCode(), e.getMessage() == null ? ResultEnum.ERROR.getMsg() : e.getMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理参数校验异常
|
||||
*
|
||||
* @param e
|
||||
* @return ResponseData
|
||||
*/
|
||||
@@ -68,6 +69,7 @@ public class ExceptionCatch {
|
||||
|
||||
/**
|
||||
* 处理参数校验异常
|
||||
*
|
||||
* @param e
|
||||
* @return ResponseData
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.function.Function;
|
||||
**/
|
||||
@Data
|
||||
@Slf4j
|
||||
public abstract class QueryCriteria<T,E> {
|
||||
public abstract class QueryCriteria<T, E> {
|
||||
|
||||
private long page = 1;
|
||||
private long limit = 10;
|
||||
@@ -36,12 +36,12 @@ public abstract class QueryCriteria<T,E> {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
public QueryWrapper<T> buildWrapper(){
|
||||
public QueryWrapper<T> buildWrapper() {
|
||||
QueryWrapper<T> wrapper = new QueryWrapper<>();
|
||||
Field[] fields = this.getClass().getDeclaredFields();
|
||||
for (Field field : fields) {
|
||||
Condition condition = field.getAnnotation(Condition.class);
|
||||
if(condition != null){
|
||||
if (condition != null) {
|
||||
field.setAccessible(true);
|
||||
Object value = null;
|
||||
try {
|
||||
@@ -49,27 +49,27 @@ public abstract class QueryCriteria<T,E> {
|
||||
} catch (IllegalAccessException e) {
|
||||
log.warn("reflection anomaly!");
|
||||
}
|
||||
if(!StrUtil.isEmptyIfStr(value)){
|
||||
switch (condition.type()){
|
||||
if (!StrUtil.isEmptyIfStr(value)) {
|
||||
switch (condition.type()) {
|
||||
case EQ:
|
||||
wrapper.eq(ConvertUtil.humpToLine2(field.getName()), value);
|
||||
break;
|
||||
case LIKE:
|
||||
wrapper.like(ConvertUtil.humpToLine2(field.getName()), value);
|
||||
case BETWEEN:
|
||||
if(value instanceof Collection && ((List) value).size() >= 2){
|
||||
wrapper.between(ConvertUtil.humpToLine2(field.getName()), ((List)value).get(0), ((List)value).get(1));
|
||||
if (value instanceof Collection && ((List) value).size() >= 2) {
|
||||
wrapper.between(ConvertUtil.humpToLine2(field.getName()), ((List) value).get(0), ((List) value).get(1));
|
||||
}
|
||||
default:
|
||||
}
|
||||
}else if(condition.isNull()){
|
||||
} else if (condition.isNull()) {
|
||||
wrapper.isNull(ConvertUtil.humpToLine2(field.getName()));
|
||||
}
|
||||
}
|
||||
Order order = field.getAnnotation(Order.class);
|
||||
if(order != null){
|
||||
if(!StrUtil.isEmptyIfStr(order.order())){
|
||||
switch (order.order()){
|
||||
if (order != null) {
|
||||
if (!StrUtil.isEmptyIfStr(order.order())) {
|
||||
switch (order.order()) {
|
||||
case DESC:
|
||||
wrapper.orderByDesc(ConvertUtil.humpToLine2(field.getName()));
|
||||
break;
|
||||
|
||||
@@ -16,9 +16,9 @@ public class AidaConfiguration {
|
||||
|
||||
@Bean(value = "IntelligentCurtainApis")
|
||||
public Docket gxyd5aThemeApis() {
|
||||
Contact contact = new Contact("Mr.Y","","136");
|
||||
Contact contact = new Contact("Mr.Y", "", "136");
|
||||
|
||||
Docket docket=new Docket(DocumentationType.SWAGGER_2)
|
||||
Docket docket = new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(new ApiInfoBuilder()
|
||||
.description("aida接口文档")
|
||||
.contact(contact)
|
||||
|
||||
Reference in New Issue
Block a user