派生自 projectDept/qhighschool

EricsHu
2023-02-17 7a76e94050d7b1db77b06db5cc48be3fd6240be8
src/main/java/com/qxueyou/scc/controller/ResController.java
@@ -14,6 +14,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -207,14 +208,11 @@
     * @param id 资源id
     */
    @GetMapping(value = "getResDetail")
    public Result getResDetail(String id) {
    public Result getResDetail(String id,HttpServletResponse response) {
        Res res = resService.read(id);
        Result pathResult = resService.readAccessPath(id, null);
        return new Result(true, "success", CollectionUtils.newObjectMap("type", res.getType(), "name", res.getName(),
                "coverUrl", res.getCoverPageUrl(), "remark", res.getRemark(), "fullPath", pathResult.getDataT("path")));
    }
}