laoyuyu 5 years ago
parent 0cb5d3e684
commit 27459e7d9a
  1. 2
      DEV_LOG.md
  2. 3
      HttpComponent/src/main/java/com/arialyy/aria/http/HttpRecordAdapter.java
  3. 8
      PublicComponent/src/main/java/com/arialyy/aria/orm/DelegateFind.java
  4. 1
      PublicComponent/src/main/java/com/arialyy/aria/util/ComponentUtil.java
  5. 2
      README.md
  6. 5
      app/src/main/java/com/arialyy/simple/core/upload/HttpUploadActivity.java

@ -1,4 +1,6 @@
## 开发日志 ## 开发日志
+ v_3.8.2
- fix bug https://github.com/AriaLyy/Aria/issues/573
+ v_3.8.1 (2019/12/22) + v_3.8.1 (2019/12/22)
- 修复一个表创建失败的问题 https://github.com/AriaLyy/Aria/issues/570 - 修复一个表创建失败的问题 https://github.com/AriaLyy/Aria/issues/570
- 修复一个非分块模式下导致下载失败的问题 https://github.com/AriaLyy/Aria/issues/571 - 修复一个非分块模式下导致下载失败的问题 https://github.com/AriaLyy/Aria/issues/571

@ -38,9 +38,6 @@ public class HttpRecordAdapter extends AbsRecordHandlerAdapter {
@Override public void onPre() { @Override public void onPre() {
super.onPre(); super.onPre();
if (getWrapper().getRequestType() == ITaskWrapper.U_HTTP) {
RecordUtil.delTaskRecord(getEntity().getFilePath(), IRecordHandler.TYPE_UPLOAD);
}
} }
@Override public void handlerTaskRecord(TaskRecord record) { @Override public void handlerTaskRecord(TaskRecord record) {

@ -422,13 +422,19 @@ class DelegateFind extends AbsDelegate {
private <T extends DbEntity> List<T> exeNormalDataSql(SQLiteDatabase db, Class<T> clazz, private <T extends DbEntity> List<T> exeNormalDataSql(SQLiteDatabase db, Class<T> clazz,
String sql, String[] selectionArgs) { String sql, String[] selectionArgs) {
SqlUtil.checkTable(db, clazz); SqlUtil.checkTable(db, clazz);
Cursor cursor;
if (selectionArgs != null) {
String[] temp = new String[selectionArgs.length]; String[] temp = new String[selectionArgs.length];
int i = 0; int i = 0;
for (String arg : selectionArgs) { for (String arg : selectionArgs) {
temp[i] = SqlUtil.encodeStr(arg); temp[i] = SqlUtil.encodeStr(arg);
i++; i++;
} }
Cursor cursor = db.rawQuery(sql, temp); cursor = db.rawQuery(sql, temp);
} else {
cursor = db.rawQuery(sql, null);
}
List<T> data = cursor.getCount() > 0 ? newInstanceEntity(clazz, cursor) : null; List<T> data = cursor.getCount() > 0 ? newInstanceEntity(clazz, cursor) : null;
closeCursor(cursor); closeCursor(cursor);
return data; return data;

@ -28,7 +28,6 @@ import java.lang.ref.SoftReference;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Proxy;
import java.util.List; import java.util.List;
/** /**

@ -135,6 +135,8 @@ protected void onCreate(Bundle savedInstanceState) {
### [文档地址](https://aria.laoyuyu.me/aria_doc/) ### [文档地址](https://aria.laoyuyu.me/aria_doc/)
### QQ群:524329160
### 版本日志 ### 版本日志
+ v_3.8.1 (2019/12/22) + v_3.8.1 (2019/12/22)

@ -43,7 +43,7 @@ public class HttpUploadActivity extends BaseActivity<ActivityUploadBinding> {
//private final String FILE_PATH = "/mnt/sdcard/ggsg14.apk"; //private final String FILE_PATH = "/mnt/sdcard/ggsg14.apk";
private final String FILE_PATH = private final String FILE_PATH =
Environment.getExternalStorageDirectory().getPath() + "/Download/PaNTFS15562.zip"; Environment.getExternalStorageDirectory().getPath() + "/Download/QQMusic-import-1.2.1.zip";
private UploadEntity mEntity; private UploadEntity mEntity;
@Override protected int setLayoutId() { @Override protected int setLayoutId() {
@ -53,6 +53,7 @@ public class HttpUploadActivity extends BaseActivity<ActivityUploadBinding> {
@Override protected void init(Bundle savedInstanceState) { @Override protected void init(Bundle savedInstanceState) {
setTile("D_HTTP 上传"); setTile("D_HTTP 上传");
super.init(savedInstanceState); super.init(savedInstanceState);
Aria.upload(this).getTaskList();
mEntity = Aria.upload(this).getFirstUploadEntity(FILE_PATH); mEntity = Aria.upload(this).getFirstUploadEntity(FILE_PATH);
@ -81,7 +82,7 @@ public class HttpUploadActivity extends BaseActivity<ActivityUploadBinding> {
.setParam("params", "bbbbbbbb"); .setParam("params", "bbbbbbbb");
Aria.upload(HttpUploadActivity.this).load(FILE_PATH) Aria.upload(HttpUploadActivity.this).load(FILE_PATH)
//.setUploadUrl("http://lib-test.xzxyun.com:8042/Api/upload?data={\"type\":\"1\",\"fileType\":\".apk\"}") //.setUploadUrl("http://lib-test.xzxyun.com:8042/Api/upload?data={\"type\":\"1\",\"fileType\":\".apk\"}")
.setUploadUrl("http://9.9.9.205:5000/upload/") .setUploadUrl("http://9.9.12.210:5000/upload/")
//.setTempUrl("http://192.168.1.6:8080/upload/sign_file/").setAttachment("file") //.setTempUrl("http://192.168.1.6:8080/upload/sign_file/").setAttachment("file")
//.addHeader("iplanetdirectorypro", "11a09102fb934ad0bc206f9c611d7933") //.addHeader("iplanetdirectorypro", "11a09102fb934ad0bc206f9c611d7933")
.option(option) .option(option)

Loading…
Cancel
Save