Initial commit
This commit is contained in:
60
sources/com/ubt/jimu/transport/request/BaseParam.java
Normal file
60
sources/com/ubt/jimu/transport/request/BaseParam.java
Normal file
@@ -0,0 +1,60 @@
|
||||
package com.ubt.jimu.transport.request;
|
||||
|
||||
import com.ubt.jimu.JimuApplication;
|
||||
import com.ubt.jimu.base.http.ApiConstants;
|
||||
import com.ubt.jimu.utils.EncryptUtils;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public abstract class BaseParam {
|
||||
static final String ENCODE_KEY = "UBTech832%1293*6";
|
||||
private String appSource;
|
||||
private String appType;
|
||||
private String requestKey;
|
||||
private String requestTime;
|
||||
private String serviceVersion;
|
||||
private String systemArea;
|
||||
private String systemLanguage;
|
||||
|
||||
public BaseParam() {
|
||||
long currentTimeMillis = System.currentTimeMillis();
|
||||
this.appSource = "Jimu";
|
||||
this.appType = "2";
|
||||
this.systemArea = JimuApplication.l().c();
|
||||
this.systemLanguage = JimuApplication.l().g();
|
||||
this.serviceVersion = ApiConstants.getAppVersion();
|
||||
this.requestTime = String.valueOf(currentTimeMillis);
|
||||
this.requestKey = EncryptUtils.a(this.requestTime + "UBTech832%1293*6", 32);
|
||||
}
|
||||
|
||||
public static String getEncodeKey() {
|
||||
return "UBTech832%1293*6";
|
||||
}
|
||||
|
||||
public String getAppSource() {
|
||||
return this.appSource;
|
||||
}
|
||||
|
||||
public String getAppType() {
|
||||
return this.appType;
|
||||
}
|
||||
|
||||
public String getRequestKey() {
|
||||
return this.requestKey;
|
||||
}
|
||||
|
||||
public String getRequestTime() {
|
||||
return this.requestTime;
|
||||
}
|
||||
|
||||
public String getServiceVersion() {
|
||||
return this.serviceVersion;
|
||||
}
|
||||
|
||||
public String getSystemArea() {
|
||||
return this.systemArea;
|
||||
}
|
||||
|
||||
public String getSystemLanguage() {
|
||||
return this.systemLanguage;
|
||||
}
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
package com.ubt.jimu.transport.request;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class CreateDiyRobotParam extends BaseParam {
|
||||
private String customModelCategory;
|
||||
private long customModelCreatetime;
|
||||
private String customModelId;
|
||||
private List<UploadModelFile> fileUploadInfos;
|
||||
private String modelCreatedId;
|
||||
private String modelDescription;
|
||||
private String modelName;
|
||||
|
||||
public CreateDiyRobotParam(String str, String str2, String str3, String str4, String str5, long j, List<UploadModelFile> list) {
|
||||
this.modelCreatedId = str;
|
||||
this.customModelId = str2;
|
||||
this.modelName = str3;
|
||||
this.modelDescription = str4;
|
||||
this.customModelCategory = str5;
|
||||
this.customModelCreatetime = j;
|
||||
this.fileUploadInfos = list;
|
||||
}
|
||||
|
||||
public String getCustomModelCategory() {
|
||||
return this.customModelCategory;
|
||||
}
|
||||
|
||||
public long getCustomModelCreatetime() {
|
||||
return this.customModelCreatetime;
|
||||
}
|
||||
|
||||
public String getCustomModelId() {
|
||||
return this.customModelId;
|
||||
}
|
||||
|
||||
public List<UploadModelFile> getFileUploadInfos() {
|
||||
return this.fileUploadInfos;
|
||||
}
|
||||
|
||||
public String getModelDescription() {
|
||||
return this.modelDescription;
|
||||
}
|
||||
|
||||
public String getModelName() {
|
||||
return this.modelName;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return this.modelCreatedId;
|
||||
}
|
||||
}
|
50
sources/com/ubt/jimu/transport/request/UploadConfigItem.java
Normal file
50
sources/com/ubt/jimu/transport/request/UploadConfigItem.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package com.ubt.jimu.transport.request;
|
||||
|
||||
import com.ubt.jimu.transport.model.ConfigItem;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class UploadConfigItem {
|
||||
public String blocklyVersion;
|
||||
public String content;
|
||||
public String customModelId;
|
||||
public String description;
|
||||
public long fileCreateTime;
|
||||
public long fileModifyTime;
|
||||
public String fileName;
|
||||
public String icon;
|
||||
public String isDefault = "0";
|
||||
public String isDeleted;
|
||||
public String modelType;
|
||||
public String type;
|
||||
|
||||
public static UploadConfigItem fromConfigItem(ConfigItem configItem) {
|
||||
UploadConfigItem uploadConfigItem = new UploadConfigItem();
|
||||
uploadConfigItem.type = configItem.getType();
|
||||
uploadConfigItem.fileName = configItem.getFileName();
|
||||
uploadConfigItem.description = configItem.getDescription();
|
||||
uploadConfigItem.fileCreateTime = configItem.getFileCreateTime();
|
||||
uploadConfigItem.fileModifyTime = configItem.getFileModifyTime();
|
||||
uploadConfigItem.icon = configItem.getIcon();
|
||||
uploadConfigItem.blocklyVersion = configItem.blocklyVersion;
|
||||
uploadConfigItem.modelType = configItem.getModelType();
|
||||
uploadConfigItem.customModelId = configItem.getCustomModelId();
|
||||
uploadConfigItem.isDefault = configItem.getIsDefault();
|
||||
uploadConfigItem.isDeleted = configItem.getIsDeleted();
|
||||
uploadConfigItem.content = configItem.getContent();
|
||||
return uploadConfigItem;
|
||||
}
|
||||
|
||||
public static List<UploadConfigItem> fromConfigItems(List<ConfigItem> list) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
if (list != null && list.size() != 0) {
|
||||
Iterator<ConfigItem> it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayList.add(fromConfigItem(it.next()));
|
||||
}
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package com.ubt.jimu.transport.request;
|
||||
|
||||
import com.ubt.jimu.transport.model.ConfigItem;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class UploadConfigItemParam extends BaseParam {
|
||||
private List<UploadConfigItem> batchConfigFileList;
|
||||
private String opType;
|
||||
private String userId;
|
||||
|
||||
public UploadConfigItemParam(String str, String str2, List<ConfigItem> list) {
|
||||
this.userId = str;
|
||||
this.opType = str2;
|
||||
this.batchConfigFileList = UploadConfigItem.fromConfigItems(list);
|
||||
}
|
||||
}
|
68
sources/com/ubt/jimu/transport/request/UploadFileParam.java
Normal file
68
sources/com/ubt/jimu/transport/request/UploadFileParam.java
Normal file
@@ -0,0 +1,68 @@
|
||||
package com.ubt.jimu.transport.request;
|
||||
|
||||
import android.util.Base64;
|
||||
import com.ubt.jimu.JimuApplication;
|
||||
import com.ubt.jimu.transport.dao.TransportFileDbHandler;
|
||||
import com.ubt.jimu.transport.model.TransportFile;
|
||||
import com.ubt.jimu.unity.bluetooth.UnityActivity;
|
||||
import com.ubt.jimu.utils.DeviceUtils;
|
||||
import com.ubtech.utils.FileHelper;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class UploadFileParam extends BaseParam {
|
||||
private String accountName;
|
||||
private String opType;
|
||||
private String userId;
|
||||
private String sequenceNo = DeviceUtils.a(JimuApplication.l());
|
||||
private List<HashMap<String, Object>> batchFileList = new ArrayList();
|
||||
|
||||
public UploadFileParam(String str, String str2, String str3, List<TransportFile> list) throws IOException {
|
||||
this.userId = str;
|
||||
this.accountName = str2;
|
||||
this.opType = str3;
|
||||
for (TransportFile transportFile : list) {
|
||||
File file = TransportFileDbHandler.getFile(transportFile);
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("modelId", Long.valueOf(transportFile.getModelId()));
|
||||
hashMap.put(UnityActivity.pModelType, transportFile.getModelType());
|
||||
hashMap.put("filePath", transportFile.getFilePath());
|
||||
hashMap.put("fileName", transportFile.getFileName());
|
||||
hashMap.put("lastUploadTime", Long.valueOf(transportFile.getLastUploadTime()));
|
||||
if ("delete".equals(str3)) {
|
||||
hashMap.put("fileContent", "");
|
||||
} else {
|
||||
hashMap.put("fileContent", file2Base64Str(file));
|
||||
}
|
||||
this.batchFileList.add(hashMap);
|
||||
}
|
||||
}
|
||||
|
||||
private String file2Base64Str(File file) throws IOException {
|
||||
return Base64.encodeToString(FileHelper.b(file), 0);
|
||||
}
|
||||
|
||||
public String getAccountName() {
|
||||
return this.accountName;
|
||||
}
|
||||
|
||||
public List<HashMap<String, Object>> getBatchFileList() {
|
||||
return this.batchFileList;
|
||||
}
|
||||
|
||||
public String getOpType() {
|
||||
return this.opType;
|
||||
}
|
||||
|
||||
public String getSequenceNo() {
|
||||
return this.sequenceNo;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return this.userId;
|
||||
}
|
||||
}
|
10
sources/com/ubt/jimu/transport/request/UploadModelFile.java
Normal file
10
sources/com/ubt/jimu/transport/request/UploadModelFile.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.ubt.jimu.transport.request;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class UploadModelFile {
|
||||
public String fileName;
|
||||
public String filePath;
|
||||
public String fileString;
|
||||
public String fileType;
|
||||
public String orderNum;
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
package com.ubt.jimu.transport.request;
|
||||
|
||||
import com.ubt.jimu.transport.model.ConfigItem;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class UploadSingleConfigItemParam extends BaseParam {
|
||||
private String blocklyVersion;
|
||||
private String content;
|
||||
private String customModelId;
|
||||
private String description;
|
||||
private long fileCreateTime;
|
||||
private long fileModifyTime;
|
||||
private String fileName;
|
||||
private String icon;
|
||||
private String isDefault;
|
||||
private String modelType;
|
||||
private String opType;
|
||||
private String type;
|
||||
private String userId;
|
||||
|
||||
public UploadSingleConfigItemParam(String str, String str2, ConfigItem configItem) {
|
||||
this.userId = str;
|
||||
this.opType = str2;
|
||||
this.fileName = configItem.getFileName();
|
||||
this.type = configItem.getType();
|
||||
this.description = configItem.getDescription();
|
||||
this.icon = configItem.getIcon();
|
||||
this.fileCreateTime = configItem.getFileCreateTime();
|
||||
this.fileModifyTime = configItem.getFileModifyTime();
|
||||
this.customModelId = configItem.getCustomModelId();
|
||||
this.isDefault = configItem.getIsDefault();
|
||||
this.modelType = configItem.getModelType();
|
||||
this.blocklyVersion = configItem.getBlocklyVersion();
|
||||
this.content = configItem.getContent();
|
||||
}
|
||||
|
||||
public String getBlocklyVersion() {
|
||||
return this.blocklyVersion;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return this.content;
|
||||
}
|
||||
|
||||
public String getCustomModelId() {
|
||||
return this.customModelId;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
public long getFileCreateTime() {
|
||||
return this.fileCreateTime;
|
||||
}
|
||||
|
||||
public long getFileModifyTime() {
|
||||
return this.fileModifyTime;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return this.fileName;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
public String getIsDefault() {
|
||||
return this.isDefault;
|
||||
}
|
||||
|
||||
public String getModelType() {
|
||||
return this.modelType;
|
||||
}
|
||||
|
||||
public String getOpType() {
|
||||
return this.opType;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return this.userId;
|
||||
}
|
||||
}
|
@@ -0,0 +1,77 @@
|
||||
package com.ubt.jimu.transport.request;
|
||||
|
||||
import com.ubt.jimu.JimuApplication;
|
||||
import com.ubt.jimu.transport.Utils;
|
||||
import com.ubt.jimu.transport.dao.TransportFileDbHandler;
|
||||
import com.ubt.jimu.transport.model.TransportFile;
|
||||
import com.ubt.jimu.utils.DeviceUtils;
|
||||
import java.io.IOException;
|
||||
|
||||
/* loaded from: classes2.dex */
|
||||
public class UploadSingleFileParam extends BaseParam {
|
||||
private String accountName;
|
||||
private String fileContent;
|
||||
private String fileName;
|
||||
private String filePath;
|
||||
private long lastUploadTime;
|
||||
private long modelId;
|
||||
private String modelType;
|
||||
private String opType;
|
||||
private String sequenceNo = DeviceUtils.a(JimuApplication.l());
|
||||
private String userId;
|
||||
|
||||
public UploadSingleFileParam(String str, String str2, String str3, TransportFile transportFile) throws IOException {
|
||||
this.userId = str;
|
||||
this.accountName = str2;
|
||||
this.opType = str3;
|
||||
this.modelId = transportFile.getModelId();
|
||||
this.modelType = transportFile.getModelType();
|
||||
this.filePath = transportFile.getFilePath();
|
||||
this.fileName = transportFile.getFileName();
|
||||
this.lastUploadTime = transportFile.getLastUploadTime();
|
||||
if ("delete".equals(str3)) {
|
||||
return;
|
||||
}
|
||||
this.fileContent = Utils.a(TransportFileDbHandler.getFile(transportFile));
|
||||
}
|
||||
|
||||
public String getAccountName() {
|
||||
return this.accountName;
|
||||
}
|
||||
|
||||
public String getFileContent() {
|
||||
return this.fileContent;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return this.fileName;
|
||||
}
|
||||
|
||||
public String getFilePath() {
|
||||
return this.filePath;
|
||||
}
|
||||
|
||||
public long getLastUploadTime() {
|
||||
return this.lastUploadTime;
|
||||
}
|
||||
|
||||
public long getModelId() {
|
||||
return this.modelId;
|
||||
}
|
||||
|
||||
public String getModelType() {
|
||||
return this.modelType;
|
||||
}
|
||||
|
||||
public String getOpType() {
|
||||
return this.opType;
|
||||
}
|
||||
|
||||
public String getSequenceNo() {
|
||||
return this.sequenceNo;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return this.userId;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user