正在查看: 夜猫麻将 v24.1.1 应用的 GetBilIdlRequest.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 夜猫麻将 v24.1.1 应用的 GetBilIdlRequest.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package org.xianliao.im.sdk.net.model;
import android.text.TextUtils;
import android.util.Log;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
import org.xianliao.im.sdk.net.GetReq;
import org.xianliao.im.sdk.net.NetBaseResp;
class GetBilIdlRequest {
GetBilIdlRequest() {
}
public static class Req extends GetReq {
private NetBaseResp resp;
private String userId;
private String url = "http://120.24.210.161:52234/gateway/red/dispatcher";
private Map<String, String> argsMap = new HashMap();
private int cmdId = 805441569;
public Req(NetBaseResp resp) {
this.resp = resp;
}
public void setUerOpenId(String userId) {
this.userId = userId;
}
@Override
public URL getUrl() {
try {
String query = handleRequestArgs();
String urlString = this.url;
if (!TextUtils.isEmpty(query)) {
urlString = urlString + "?" + query;
}
return new URL(urlString);
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}
@Override
public NetBaseResp getResp() {
return this.resp;
}
@Override
public Map<String, String> getRequestArgs() {
this.argsMap.put("cmdId", this.cmdId + "");
if (!TextUtils.isEmpty(this.userId)) {
String json = "{\"uin\" : \"" + this.userId + "\"}";
this.argsMap.put("request", json);
}
return this.argsMap;
}
}
public static class Resp extends NetBaseResp {
static final String TAG = "GetBilIdlRequest.Resp";
public long billId;
public long constructor;
@Override
public void response(String result) {
Log.i(TAG, "result: " + result);
try {
JSONObject object = new JSONObject(result);
this.billId = object.getLong("billId");
this.constructor = object.getLong("constructor");
} catch (JSONException e) {
e.printStackTrace();
}
}
}
}