Browse Source

上传组件提供新功能,修复responsedto报错问题

NorthLan 6 years ago
parent
commit
dfeae633a6

+ 6 - 0
zen-api/src/main/kotlin/com/gxzc/zen/rpc/api/sys/RUploadService.kt

@@ -1,6 +1,8 @@
 package com.gxzc.zen.rpc.api.sys
 
 import com.gxzc.zen.api.sys.model.SysUploadInfo
+import com.gxzc.zen.common.dto.ZenFileMetadata
+import java.io.File
 
 /**
  *
@@ -9,6 +11,10 @@ import com.gxzc.zen.api.sys.model.SysUploadInfo
  * @url https://noahlan.com
  */
 interface RUploadService {
+    /**
+     * 添加文件数据
+     */
+    fun addUploadFile(fileMetadata: ZenFileMetadata, file: File)
     /**
     * 获取某上传批次所有文件数据
     */

+ 6 - 1
zen-core/src/main/kotlin/com/gxzc/zen/common/dto/ResponseDto.kt

@@ -3,6 +3,7 @@ package com.gxzc.zen.common.dto
 import com.fasterxml.jackson.annotation.JsonFormat
 import com.fasterxml.jackson.annotation.JsonInclude
 import khronos.Dates
+import java.io.Serializable
 import java.util.*
 
 
@@ -13,7 +14,11 @@ import java.util.*
  * @url https://noahlan.com
  */
 @JsonInclude(JsonInclude.Include.NON_NULL)
-class ResponseDto {
+open class ResponseDto : Serializable {
+    companion object {
+        private const val serialVersionUID = 1L
+    }
+
     var data: Any? = null
     var code: Int? = 200