Commit 4f85c097 authored by xiaoye's avatar xiaoye

检查卡组id

parent 967c2356
...@@ -135,6 +135,7 @@ public class DeckSquareApiUtil { ...@@ -135,6 +135,7 @@ public class DeckSquareApiUtil {
String responseBodyString = response.body().string(); String responseBodyString = response.body().string();
Gson gson = new Gson(); Gson gson = new Gson();
result = gson.fromJson(responseBodyString, MyDeckResponse.class); result = gson.fromJson(responseBodyString, MyDeckResponse.class);
result.chkId();
if (result.code == 20) {//用户身份验证失败 if (result.code == 20) {//用户身份验证失败
......
...@@ -44,5 +44,19 @@ public class MyDeckResponse { ...@@ -44,5 +44,19 @@ public class MyDeckResponse {
this.data = data; this.data = data;
} }
public void chkId() {
for (MyOnlineDeckDetail item : this.data) {
String ydk = item.getDeckYdk();
String contains;
contains = "##" + item.getDeckId();
if (!ydk.contains(contains))
ydk += "\n" + contains;
contains = "###" + item.getUserId();
if (!ydk.contains(contains))
ydk += "\n" + contains;
item.setDeckYdk(ydk);
}
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment