kgdxpr 2 years ago
commit 29129493ea

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

@ -898,7 +898,7 @@ public class CollectController extends Controller {
}
if (!FileUtil.exist(basePath)) FileUtil.mkdir(basePath);
String file_id = UUID.randomUUID().toString().toUpperCase();
String filePath = basePath+File.separator + file_id + "." + suffix;
String filePath = basePath + File.separator + file_id + "." + suffix;
uf.getFile().renameTo(new File(filePath));
//计算文件大小
String file_size = FileSizeUtil.getAutoFileOrFilesSize(filePath);
@ -923,6 +923,20 @@ public class CollectController extends Controller {
renderJson(kv);
}
/**
*
*
* @param job_id
* @param file_id
*/
@Before({POST.class})
public void delUploadFile(int job_id, String file_id) {
cm.delUploadFile(job_id, file_id);
Kv kv = Kv.by("success", true);
kv.set("message", "删除成功!");
renderJson(kv);
}
/**
*
*
@ -1027,7 +1041,7 @@ public class CollectController extends Controller {
* @param job_id
* @param json
*/
@Before({GET.class})
@Before({POST.class})
@IsLoginInterface({})
@IsNumericInterface({"job_id"})
@EmptyInterface({"json"})

@ -1216,6 +1216,17 @@ public class CollectModel {
return record.getInt("id");
}
/**
*
*
* @param job_id
* @param file_id
*/
public void delUploadFile(int job_id, String file_id) {
String sql = "delete from t_collect_uploadfile where job_id=? and file_id=?";
Db.update(sql, job_id, file_id);
}
/**
*
*

Loading…
Cancel
Save