wlzboy
2025-11-22 d4fe921568bc29d72644a55fd194adf7f9277cb5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/task/SysTaskAttachmentController.java
@@ -65,7 +65,6 @@
    /**
     * 查询任务附件列表
     */
    @PreAuthorize("@ss.hasPermi('task:general:query')")
    @GetMapping("/list/{taskId}")
    public AjaxResult list(@PathVariable("taskId") Long taskId) {
        SysTask task = sysTaskService.getTaskDetail(taskId);
@@ -75,12 +74,12 @@
    /**
     * 上传任务附件
     */
    @PreAuthorize("@ss.hasPermi('task:general:edit')")
    @Log(title = "任务附件", businessType = BusinessType.INSERT)
    @PostMapping("/upload/{taskId}")
    public AjaxResult upload(@PathVariable("taskId") Long taskId, 
                            @RequestParam("file") MultipartFile file,
                            @RequestParam(value = "category", required = false) String category) {
                            @RequestParam(value = "category", required = true) String category) {
        try {
            Long attachmentId= sysTaskService.uploadAttachment(taskId, file, category);
            if (attachmentId > 0) {
@@ -119,7 +118,6 @@
    /**
     * 删除任务附件
     */
    @PreAuthorize("@ss.hasPermi('task:general:edit')")
    @Log(title = "任务附件", businessType = BusinessType.DELETE)
    @DeleteMapping("/{attachmentId}")
    public AjaxResult remove(@PathVariable("attachmentId") Long attachmentId) {
@@ -138,7 +136,6 @@
    /**
     * 从微信mediaId上传附件(微信小程序专用)
     */
    @PreAuthorize("@ss.hasPermi('task:general:edit')")
    @Log(title = "任务附件", businessType = BusinessType.INSERT)
    @PostMapping("/uploadFromWechat/{taskId}")
    public AjaxResult uploadFromWechat(@PathVariable("taskId") Long taskId,