| | |
| | | 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; |
| | |
| | | * @author chenjunliang |
| | | */ |
| | | @Api(tags = "资源管理接口") |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping(value = "/teach/res") |
| | | public class ResController { |
| | |
| | | * @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"))); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |