Browse Source

修改进度下载时间

anderx 1 year ago
parent
commit
09203dd638

+ 3 - 3
src/main/java/com/goafanti/techproject/controller/TaskDetailsController.java

@@ -6,7 +6,6 @@ import com.goafanti.common.controller.BaseController;
 import com.goafanti.common.model.TaskDetails;
 import com.goafanti.common.model.TaskDetailsLog;
 import com.goafanti.common.model.TaskFeature;
-import com.goafanti.common.utils.DateUtils;
 import com.goafanti.techproject.bo.InputTaskFeature;
 import com.goafanti.techproject.service.TaskDetailsService;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -15,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -91,10 +91,10 @@ public class TaskDetailsController extends BaseController {
      * @return 编辑结果
      */
     @PostMapping("/updateDownload")
-    public Result updateDownload(Integer id,String downloadTimeStr) {
+    public Result updateDownload(Integer id) {
         TaskDetails newTd=new TaskDetails();
         newTd.setId(id);
-        newTd.setDownloadTime(DateUtils.parseDate(downloadTimeStr));
+        newTd.setDownloadTime(new Date());
         return new Result<>().data(this.taskDetailsService.updateDownload(newTd));
     }