派生自 projectDept/qhighschool

EricsHu
2023-05-15 962660d954ce69bc1f8d1a16024ca48b614018a1
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;
@@ -24,6 +25,7 @@
 * @author chenjunliang
 */
@Api(tags = "资源管理接口")
@CrossOrigin
@RestController
@RequestMapping(value = "/teach/res")
public class ResController {
@@ -207,14 +209,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")));
    }
}
}