yeg
2026-09-06 1ef84ea35789364b18cd7270977d23169cadcb95
ruoyi-admin/src/main/java/com/battery/business/web/CompareReportController.java
@@ -10,6 +10,7 @@
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.PostMapping;
@@ -53,6 +54,15 @@
    @GetMapping("/{id}")
    public AjaxResult get(@PathVariable long id) { return success(service.get(id)); }
    /** 删除权限独立于创建人;业务事务同步记录删除,不使用异步操作日志切面。 */
    @PreAuthorize("@ss.hasPermi('system:compare-report:remove')")
    @DeleteMapping("/{id}")
    public AjaxResult delete(@PathVariable long id)
    {
        service.delete(id, getUserId(), getUsername());
        return success();
    }
    /** 授权查看全部历史版本摘要,不限制创建人。 */
    @PreAuthorize("@ss.hasPermi('system:compare-report:query')")
    @GetMapping("/{id}/versions")