33
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package cn.shangyu.gdxzExpert.report;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class BaseReportBean implements Serializable {
|
||||
private String app_key;// 必填,应用标识,获取token时候会返
|
||||
private String user_id;// 必填,用户id,获取token时候会返
|
||||
private String event_nickname;// 必填,事件编码
|
||||
private String create_date;// 必填,行为产生时间
|
||||
|
||||
public String getApp_key() {
|
||||
return app_key;
|
||||
}
|
||||
|
||||
public void setApp_key(String app_key) {
|
||||
this.app_key = app_key;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getEvent_nickname() {
|
||||
return event_nickname;
|
||||
}
|
||||
|
||||
public void setEvent_nickname(String event_nickname) {
|
||||
this.event_nickname = event_nickname;
|
||||
}
|
||||
|
||||
public String getCreate_date() {
|
||||
return create_date;
|
||||
}
|
||||
|
||||
public void setCreate_date(String create_date) {
|
||||
this.create_date = create_date;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
package cn.shangyu.gdxzExpert.report;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import cn.shangyu.gdxzExpert.BuildConfig;
|
||||
|
||||
public class CommUtil {
|
||||
// public static String userId="";
|
||||
// public static String token="";
|
||||
// public static void initReoprt(String uid,String tk) {
|
||||
// userId=uid;
|
||||
// token=tk;
|
||||
// }
|
||||
|
||||
public static String getCarrierName="";
|
||||
public static int totalreport=0;
|
||||
public static String isReoprtingNow="false";
|
||||
public static String isFirstRun="true";
|
||||
public static String Repotr_os ="Android";
|
||||
public static String getDeviceName() {
|
||||
String mobileName = "";
|
||||
try {
|
||||
mobileName = android.os.Build.MANUFACTURER;
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return mobileName;
|
||||
|
||||
|
||||
}
|
||||
public static String getDeviceType() {
|
||||
String mobileName = "";
|
||||
String mobileType = "";
|
||||
try {
|
||||
mobileName = android.os.Build.MANUFACTURER;
|
||||
mobileType = android.os.Build.MODEL;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return (mobileName + " " + mobileType).replaceAll("\\s*", "");
|
||||
|
||||
}
|
||||
public static String getVersionName() {
|
||||
|
||||
return BuildConfig.VERSION_NAME;
|
||||
|
||||
}
|
||||
public static void saveListToFile(List<reportBean> list, String filePath, String filePathname,String zipPath) {
|
||||
Log.d("okhttp","saveListToFile ");
|
||||
Gson gson = new Gson();
|
||||
|
||||
File appDir = new File(filePath);
|
||||
if (!appDir.exists()) {
|
||||
appDir.mkdirs();
|
||||
}
|
||||
String dataName =filePathname+".txt" ;
|
||||
File file = new File(appDir, dataName);
|
||||
Log.d("saveListToFile",file.getAbsolutePath());
|
||||
try {
|
||||
FileOutputStream fos=new FileOutputStream(file,true);//设置为true,继续原文件写入
|
||||
try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(fos))) {
|
||||
for (reportBean item : list) {
|
||||
writer.write(gson.toJson(item));
|
||||
writer.newLine(); // 每个布尔值后写入一个新行
|
||||
}
|
||||
writer.close();
|
||||
fos.close();
|
||||
// File folderToZip = new File(filePath);
|
||||
// File zipFile = new File(zipPath,"output.zip");
|
||||
// zipFolderCorrected(folderToZip, zipFile, folderToZip.getPath());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void zipFolderCorrected(File folderToZip, File zipFile, String basePath) throws IOException {
|
||||
basePath = basePath.replace("\\", "/");
|
||||
if (!basePath.endsWith("/")) {
|
||||
basePath += "/";
|
||||
}
|
||||
|
||||
try (FileOutputStream fos = new FileOutputStream(zipFile);
|
||||
ZipOutputStream zos = new ZipOutputStream(fos)) {
|
||||
|
||||
File[] files = folderToZip.listFiles();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
String filePath = file.getPath().replace("\\", "/");
|
||||
String entryName = filePath.substring(basePath.length());
|
||||
if (file.isDirectory()) {
|
||||
// 添加文件夹条目
|
||||
zos.putNextEntry(new ZipEntry(entryName + "/"));
|
||||
zos.closeEntry();
|
||||
// 递归地压缩子文件夹
|
||||
zipFolderCorrected(file, zipFile, basePath);
|
||||
} else {
|
||||
// 添加文件条目并写入文件内容
|
||||
zos.putNextEntry(new ZipEntry(entryName));
|
||||
try (FileInputStream fis = new FileInputStream(file)) {
|
||||
byte[] buffer = new byte[1024];
|
||||
int length;
|
||||
while ((length = fis.read(buffer)) >= 0) {
|
||||
zos.write(buffer, 0, length);
|
||||
}
|
||||
}
|
||||
zos.closeEntry();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void deleteFile( String ReportFileZip,String name,String folderPath)
|
||||
{
|
||||
|
||||
File zipFile = new File(ReportFileZip,name);
|
||||
// 删除文件
|
||||
zipFile.delete();
|
||||
deleteFolder(folderPath);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void deleteFolder(String folderPath) {
|
||||
File folder = new File(folderPath);
|
||||
if (!folder.exists()) {
|
||||
// 路径不存在,输出错误信息
|
||||
// System.out.println("文件夹不存在");
|
||||
return;
|
||||
}
|
||||
|
||||
File[] files = folder.listFiles();
|
||||
if (files != null) {
|
||||
for (File file : files) {
|
||||
if (file.isDirectory()) {
|
||||
// 如果是子文件夹,递归调用删除方法
|
||||
deleteFolder(file.getAbsolutePath());
|
||||
} else {
|
||||
// 如果是文件,直接删除
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 删除空文件夹
|
||||
folder.delete();
|
||||
}
|
||||
public static String getCurrentNetworkType(@NonNull Context context) {
|
||||
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
if (connectivityManager != null) {
|
||||
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
|
||||
if (activeNetworkInfo != null && activeNetworkInfo.isConnected()) {
|
||||
return getActiveNetworkType(connectivityManager);
|
||||
}
|
||||
}
|
||||
return "No network connection";
|
||||
}
|
||||
|
||||
public static String getActiveNetworkType(ConnectivityManager connectivityManager) {
|
||||
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
|
||||
if (networkInfo != null) {
|
||||
int type = networkInfo.getType();
|
||||
if (type == ConnectivityManager.TYPE_WIFI) {
|
||||
return "wifi";
|
||||
} else if (type == ConnectivityManager.TYPE_MOBILE) {
|
||||
int subType = networkInfo.getSubtype();
|
||||
switch (subType) {
|
||||
case TelephonyManager.NETWORK_TYPE_GPRS:
|
||||
case TelephonyManager.NETWORK_TYPE_EDGE:
|
||||
case TelephonyManager.NETWORK_TYPE_CDMA:
|
||||
case TelephonyManager.NETWORK_TYPE_1xRTT:
|
||||
return "2G";
|
||||
case TelephonyManager.NETWORK_TYPE_EVDO_0:
|
||||
case TelephonyManager.NETWORK_TYPE_EVDO_A:
|
||||
case TelephonyManager.NETWORK_TYPE_EVDO_B:
|
||||
case TelephonyManager.NETWORK_TYPE_HSPA:
|
||||
case TelephonyManager.NETWORK_TYPE_HSUPA:
|
||||
case TelephonyManager.NETWORK_TYPE_HSDPA:
|
||||
case TelephonyManager.NETWORK_TYPE_UMTS:
|
||||
return "3G";
|
||||
case TelephonyManager.NETWORK_TYPE_EHRPD:
|
||||
case TelephonyManager.NETWORK_TYPE_HSPAP:
|
||||
case TelephonyManager.NETWORK_TYPE_IDEN:
|
||||
case TelephonyManager.NETWORK_TYPE_LTE:
|
||||
return "4G";
|
||||
case TelephonyManager.NETWORK_TYPE_NR:
|
||||
return "5G";
|
||||
default:
|
||||
String typeName = networkInfo.getTypeName();
|
||||
if ("MOBILE_DUN".equals(typeName)) {
|
||||
return "Mobile DUN";
|
||||
} else if ("MOBILE_HIPRI".equals(typeName)) {
|
||||
return "Mobile HIPRI";
|
||||
} else if ("MOBILE_MMS".equals(typeName)) {
|
||||
return "Mobile MMS";
|
||||
} else if ("MOBILE_SUPL".equals(typeName)) {
|
||||
return "Mobile SUPL";
|
||||
} else if ("MOBILE".equals(typeName)) {
|
||||
return "Mobile";
|
||||
} else if ("WIFI".equals(typeName)) {
|
||||
return "WIFI";
|
||||
} else if ("WIMAX".equals(typeName)) {
|
||||
return "WiMAX";
|
||||
} else if ("BLUETOOTH".equals(typeName)) {
|
||||
return "Bluetooth";
|
||||
} else if ("ETHERNET".equals(typeName)) {
|
||||
return "Ethernet";
|
||||
} else {
|
||||
return typeName;
|
||||
}
|
||||
}
|
||||
} else if (type == ConnectivityManager.TYPE_BLUETOOTH) {
|
||||
return "Bluetooth";
|
||||
} else if (type == ConnectivityManager.TYPE_ETHERNET) {
|
||||
return "Ethernet";
|
||||
} else {
|
||||
return networkInfo.getTypeName();
|
||||
}
|
||||
}
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,320 @@
|
||||
package cn.shangyu.gdxzExpert.report;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.lidroid.xutils.exception.HttpException;
|
||||
import com.lidroid.xutils.http.ResponseInfo;
|
||||
import com.lidroid.xutils.http.callback.RequestCallBack;
|
||||
import com.lidroid.xutils.http.client.HttpRequest;
|
||||
import com.umeng.umverify.UMVerifyHelper;
|
||||
import com.umeng.umverify.listener.UMTokenResultListener;
|
||||
import com.zhy.http.okhttp.OkHttpUtils;
|
||||
import com.zhy.http.okhttp.callback.StringCallback;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.shangyu.gdxzExpert.bean.TimestampBean;
|
||||
import cn.shangyu.gdxzExpert.http.HttpHelper;
|
||||
import cn.shangyu.gdxzExpert.netease.config.LogoutHelper;
|
||||
import cn.shangyu.gdxzExpert.utils.Constant;
|
||||
import cn.shangyu.gdxzExpert.utils.GsonTools;
|
||||
import cn.shangyu.gdxzExpert.utils.LogUtil;
|
||||
import cn.shangyu.gdxzExpert.utils.SharePrefUtil;
|
||||
import cn.shangyu.gdxzExpert.utils.SignUtil;
|
||||
import cn.shangyu.gdxzExpert.utils.StreamTool;
|
||||
import cn.shangyu.gdxzExpert.utils.StringUtil;
|
||||
import cn.shangyu.gdxzExpert.utils.UIUtils;
|
||||
import cn.shangyu.gdxzExpert.utils.UpdateVersionUtils;
|
||||
import cn.shangyu.gdxzExpert.utils.Url;
|
||||
import okhttp3.Call;
|
||||
|
||||
public class ReportService extends Service {
|
||||
|
||||
public ReportService() {
|
||||
}
|
||||
public String ReportFile;
|
||||
public String ReportFileZip;
|
||||
public String report_token="";
|
||||
List<reportBean> list;
|
||||
// public String FileUrl="https://dev-event.igandan.com/v1/eventLog/upload";//测试环境
|
||||
// public String FileUrl="https://event.igandan.com/v1/eventLog/upload";//正式环境
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
ReportFile=getBaseContext().getExternalFilesDir("").getAbsolutePath()+"/gdxz/report/zip";
|
||||
ReportFileZip=getBaseContext().getExternalFilesDir("").getAbsolutePath()+"/gdxz/report/";
|
||||
// if("true".equals(CommUtil.isFirstRun))
|
||||
// {
|
||||
// CommUtil.isFirstRun="false";
|
||||
// }
|
||||
UMVerifyHelper mPhoneNumberAuthHelper= UMVerifyHelper.getInstance(getBaseContext(), new UMTokenResultListener() {
|
||||
@Override
|
||||
public void onTokenSuccess(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTokenFailed(String s) {
|
||||
|
||||
}
|
||||
});
|
||||
if("CUCC".equals(mPhoneNumberAuthHelper.getCurrentCarrierName()))
|
||||
{
|
||||
CommUtil.getCarrierName="中国联通";
|
||||
}
|
||||
else if("CMCC".equals(mPhoneNumberAuthHelper.getCurrentCarrierName()))
|
||||
{
|
||||
CommUtil.getCarrierName="中国移动";
|
||||
}
|
||||
else if("CTCC".equals(mPhoneNumberAuthHelper.getCurrentCarrierName()))
|
||||
{
|
||||
CommUtil.getCarrierName="中国电信";
|
||||
}
|
||||
else
|
||||
{
|
||||
CommUtil.getCarrierName="未知";
|
||||
}
|
||||
|
||||
|
||||
Log.d("okhttp","mPhoneNumberAuthHelper "+ CommUtil.getCarrierName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
// TODO: Return the communication channel to the service.
|
||||
throw new UnsupportedOperationException("Not yet implemented");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
report_token=intent.getStringExtra("report_token");
|
||||
if(report_token==""||report_token==null)
|
||||
{
|
||||
return START_NOT_STICKY;
|
||||
}
|
||||
else if(intent.getSerializableExtra("report_list")==null)
|
||||
{
|
||||
if(checkReport())
|
||||
{
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
zipFile();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
return START_NOT_STICKY;
|
||||
}
|
||||
list = (List<reportBean>) intent.getSerializableExtra("report_list");
|
||||
CommUtil.totalreport+= list.size();
|
||||
|
||||
// 在新线程或异步任务中执行文件上传
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
writeReport();
|
||||
// uploadFile(filePath);
|
||||
// // 上传完成后,可以停止服务或发送广播通知其他组件
|
||||
// stopSelf(); // 或者使用广播通知
|
||||
}
|
||||
}).start();
|
||||
return START_NOT_STICKY;
|
||||
}
|
||||
public void writeReport()
|
||||
{
|
||||
// if(2>1)
|
||||
// {
|
||||
// CommUtil.deleteFile(ReportFileZip,"output.zip",ReportFile);
|
||||
// return;
|
||||
// }
|
||||
if( "true".equals(CommUtil.isReoprtingNow))
|
||||
{
|
||||
return;
|
||||
}
|
||||
Log.d("okhttp","CommUtil.totalreport "+ CommUtil.totalreport);
|
||||
if(CommUtil.totalreport>99&&checkReport())
|
||||
{
|
||||
|
||||
zipFile();
|
||||
}
|
||||
else{
|
||||
CommUtil.saveListToFile(list,ReportFile,"upload",ReportFileZip);
|
||||
}
|
||||
|
||||
}
|
||||
public void zipFile()
|
||||
{
|
||||
CommUtil.isReoprtingNow="true";
|
||||
File folderToZip = new File(ReportFile);
|
||||
File zipFile = new File(ReportFileZip,"outputandroid.zip");
|
||||
try {
|
||||
CommUtil.zipFolderCorrected(folderToZip, zipFile, folderToZip.getPath());
|
||||
uploadFile();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void uploadFile() {
|
||||
|
||||
Map<String, String> headers=new HashMap<>();
|
||||
headers.put("Content-Type","multipart/form-data");
|
||||
headers.put("Tag-Access",report_token);
|
||||
// Log.d("okhttp","report_token"+report_token);
|
||||
File zipFile = new File(ReportFileZip,"outputandroid.zip");
|
||||
OkHttpUtils
|
||||
.post()
|
||||
.url(Url.FileUrl)
|
||||
.headers(headers)
|
||||
.addFile("file", "outputandroid.zip", zipFile)//
|
||||
|
||||
// .file(zipFile)
|
||||
|
||||
.build()
|
||||
.execute(new StringCallback() {
|
||||
|
||||
@Override
|
||||
public void onError(Call call, Exception e, int id) {
|
||||
Log.d("okhttp",e+"e");
|
||||
CommUtil.isReoprtingNow="false";
|
||||
CommUtil.totalreport=0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(String response, int id) {
|
||||
Log.d("okhttp",response+"responseoutput");
|
||||
CommUtil.isReoprtingNow="false";
|
||||
|
||||
JSONObject jsonObject= null;
|
||||
try {
|
||||
jsonObject = new JSONObject(response);
|
||||
if("30007".equals(jsonObject.optString("code")))
|
||||
{
|
||||
initReport();
|
||||
}
|
||||
else if("200".equals(jsonObject.optString("code")))
|
||||
{
|
||||
CommUtil.deleteFile(ReportFileZip,"outputandroid.zip",ReportFile);
|
||||
// CommUtil.isReoprtingNow="false";
|
||||
CommUtil.totalreport=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// CommUtil.isReoprtingNow="false";
|
||||
CommUtil.totalreport=0;
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
public Boolean checkReport()
|
||||
{
|
||||
File folderToZip = new File(ReportFile);
|
||||
if(folderToZip.exists())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public void initReport()
|
||||
{
|
||||
|
||||
Map<String,String> map = new HashMap<>();
|
||||
sendJsonPostParamtoNetSignMD5(Url.getTagToken,map);
|
||||
|
||||
|
||||
}
|
||||
public void sendJsonPostParamtoNetSignMD5(final String postUrl, final Map<String, String> param) {
|
||||
|
||||
HttpHelper.loadData(HttpRequest.HttpMethod.GET, Url.getTimestamp,null, new RequestCallBack<String>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(ResponseInfo<String> info) {
|
||||
String uuid = SharePrefUtil.getString(UIUtils.getContext(), Constant.uuid, "");
|
||||
if(StringUtil.isEmpty(uuid))
|
||||
{
|
||||
uuid= LogoutHelper.addUMTokenuuid;
|
||||
}
|
||||
param.put("user_uuid", uuid);
|
||||
TimestampBean bean = GsonTools.fromGsonToBean(info.result, TimestampBean.class);
|
||||
param.put("timestamp", bean.getTimestamp());
|
||||
param.put("client_type", "A");
|
||||
param.put("version", UpdateVersionUtils.getVersionName());
|
||||
new Thread() {
|
||||
public void run() {
|
||||
String encoding = "UTF-8";
|
||||
Gson gson = new Gson();
|
||||
String params = gson.toJson(param);
|
||||
byte[] data;
|
||||
try {
|
||||
String sign = SignUtil.getSign(param);
|
||||
LogUtil.i("params = "+params.toString());
|
||||
data = params.getBytes(encoding);
|
||||
URL url = new URL(postUrl);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setDoOutput(true);
|
||||
conn.setRequestProperty("Content-Type","application/json");
|
||||
conn.setRequestProperty("sign",sign);
|
||||
conn.setRequestProperty("Content-Length",String.valueOf(data.length));
|
||||
conn.setConnectTimeout(5 * 1000);
|
||||
OutputStream outStream = conn.getOutputStream();
|
||||
outStream.write(data);
|
||||
outStream.flush();
|
||||
outStream.close();
|
||||
int ssss=conn.getResponseCode() ;
|
||||
if (ssss == 200) {
|
||||
InputStream inStream = conn.getInputStream();
|
||||
String result = new String(StreamTool.readInputStream(inStream), "UTF-8");
|
||||
String string = new String(result);
|
||||
LogUtil.i("result = " + result);
|
||||
JSONObject jsonObject111 = new JSONObject(string);
|
||||
if ("200".equals(jsonObject111.optString("code"))&&!jsonObject111.isNull("data")) {
|
||||
Constant.Report_userId= jsonObject111.optJSONObject("data").optString("userId");
|
||||
Constant.Repotr_token=jsonObject111.optJSONObject("data").optString("token");
|
||||
Constant.Repotr_app_key=jsonObject111.optJSONObject("data").optString("appKey");
|
||||
report_token=Constant.Repotr_token;
|
||||
// Log.d("okhttp","report_token666"+report_token);
|
||||
uploadFile();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.e("提交失败,请重试 = "+e.getMessage());
|
||||
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(HttpException arg0, String arg1) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
package cn.shangyu.gdxzExpert.report;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class reportBean extends BaseReportBean implements Serializable {
|
||||
|
||||
|
||||
private String province;// 省份
|
||||
private String city;// 城市
|
||||
private String district;// 区
|
||||
private String os;// 非必填,客户端系统类型 (IOS Android Web Miniprogram Platform)
|
||||
private String os_version;// 客户端系统类型 版本号 (Android 11.1.2;IOS 9.0.0)
|
||||
private String device;// 客户端机型品牌 (苹果 小米 vivo 华为)
|
||||
private String device_type;// 客户端机型型号 (Iphone12 xioami8)
|
||||
private String app_version;// 客户端 版本号 (1.0.0;3.9.7)
|
||||
private String network_type;// 网络类型 如 wifi 5G 4G 3G 2G
|
||||
private String network_carrier;// 网络运营商 (中国电信 中国移动)
|
||||
private String user_agent;// 浏览器标识
|
||||
private String event_val;// 计算类型事件值 (订单金额、观看时长)
|
||||
private String event_unit;// 计算类型事件 单位 (元,分钟;供显示)
|
||||
private String page_type;// 页面类型
|
||||
private String number;// 数量
|
||||
private String resource_name;// 资源名称
|
||||
private String resource_option;// 资源属性
|
||||
private String deal_result;// 处理结果
|
||||
private String deal_object;// 处理对象
|
||||
private String belong;// 所属类型
|
||||
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
public String getOs() {
|
||||
return os;
|
||||
}
|
||||
|
||||
public void setOs(String os) {
|
||||
this.os = os;
|
||||
}
|
||||
|
||||
public String getOs_version() {
|
||||
return os_version;
|
||||
}
|
||||
|
||||
public void setOs_version(String os_version) {
|
||||
this.os_version = os_version;
|
||||
}
|
||||
|
||||
public String getDevice() {
|
||||
return device;
|
||||
}
|
||||
|
||||
public void setDevice(String device) {
|
||||
this.device = device;
|
||||
}
|
||||
|
||||
public String getDevice_type() {
|
||||
return device_type;
|
||||
}
|
||||
|
||||
public void setDevice_type(String device_type) {
|
||||
this.device_type = device_type;
|
||||
}
|
||||
|
||||
public String getApp_version() {
|
||||
return app_version;
|
||||
}
|
||||
|
||||
public void setApp_version(String app_version) {
|
||||
this.app_version = app_version;
|
||||
}
|
||||
|
||||
public String getNetwork_type() {
|
||||
return network_type;
|
||||
}
|
||||
|
||||
public void setNetwork_type(String network_type) {
|
||||
this.network_type = network_type;
|
||||
}
|
||||
|
||||
public String getNetwork_carrier() {
|
||||
return network_carrier;
|
||||
}
|
||||
|
||||
public void setNetwork_carrier(String network_carrier) {
|
||||
this.network_carrier = network_carrier;
|
||||
}
|
||||
|
||||
public String getUser_agent() {
|
||||
return user_agent;
|
||||
}
|
||||
|
||||
public void setUser_agent(String user_agent) {
|
||||
this.user_agent = user_agent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getEvent_unit() {
|
||||
return event_unit;
|
||||
}
|
||||
|
||||
public void setEvent_unit(String event_unit) {
|
||||
this.event_unit = event_unit;
|
||||
}
|
||||
|
||||
public String getPage_type() {
|
||||
return page_type;
|
||||
}
|
||||
|
||||
public void setPage_type(String page_type) {
|
||||
this.page_type = page_type;
|
||||
}
|
||||
|
||||
public String getEvent_val() {
|
||||
return event_val;
|
||||
}
|
||||
|
||||
public void setEvent_val(String event_val) {
|
||||
this.event_val = event_val;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getResource_name() {
|
||||
return resource_name;
|
||||
}
|
||||
|
||||
public void setResource_name(String resource_name) {
|
||||
this.resource_name = resource_name;
|
||||
}
|
||||
|
||||
public String getResource_option() {
|
||||
return resource_option;
|
||||
}
|
||||
|
||||
public void setResource_option(String resource_option) {
|
||||
this.resource_option = resource_option;
|
||||
}
|
||||
|
||||
public String getDeal_result() {
|
||||
return deal_result;
|
||||
}
|
||||
|
||||
public void setDeal_result(String deal_result) {
|
||||
this.deal_result = deal_result;
|
||||
}
|
||||
|
||||
public String getDeal_object() {
|
||||
return deal_object;
|
||||
}
|
||||
|
||||
public void setDeal_object(String deal_object) {
|
||||
this.deal_object = deal_object;
|
||||
}
|
||||
|
||||
public String getBelong() {
|
||||
return belong;
|
||||
}
|
||||
|
||||
public void setBelong(String belong) {
|
||||
this.belong = belong;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user