添加定稿状态,修复bug
This commit is contained in:
parent
059148d97b
commit
ba2eec3a0c
|
@ -42,7 +42,7 @@ public class SysCatalogResourceController extends BaseController {
|
|||
/**
|
||||
* 查询目录-专题资源列表
|
||||
*/
|
||||
@SaCheckPermission("catalog:resource:list")
|
||||
//@SaCheckPermission("catalog:resource:list")
|
||||
@GetMapping("/list")
|
||||
public R<List<SysCatalogResourceVo>> list(SysCatalogResourceBo bo) {
|
||||
List<SysCatalogResourceVo> list = resourceService.queryList(bo);
|
||||
|
|
|
@ -39,7 +39,7 @@ public class SysCatalogTextbookController extends BaseController {
|
|||
/**
|
||||
* 查询目录-同步教材列表
|
||||
*/
|
||||
@SaCheckPermission("catalog:textbook:list")
|
||||
//@SaCheckPermission("catalog:textbook:list")
|
||||
@GetMapping("/list")
|
||||
public R<List<SysCatalogTextbookVo>> list(SysCatalogTextbookBo bo) {
|
||||
List<SysCatalogTextbookVo> list = textbookService.queryList(bo);
|
||||
|
|
|
@ -131,9 +131,7 @@ public class SysOssPersonController extends BaseController {
|
|||
/**
|
||||
* 预览
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
* @throws Exception
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("file:person:preview")
|
||||
@PostMapping("/preview/{id}")
|
||||
|
|
|
@ -61,6 +61,11 @@ public class SysOssTextbook extends TenantEntity {
|
|||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 定稿状态
|
||||
*/
|
||||
private Integer finalizeStatus;
|
||||
|
||||
private Long downloadNum;
|
||||
private Long previewNum;
|
||||
private Long likeNum;
|
||||
|
|
|
@ -67,6 +67,11 @@ public class SysOssTextbookVo implements Serializable {
|
|||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 定稿状态
|
||||
*/
|
||||
private Integer finalizeStatus;
|
||||
|
||||
private Long downloadNum;
|
||||
private Long previewNum;
|
||||
private Long likeNum;
|
||||
|
|
|
@ -231,6 +231,7 @@ public class SysOssPersonServiceImpl implements ISysOssPersonService {
|
|||
public boolean share(SysOssPersonBo bo) {
|
||||
SysOssPerson ossPerson = baseMapper.selectById(bo.getId());
|
||||
SysOssTextbook date = new SysOssTextbook();
|
||||
date.setOssId(ossPerson.getOssId());
|
||||
String path = catalogTextbookService.selectCatalogNameById(bo.getCatalogId());
|
||||
date.setCatalogId(bo.getCatalogId());
|
||||
date.setFileName(ossPerson.getFileName());
|
||||
|
|
|
@ -163,7 +163,8 @@ public class SysOssResourceServiceImpl implements ISysOssResourceService {
|
|||
add.setFileSuffix(suffix);
|
||||
String path = catalogService.selectCatalogNameById(add.getCatalogId());
|
||||
add.setFilePath(path);
|
||||
add.setStatus(-1);
|
||||
//add.setStatus(-1);
|
||||
add.setStatus(1);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setOssId(add.getOssId());
|
||||
|
|
|
@ -183,7 +183,9 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
|
|||
add.setFileSuffix(suffix);
|
||||
String path = catalogService.selectCatalogNameById(add.getCatalogId());
|
||||
add.setFilePath(path);
|
||||
add.setStatus(-1);
|
||||
//add.setStatus(-1);
|
||||
add.setStatus(1);
|
||||
add.setFinalizeStatus(StatusConstants.DISABLED);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setOssId(add.getOssId());
|
||||
|
@ -355,7 +357,8 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
|
|||
|
||||
@Override
|
||||
public Boolean finalize(SysOssTextbookBo bo) {
|
||||
SysOssTextbook ossTextbook = baseMapper.selectById(bo.getId());
|
||||
Long id = bo.getId();
|
||||
SysOssTextbook ossTextbook = baseMapper.selectById(id);
|
||||
SysOssTextbook date = new SysOssTextbook();
|
||||
date.setOssId(ossTextbook.getOssId());
|
||||
date.setCatalogId(ossTextbook.getCatalogId());
|
||||
|
@ -365,9 +368,14 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
|
|||
date.setType(ossTextbook.getType());
|
||||
date.setOssType(2);
|
||||
date.setStatus(ossTextbook.getStatus());
|
||||
date.setFinalizeStatus(StatusConstants.DISABLED);
|
||||
date.setCreateDept(ossTextbook.getCreateDept());
|
||||
date.setCreateBy(ossTextbook.getCreateBy());
|
||||
date.setUpdateBy(LoginHelper.getUserId());
|
||||
SysOssTextbook update = new SysOssTextbook();
|
||||
update.setId(id);
|
||||
update.setFinalizeStatus(StatusConstants.IN_USE);
|
||||
baseMapper.updateById(update);
|
||||
return baseMapper.insert(date) > 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue