收银后台跟进1.9
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package me.zhengjie.exception;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import static org.springframework.http.HttpStatus.BAD_REQUEST;
|
||||
import static org.springframework.http.HttpStatus.OK;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Getter
|
||||
public class NewBadRequestException extends RuntimeException{
|
||||
private Integer status = OK.value();
|
||||
|
||||
public NewBadRequestException(String msg){
|
||||
super(msg);
|
||||
}
|
||||
|
||||
public NewBadRequestException(HttpStatus status, String msg){
|
||||
super(msg);
|
||||
this.status = status.value();
|
||||
}
|
||||
}
|
||||
16
eladmin-common/src/main/java/me/zhengjie/utils/Threads.java
Normal file
16
eladmin-common/src/main/java/me/zhengjie/utils/Threads.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package me.zhengjie.utils;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* 线程相关
|
||||
*/
|
||||
public class Threads {
|
||||
/**
|
||||
* 并行执行
|
||||
* @param cfs
|
||||
*/
|
||||
public static void call(CompletableFuture<?>... cfs){
|
||||
CompletableFuture.allOf(cfs);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user