fix(超算专区): 修复文章已存在未判断未通过文章的情况
This commit is contained in:
parent
e98663e87b
commit
d0e44d8d2a
|
|
@ -1215,7 +1215,7 @@ public class CmsDocServiceImpl implements ICmsDocService {
|
|||
private void checkDocName(String docName, Long deptId, String dirName) {
|
||||
//检查该文件是否已存在
|
||||
CmsDoc oldCmsDoc = cmsDocMapper.selectCmsDocByNameAndDeptId(docName, deptId, dirName);
|
||||
if (oldCmsDoc != null) {
|
||||
if (oldCmsDoc != null && DocAuditStatus.AUDIT_PASS.getAuditCode().equals(oldCmsDoc.getAuditStatus())) {
|
||||
if (oldCmsDoc.getIsDir()) {
|
||||
throw new ServiceException("该栏目已存在(栏目名称[%s])", docName);
|
||||
} else {
|
||||
|
|
@ -1228,7 +1228,7 @@ public class CmsDocServiceImpl implements ICmsDocService {
|
|||
private boolean insertCmsDocWithAudit(CmsDoc cmsDoc, String message, String content) {
|
||||
//检查该文件是否已存在
|
||||
CmsDoc oldCmsDoc = cmsDocMapper.selectCmsDocByNameAndDeptId(cmsDoc.getName(), cmsDoc.getDeptId(), cmsDoc.getDirName());
|
||||
if (oldCmsDoc != null) {
|
||||
if (oldCmsDoc != null && DocAuditStatus.AUDIT_PASS.getAuditCode().equals(oldCmsDoc.getAuditStatus())) {
|
||||
throw new ServiceException("该文章已存在(文章名称[" + cmsDoc.getName() + "])");
|
||||
}
|
||||
boolean insertResult = insertCmsDocDatabase(cmsDoc, content);
|
||||
|
|
|
|||
Loading…
Reference in New Issue