|
@@ -2,6 +2,7 @@ package com.rongwei.bsentity.dto;
|
|
|
|
|
|
import lombok.Data;
|
|
|
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
@@ -14,19 +15,19 @@ import java.util.Map;
|
|
|
public class ApiReturnDto {
|
|
|
|
|
|
private StandardReturn STANDARD_RETURN;
|
|
|
- private BusinessReturn BUSINESS_RETURN;
|
|
|
+ private List<BusinessReturn> BUSINESS_RETURN;
|
|
|
private boolean successful = false;
|
|
|
|
|
|
- public String getToken() {
|
|
|
- return this.getBUSINESS_RETURN().getDATA().getOrDefault("TOKEN", "");
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 获取接口请求成功返回的数据
|
|
|
* @return
|
|
|
*/
|
|
|
public Map<String, String> getApiReturnData() {
|
|
|
- return this.getBUSINESS_RETURN() == null ? null : this.getBUSINESS_RETURN().getDATA();
|
|
|
+ if(this.getBUSINESS_RETURN() == null|| this.getBUSINESS_RETURN().isEmpty()){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return this.getBUSINESS_RETURN().get(0).getDATA();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -51,7 +52,10 @@ public class ApiReturnDto {
|
|
|
* @return
|
|
|
*/
|
|
|
public int getSuccessCode() {
|
|
|
- return this.getBUSINESS_RETURN() == null ? 0 : this.getBUSINESS_RETURN().getCODE();
|
|
|
+ if(this.getBUSINESS_RETURN() == null|| this.getBUSINESS_RETURN().isEmpty()){
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ return this.getBUSINESS_RETURN().get(0).getCODE();
|
|
|
}
|
|
|
|
|
|
/**
|