초기소스
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.wb.domainserver.response;
|
||||
|
||||
import com.wb.domainserver.exception.WnbtException;
|
||||
import com.wb.domainserver.exception.WnbtRestException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class WnbtResponseBody {
|
||||
private String resultCode;
|
||||
private String message;
|
||||
private Object result;
|
||||
|
||||
public WnbtResponseBody(Object result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public WnbtResponseBody(WnbtException ex){
|
||||
this.resultCode = Optional.ofNullable(ex.getCode()).orElse("FAIL");
|
||||
this.message = ex.getMessage();
|
||||
}
|
||||
|
||||
public WnbtResponseBody(WnbtRestException ex){
|
||||
this.resultCode = Optional.ofNullable(ex.getCode()).orElse("FAIL");
|
||||
this.message = ex.getMessage();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user