门户文件详情

This commit is contained in:
cjw 2024-06-21 11:01:36 +08:00
parent 430af9d852
commit 9cad37f9be
4 changed files with 34 additions and 18 deletions

View File

@ -139,6 +139,7 @@ public class SysOssPersonController extends BaseController {
sysOssPersonService.download(id, response);
}
@SaCheckPermission("file:person:preview")
@PostMapping("/preview/{id}")
public void preview(@PathVariable Long id, HttpServletResponse response) throws Exception {

View File

@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 请填写功能名称
* 专题资源
*
* @author Lion Li
* @date 2024-05-28
@ -55,19 +55,19 @@ public class SysOssResourceController extends BaseController {
}
/**
* 获取请填写功能名称详细信息
* 获取专题资源文件详细信息
*
* @param ossId 主键
* @param id 主键
*/
@SaCheckPermission("file:resource:query")
@GetMapping("/{ossId}")
@GetMapping("/{id}")
public R<SysOssResourceVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long ossId) {
return R.ok(sysOssResourceService.queryById(ossId));
@PathVariable Long id) {
return R.ok(sysOssResourceService.queryById(id));
}
/**
* 新增请填写功能名称
* 新增专题资源文件
*/
@SaCheckPermission("file:resource:add")
@Log(title = "【新增专题资源】", businessType = BusinessType.INSERT)
@ -78,7 +78,7 @@ public class SysOssResourceController extends BaseController {
}
/**
* 修改请填写功能名称
* 修改专题资源文件
*/
@SaCheckPermission("file:resource:edit")
@Log(title = "【更新专题资源】", businessType = BusinessType.UPDATE)
@ -89,7 +89,7 @@ public class SysOssResourceController extends BaseController {
}
/**
* 删除请填写功能名称
* 删除专题资源文件
*
* @param ossIds 主键串
*/

View File

@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 请填写功能名称
* 同步教材
*
* @author Lion Li
* @date 2024-05-28
@ -56,19 +56,19 @@ public class SysOssTextbookController extends BaseController {
/**
* 获取请填写功能名称详细信息
* 获取同步教材文件的详细信息
*
* @param ossId 主键
* @param id 主键
*/
@SaCheckPermission("file:textbook:query")
@GetMapping("/{ossId}")
@GetMapping("/{id}")
public R<SysOssTextbookVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long ossId) {
return R.ok(sysOssTextbookService.queryById(ossId));
@PathVariable Long id) {
return R.ok(sysOssTextbookService.queryById(id));
}
/**
* 新增请填写功能名称
* 新增同步教材的文件
*/
@SaCheckPermission("file:textbook:add")
@Log(title = "【新增同步教材】", businessType = BusinessType.INSERT)
@ -79,7 +79,7 @@ public class SysOssTextbookController extends BaseController {
}
/**
* 修改请填写功能名称
* 修改同步教材的文件
*/
@SaCheckPermission("file:textbook:edit")
@Log(title = "【更新同步教材】", businessType = BusinessType.UPDATE)
@ -90,7 +90,7 @@ public class SysOssTextbookController extends BaseController {
}
/**
* 删除请填写功能名称
* 删除同步教材的文件
*
* @param ossIds 主键串
*/

View File

@ -131,6 +131,14 @@ public class PortalController extends BaseController {
public TableDataInfo<SysOssResourceVo> resourceList(SysOssResourceBo bo, PageQuery pageQuery) {
return ossResourceService.queryPageList(bo, pageQuery);
}
@SaIgnore
@GetMapping("/resource/{id}")
public R<SysOssResourceVo> getResourceInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) {
return R.ok(ossResourceService.queryById(id));
}
@SaIgnore
@PostMapping("/resource/preview/{id}")
public void resourcePreview(@PathVariable Long id, HttpServletResponse response) throws Exception {
@ -166,6 +174,13 @@ public class PortalController extends BaseController {
return ossTextbookService.queryPageList(bo, pageQuery);
}
@SaIgnore
@GetMapping("/textbook/{id}")
public R<SysOssTextbookVo> getTextbookInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) {
return R.ok(ossTextbookService.queryById(id));
}
@SaIgnore
@PostMapping("/textbook/preview/{id}")
public void textbookPreview(@PathVariable Long id, HttpServletResponse response) throws Exception {