工作空间 v3.7.4.6版本的 MD5 值为:94c1c0052e9f2e949ae1349e6caf437b
以下内容为反编译后的 RequestManager.java 源代码,内容仅作参考
package com.uusafe.data.module.reqmanage;
import android.content.Context;
import com.uusafe.base.modulesdk.module.bean.ClientSetInfo;
import com.uusafe.base.modulesdk.module.bean.ClientUpgradeDetailBean;
import com.uusafe.base.modulesdk.module.bean.GetLicenseAgreementRspBean;
import com.uusafe.base.modulesdk.module.bean.SecParamBean;
import com.uusafe.base.modulesdk.module.bean.VSAClientUpgradeParamBean;
import com.uusafe.base.modulesdk.module.global.CommGlobal;
import com.uusafe.base.modulesdk.module.global.MosConstants;
import com.uusafe.base.modulesdk.module.netapi.BaseApis;
import com.uusafe.commbase.bean.DownloadInfo;
import com.uusafe.commbase.bean.UserAttr;
import com.uusafe.commbase.global.BaseGlobal;
import com.uusafe.data.module.api.delegate.ssoauth.GetTokenRspBean;
import com.uusafe.data.module.bean.AppShareAuditBean;
import com.uusafe.data.module.presenter.app.message.bean.CheckAppMessageBean;
import com.uusafe.data.module.presenter.app.message.bean.GetAppMessageConfigsBean;
import com.uusafe.data.module.presenter.app.message.bean.GetAppMessageListBean;
import com.uusafe.data.module.presenter.app.message.bean.GetNoticeListBean;
import com.uusafe.data.module.presenter.app.message.bean.GetSecretaryDisturbFlagBean;
import com.uusafe.data.module.presenter.app.message.bean.GetSecretaryMessagesBean;
import com.uusafe.data.module.presenter.app.message.bean.SystemMessageDetailBean;
import com.uusafe.data.module.presenter.appstore.bean.AppChangesBean;
import com.uusafe.data.module.presenter.appstore.bean.AppChangesV2Bean;
import com.uusafe.data.module.presenter.appstore.bean.AppDetailBean;
import com.uusafe.data.module.presenter.appstore.bean.AppListBean;
import com.uusafe.data.module.presenter.appstore.bean.AppVersionInfo;
import com.uusafe.data.module.presenter.appstore.bean.CategoryListBean;
import com.uusafe.data.module.presenter.appstore.bean.GetAppPolicyBean;
import com.uusafe.data.module.presenter.appstore.bean.InnerAppConfigBean;
import com.uusafe.data.module.presenter.appstore.bean.InstalledAppInfo;
import com.uusafe.data.module.presenter.binddevice.bean.UnbindDeviceReqBean;
import com.uusafe.data.module.presenter.contact.bean.GetContactListBean;
import com.uusafe.data.module.presenter.contact.bean.GetMemberInfoBean;
import com.uusafe.data.module.presenter.contact.bean.SearchDepartmentBean;
import com.uusafe.data.module.presenter.contact.bean.SearchMemberBean;
import com.uusafe.data.module.presenter.feedback.bean.GetFeedBackRspBean;
import com.uusafe.data.module.presenter.feedback.bean.SaveFeedBackReqBean;
import com.uusafe.data.module.presenter.file.FileDetailBean;
import com.uusafe.data.module.presenter.file.FileListInfoBean;
import com.uusafe.data.module.presenter.leftscreen.bean.DeviceBean;
import com.uusafe.data.module.presenter.log.GetLogPolicyBean;
import com.uusafe.data.module.presenter.userinfo.UserInfoBean;
import com.uusafe.data.module.receiver.UpdateLocaleReceiver;
import com.uusafe.download.manager.DownloadManagerTools;
import com.uusafe.emm.policy.PolicyProtocol;
import com.uusafe.mcm.provider.McmProvider;
import com.uusafe.net.cache.CacheMode;
import com.uusafe.net.model.HttpHeaders;
import com.uusafe.net.reqmanager.BaseRequestConstant;
import com.uusafe.net.reqmanager.bean.RequestParams;
import com.uusafe.utils.common.Base64Utils;
import com.uusafe.utils.common.DeviceUtils;
import com.uusafe.utils.common.FileUtils;
import com.uusafe.utils.common.JsonUtil;
import com.uusafe.utils.common.MD5Util;
import com.uusafe.utils.common.PreferenceUtils;
import com.uusafe.utils.common.StringUtils;
import com.uusafe.utils.common.UUSafeMbsUtil;
import com.uusafe.utils.common.ZZLog;
import com.xiaomi.mipush.sdk.Constants;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONObject;
public class RequestManager {
private static final String TAG = "RequestManager";
public static RequestParams applyCertificateReqParams(String str, Class<?> cls) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "certificateId", str);
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_CERT_APPLYCERTIFICATE);
requestParams.setInfoClass(cls);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams checkAppMessageParams(long j, String str, String str2, String str3, int i) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "appMessageId", String.valueOf(j));
JsonUtil.putString(string2JsonObject, "pkgName", str);
JsonUtil.putString(string2JsonObject, "versionCode", str2);
JsonUtil.putString(string2JsonObject, "engineVersion", str3);
JsonUtil.putInt(string2JsonObject, "platform", i);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.CHECK_APP_MESSAGE);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(CheckAppMessageBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams checkMessagesParams(long j, String str) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putLong(string2JsonObject, "timestamp", j);
JsonUtil.putString(string2JsonObject, "pkgName", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.CHECK_MESSAGES);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getAccessTokenParams(String str, String str2, String str3) {
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, UUSafeMbsUtil.AUTHHEADER_ORGCODE, clientSetInfo.getCompanyCode());
JsonUtil.putString(string2JsonObject, "pkgName", str);
JsonUtil.putString(string2JsonObject, "sign", MD5Util.getMD5(str2 + clientSetInfo.getCompanyCode() + str + 1 + str3));
JsonUtil.putString(string2JsonObject, "appkey", str2);
JsonUtil.putInt(string2JsonObject, "platform", 1);
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_GETACCESSTOKEN);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(GetTokenRspBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getApaReportParams(String str) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "fileId", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SECURITY_APA_REPORT);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getAppChangeParams(List<InstalledAppInfo> list) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray string2JsonArray = JsonUtil.string2JsonArray("");
if (list != null && list.size() > 0) {
for (InstalledAppInfo installedAppInfo : list) {
string2JsonArray.put(installedAppInfo.toJSONObject());
}
}
JsonUtil.putObject(string2JsonObject, "installedAppInfo", string2JsonArray);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_APPCHANGES_V2);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setInfoClass(AppChangesBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getAppChangeV2Params(List<InstalledAppInfo> list, String str) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray string2JsonArray = JsonUtil.string2JsonArray("");
if (list != null && list.size() > 0) {
for (InstalledAppInfo installedAppInfo : list) {
string2JsonArray.put(installedAppInfo.toJSONObject());
}
}
JsonUtil.putObject(string2JsonObject, "installedAppInfo", string2JsonArray);
if (StringUtils.areNotEmpty(str)) {
JsonUtil.putString(string2JsonObject, "distributionMode", str);
}
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ZZLog.i(TAG, "getAppChangeV2Params bodyContent=" + string2JsonObject.toString(), new Object[0]);
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_APPCHANGES_V2);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setInfoClass(AppChangesV2Bean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getAppDetailParams(String str, int i) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "pkgName", str);
JsonUtil.putInt(string2JsonObject, "platform", i);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_APPDETAIL);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setInfoClass(AppDetailBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getAppListParams(int i, int i2, List<InstalledAppInfo> list, MosConstants.AppListType appListType, String str, String str2) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray string2JsonArray = JsonUtil.string2JsonArray("");
if (list != null && list.size() > 0) {
for (InstalledAppInfo installedAppInfo : list) {
string2JsonArray.put(installedAppInfo.toJSONObject());
}
}
JsonUtil.putInt(string2JsonObject, UpdateLocaleReceiver.EXTRA_INDEX, i);
JsonUtil.putInt(string2JsonObject, PolicyProtocol.WATER_MARK_SIZE, i2);
JsonUtil.putObject(string2JsonObject, "installedAppInfo", string2JsonArray);
JsonUtil.putInt(string2JsonObject, "type", appListType.getType());
if (StringUtils.areNotEmpty(str)) {
JsonUtil.putString(string2JsonObject, "keyword", str);
}
if (StringUtils.areNotEmpty(str2)) {
JsonUtil.putString(string2JsonObject, "distributionMode", str2);
}
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_LIST);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setInfoClass(AppListBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getAppLogReportParams(String str) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "fileId", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SECURITY_APP_LOG_REPORT);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getAppMessageConfigParams(String str, int i) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "pkgName", str);
JsonUtil.putInt(string2JsonObject, "platform", i);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.GET_APP_MESSAGE_CONFIG);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(GetAppMessageConfigsBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getAppMessageParams(long j) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putLong(string2JsonObject, "timestamp", j);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.GET_APP_MESSAGES);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(GetAppMessageListBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getAppPolicyParams(List<AppVersionInfo> list, String str, boolean z) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray string2JsonArray = JsonUtil.string2JsonArray("");
if (list != null && list.size() > 0) {
for (AppVersionInfo appVersionInfo : list) {
string2JsonArray.put(appVersionInfo.toJSONObject());
}
JsonUtil.putObject(string2JsonObject, "appVersionInfos", string2JsonArray);
}
if (StringUtils.areNotEmpty(str)) {
JsonUtil.putString(string2JsonObject, "pkgClient", str);
}
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_GETAPPPOLICY);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(GetAppPolicyBean.class);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getAppShareLogReportParams(AppShareAuditBean appShareAuditBean) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject(JsonUtil.toJson(appShareAuditBean));
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SECURITY_APP_SHARE_LOG_REPORT);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getCancelScanLoginReqParams(String str, Class<?> cls) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "Code", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_QRCODE_CANCELSCANLOGIN);
requestParams.setInfoClass(cls);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setBodyContent(string2JsonObject);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getCategoryAppListParams(int i, int i2, List<InstalledAppInfo> list, String str, String str2) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray string2JsonArray = JsonUtil.string2JsonArray("");
if (list != null && list.size() > 0) {
for (InstalledAppInfo installedAppInfo : list) {
string2JsonArray.put(installedAppInfo.toJSONObject());
}
}
JsonUtil.putInt(string2JsonObject, UpdateLocaleReceiver.EXTRA_INDEX, i);
JsonUtil.putInt(string2JsonObject, PolicyProtocol.WATER_MARK_SIZE, i2);
JsonUtil.putObject(string2JsonObject, "installedAppInfo", string2JsonArray);
JsonUtil.putString(string2JsonObject, "categoryId", str);
if (StringUtils.areNotEmpty(str2)) {
JsonUtil.putString(string2JsonObject, "distributionMode", str2);
}
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_CATEGORYAPP);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setInfoClass(AppListBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getCategoryListParams() {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_CATEGORYLIST);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setInfoClass(CategoryListBean.class);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.GET);
return requestParams;
}
public static RequestParams getCertReqParams(Class<?> cls) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_CERT_GETCERTIFICATELIST);
requestParams.setInfoClass(cls);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.GET);
return requestParams;
}
public static RequestParams getCheckNoticeParams(List<String> list) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray string2JsonArray = JsonUtil.string2JsonArray("");
if (list != null && list.size() > 0) {
for (String str : list) {
string2JsonArray.put(str);
}
}
JsonUtil.putObject(string2JsonObject, "noticeIds", string2JsonArray);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.CHECK_NOTICE);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getClientUpgradeParams() {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "pkgName", CommGlobal.getClientID());
JsonUtil.putInt(string2JsonObject, "clientVersion", 2061490498);
JsonUtil.putString(string2JsonObject, "clientVersionName", "3.7.4.6");
JsonUtil.putString(string2JsonObject, "sandboxVersion", BaseGlobal.getInstance().getSandboxVersion());
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_CLIENTUPGRADE);
requestParams.setInfoClass(ClientUpgradeDetailBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getContactListParams(String str) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "departmentId", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.CONTACT_LIST);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(GetContactListBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getDeviceListParams() {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_DEVICELIST);
requestParams.setInfoClass(DeviceBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.GET);
return requestParams;
}
public static RequestParams getDownloadReport(String str) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray jSONArray = new JSONArray();
jSONArray.put(str);
JsonUtil.putJsonArray(string2JsonObject, "fileIds", jSONArray);
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + "/uusafe/mos/client/rest/content/v1/downloadReport");
requestParams.setInfoClass(FileListInfoBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getEditUserAttrParams(List<UserAttr> list) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray string2JsonArray = JsonUtil.string2JsonArray("");
if (list != null && list.size() > 0) {
for (UserAttr userAttr : list) {
JSONObject jSONObject = new JSONObject();
JsonUtil.putString(jSONObject, "attrCode", userAttr.getAttrCode());
JsonUtil.putString(jSONObject, "attrValue", userAttr.getAttrValue());
string2JsonArray.put(jSONObject);
}
}
JsonUtil.putObject(string2JsonObject, "userAttr", string2JsonArray);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_EDIT_USER_ATTR);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getEmmLogoutErase() {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BUSINESS_EMM_LOGOUT);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getFeedBackParams() {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_GETFEEDBACK);
requestParams.setInfoClass(GetFeedBackRspBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.GET);
return requestParams;
}
public static RequestParams getFileBlockUploadCompleteParams(String str, String str2, File file, int i) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "fileCode", str);
JsonUtil.putInt(string2JsonObject, "isAbort", 1);
JsonUtil.putString(string2JsonObject, "fileMd5", str2);
JsonUtil.putString(string2JsonObject, "fileName", file.getName());
JsonUtil.putLong(string2JsonObject, McmProvider.DataContract.FILE_SIZE, file.length());
JsonUtil.putInt(string2JsonObject, "blockSize", i);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_UPLOADBLOCKFILEOK);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setBodyContent(string2JsonObject);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getFileBlockUploadParams(String str, int i, String str2, byte[] bArr) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "fileCode", str);
JsonUtil.putInt(string2JsonObject, "blockId", i);
JsonUtil.putString(string2JsonObject, "blockMd5", str2);
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.put("TransferParam", Base64Utils.encode(string2JsonObject.toString().getBytes()));
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_UPLOADBLOCKFILE);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setBodyContent(bArr);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getFileChangesParams() {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray jSONArray = new JSONArray();
List<DownloadInfo> all = DownloadManagerTools.getInstance().getAll();
if (all != null) {
for (DownloadInfo downloadInfo : all) {
String extraString1 = downloadInfo.getExtraString1();
int fraction = (int) (downloadInfo.getFraction() * 100.0f);
if (StringUtils.areNotEmpty(extraString1) && fraction == 100 && StringUtils.areNotEmpty(downloadInfo.getFileId())) {
jSONArray.put(downloadInfo.getFileId());
}
}
}
JsonUtil.putJsonArray(string2JsonObject, "downloadedFileIds", jSONArray);
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + "/uusafe/mos/client/rest/content/v1/fileChanges");
requestParams.setInfoClass(FileListInfoBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getFileDetailParams(String str) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "fileId", str);
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + "/uusafe/mos/client/rest/content/v1/getFileDetail");
requestParams.setInfoClass(FileDetailBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getFileListParams(String str) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "folderId", str);
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + "/uusafe/mos/client/rest/content/v1/getFileList");
requestParams.setInfoClass(FileListInfoBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getFileUploadParams(String str, File file) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "fileMd5", str);
JsonUtil.putString(string2JsonObject, "fileName", file.getName());
JsonUtil.putLong(string2JsonObject, McmProvider.DataContract.FILE_SIZE, file.length());
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.put("TransferParam", Base64Utils.encode(string2JsonObject.toString().getBytes()));
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_UPLOADFILE);
requestParams.setCacheMode(CacheMode.NO_CACHE);
try {
requestParams.setBodyContent(FileUtils.getBytes(new FileInputStream(file)));
} catch (FileNotFoundException e2) {
ZZLog.d(RequestManager.class.getSimpleName(), e2.getMessage(), new Object[0]);
}
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getInnerAppConfigParams(String[] strArr) {
ClientSetInfo clientSetInfo;
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray string2JsonArray = JsonUtil.string2JsonArray("");
if (strArr != null && strArr.length > 0) {
for (String str : strArr) {
string2JsonArray.put(str);
}
}
JsonUtil.putObject(string2JsonObject, "configTypes", string2JsonArray);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
httpHeaders.put("Authorization", BaseApis.getAuthHeader(CommGlobal.getClientSetInfo(context)));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_INNERAPPCONFIG);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setInfoClass(InnerAppConfigBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getLicenseAgreementParams(String str) {
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, UUSafeMbsUtil.AUTHHEADER_ORGCODE, clientSetInfo.getCompanyCode());
JsonUtil.putString(string2JsonObject, "timestamp", str);
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_GETLICENSEAGREEMENT);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(GetLicenseAgreementRspBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getLogoutParams(boolean z) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_LOGOUT);
ZZLog.i(TAG, "getLogoutParams====", new Object[0]);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(z);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.GET);
return requestParams;
}
public static RequestParams getMdmLogoutParams(boolean z) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_MDMLOGOUT);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(z);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.GET);
return requestParams;
}
public static RequestParams getMemberInfoParams(String str) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "loginName", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.GET_MEMBER_INFO);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(GetMemberInfoBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getModifyPasswordParams(String str, String str2) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "oldPwd", str);
JsonUtil.putString(string2JsonObject, "newPwd", str2);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_MODIFYPASSWORD);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getNJZQScanParams(String str, String str2, String str3, String str4) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "accessToken", str);
JsonUtil.putString(string2JsonObject, "loginId", str2);
JsonUtil.putString(string2JsonObject, "qrcodeId", str3);
JsonUtil.putString(string2JsonObject, "qrcodeType", str4);
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
String baseUrl = clientSetInfo.getBaseUrl();
requestParams.setUrl(baseUrl + "/uusafe/mos/custom/rest/njzq/v1/qrcodeAuth");
requestParams.setInfoClass(FileListInfoBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getNoticeListParams(long j) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putLong(string2JsonObject, "timestamp", j);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.NOTICE_LIST);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setInfoClass(GetNoticeListBean.class);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getPolicyParams(long j, long j2) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putLong(string2JsonObject, "timestamp", j);
if (j2 > 0) {
JsonUtil.putLong(string2JsonObject, "policyId", j2);
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.GETPOLICY);
requestParams.setInfoClass(GetLogPolicyBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getReportAppInstalledParams(List<InstalledAppInfo> list) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JSONArray string2JsonArray = JsonUtil.string2JsonArray("");
if (list != null && list.size() > 0) {
for (InstalledAppInfo installedAppInfo : list) {
string2JsonArray.put(installedAppInfo.toJSONObject());
}
}
JsonUtil.putObject(string2JsonObject, "installedAppInfo", string2JsonArray);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_REPORTAPPINSTALLED);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setBodyContent(string2JsonObject);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getReportInstalledParams(InstalledAppInfo installedAppInfo, int i) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putObject(string2JsonObject, "installedAppInfo", installedAppInfo.toJSONObject());
JsonUtil.putInt(string2JsonObject, "isMdm", i);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.APP_REPORTINSTALLED);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setBodyContent(string2JsonObject);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getSaveFeedBackParams(SaveFeedBackReqBean saveFeedBackReqBean) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "problem", saveFeedBackReqBean.getProblem());
JsonUtil.putString(string2JsonObject, "comment", saveFeedBackReqBean.getComment());
JsonUtil.putLong(string2JsonObject, "timestamp", saveFeedBackReqBean.getTimestamp());
if (StringUtils.areNotEmpty(saveFeedBackReqBean.getLogFileId())) {
JsonUtil.putString(string2JsonObject, "logFileId", saveFeedBackReqBean.getLogFileId());
}
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_SAVEFEEDBACK);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getSavePhotoParams(String str) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "fileId", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_SAVEPHOTO);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getScanDeviceReportParams(String str, String str2, String str3, String str4, String str5, String str6, Context context) {
ZZLog.f("RequestParams", "start getScanDeviceReportParams", new Object[0]);
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "timestamp", str2);
JsonUtil.putString(string2JsonObject, "scannerRegisterIp", str3);
JsonUtil.putString(string2JsonObject, "scannerDeviceNum", str4);
JsonUtil.putString(string2JsonObject, "scannerType", str5);
JsonUtil.putString(string2JsonObject, "deviceMac", str6);
HttpHeaders httpHeaders = new HttpHeaders();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", str);
RequestParams requestParams = new RequestParams(httpHeaders);
ZZLog.f("RequestParams", "BASE_URL" + BaseApis.getBaseUrl(), new Object[0]);
ZZLog.f("RequestParams", "token=" + PreferenceUtils.getToken(context, CommGlobal.getMosKey()), new Object[0]);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BUSINESS_SCANDEVICEREPORT);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getScanQrCodeReqParams(String str, Class<?> cls) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "qrCode", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_QRCODE_SCANORCODE);
requestParams.setInfoClass(cls);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setBodyContent(string2JsonObject);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getSearchDepartmentParams(int i, int i2, String str) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putInt(string2JsonObject, UpdateLocaleReceiver.EXTRA_INDEX, i);
JsonUtil.putInt(string2JsonObject, PolicyProtocol.WATER_MARK_SIZE, i2);
JsonUtil.putString(string2JsonObject, "keyword", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SEARCH_DEPARTMENT);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(SearchDepartmentBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getSearchFileListParams(String str) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "keyword", str);
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + "/uusafe/mos/client/rest/content/v1/searchFile");
requestParams.setInfoClass(FileListInfoBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getSearchMemberParams(int i, int i2, String str) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putInt(string2JsonObject, UpdateLocaleReceiver.EXTRA_INDEX, i);
JsonUtil.putInt(string2JsonObject, PolicyProtocol.WATER_MARK_SIZE, i2);
JsonUtil.putString(string2JsonObject, "keyword", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SEARCH_MEMBER);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(SearchMemberBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getSecParams() {
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(CommGlobal.getContext());
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.GET_SECPARAM);
requestParams.setInfoClass(SecParamBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.GET);
return requestParams;
}
public static RequestParams getSecretaryDisturbFlagParams() {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SECRETARY_GET_DISTURB_FLAG);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(GetSecretaryDisturbFlagBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getSecretaryMessagesParams(long j) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "timestamp", j + "");
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SECRETARY_MESSAGE_LIST);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(GetSecretaryMessagesBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getSubmitScanLoginReqParams(String str, Class<?> cls) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "Code", str);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_QRCODE_SUBMITSCANLOGIN);
requestParams.setInfoClass(cls);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setBodyContent(string2JsonObject);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getSystemNotice(long j) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "method", "msgDetail");
JsonUtil.putLong(string2JsonObject, "msgId", j);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SYSTEM_NOTICE_LIST);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setInfoClass(SystemMessageDetailBean.class);
requestParams.setShowProgress(true);
requestParams.setAesEncrypt(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getUnbindDeviceParams(UnbindDeviceReqBean unbindDeviceReqBean) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, UUSafeMbsUtil.AUTHHEADER_SECURITYID, unbindDeviceReqBean.getSecurityId());
JsonUtil.putString(string2JsonObject, "password", unbindDeviceReqBean.getPassword());
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_UNBINDDEVICE);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getUploadPortraitParams(String str) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_UPLOADPORTRAIT);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setBodyContent(string2JsonObject);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.UPLOAD);
return requestParams;
}
public static RequestParams getUploadScreenshotParams(String str, long j, String str2, String str3) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "fileId", str);
JsonUtil.putString(string2JsonObject, "deviceName", DeviceUtils.getDeviceModel());
JsonUtil.putString(string2JsonObject, "operateType", str3);
JsonUtil.putLong(string2JsonObject, "operateTime", j);
JsonUtil.putString(string2JsonObject, "appName", str2);
JsonUtil.putInt(string2JsonObject, "operateResult", 0);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SECURITY_UPLOAD_SCREENSHOT);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getUploadViolationParams(JSONObject jSONObject, boolean z) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SECURITY_UPLOAD_VIOLATION);
requestParams.setBodyContent(jSONObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(z);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getUploadVirusParams(JSONObject jSONObject) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SECURITY_UPLOAD_VIRUS);
requestParams.setBodyContent(jSONObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getUserInfoParams() {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_USERINFO);
requestParams.setInfoClass(UserInfoBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.GET);
return requestParams;
}
public static RequestParams getVsaClientUpgrade(String str, String str2, String str3) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "shellVersionName", str);
JsonUtil.putString(string2JsonObject, "libVersionName", str2);
JsonUtil.putString(string2JsonObject, "pluginsVersionName", str3);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.BASE_VSACLIENTUPGRADE);
requestParams.setInfoClass(VSAClientUpgradeParamBean.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setBodyContent(string2JsonObject);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getXJDXScanParams(String str, String str2) {
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "pcToken", str);
JsonUtil.putString(string2JsonObject, "thirdToken", str2);
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
String baseUrl = clientSetInfo.getBaseUrl();
requestParams.setUrl((baseUrl.substring(0, baseUrl.lastIndexOf(Constants.COLON_SEPARATOR) + 1) + 26001) + "/uusafe/mos/client/rest/content/v1/qrCheck");
requestParams.setInfoClass(FileListInfoBean.class);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams getuploadLogParams(int i, long j, long j2) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putLong(string2JsonObject, "policyId", j);
JsonUtil.putLong(string2JsonObject, "logFileId", j2);
JsonUtil.putInt(string2JsonObject, "uploadType", i);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.UPLOADLOG);
requestParams.setBodyContent(string2JsonObject);
requestParams.setInfoClass(Object.class);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(false);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams setAppMessageConfigParams(String str, int i, int i2) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putString(string2JsonObject, "pkgName", str);
JsonUtil.putInt(string2JsonObject, "platform", i);
JsonUtil.putInt(string2JsonObject, "disturbFlag", i2);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SET_APP_MESSAGE_CONFIG);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
public static RequestParams setSecretaryDisturbFlagParams(int i) {
JSONObject string2JsonObject = JsonUtil.string2JsonObject("");
JsonUtil.putInt(string2JsonObject, "disturbFlag", i);
HttpHeaders httpHeaders = new HttpHeaders();
Context context = BaseApis.getContext();
if (context == null) {
context = CommGlobal.getContext();
}
ClientSetInfo clientSetInfo = CommGlobal.getClientSetInfo(context);
httpHeaders.put("Authorization", BaseApis.getAuthHeader(clientSetInfo));
RequestParams requestParams = new RequestParams(httpHeaders);
requestParams.setUrl(clientSetInfo.getBaseUrl() + BaseApis.SECRETARY_SET_DISTURB_FLAG);
requestParams.setBodyContent(string2JsonObject);
requestParams.setCacheMode(CacheMode.NO_CACHE);
requestParams.setShowProgress(true);
requestParams.setHttpMethod(BaseRequestConstant.HttpRequestMethod.POST);
return requestParams;
}
}