|
@@ -17,6 +17,7 @@ import com.usky.system.service.HceArticleService;
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
import com.usky.common.mybatis.core.AbstractCrudService;
|
|
import com.usky.system.service.vo.HceArticleVO;
|
|
import com.usky.system.service.vo.HceArticleVO;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.web.util.HtmlUtils;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
@@ -52,6 +53,7 @@ public class HceArticleServiceImpl extends AbstractCrudService<HceArticleMapper,
|
|
List<HceCategory> list = hceCategoryMapper.selectList(queryWrapper1);
|
|
List<HceCategory> list = hceCategoryMapper.selectList(queryWrapper1);
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
for(int i=0;i<page.getRecords().size();i++){
|
|
for(int i=0;i<page.getRecords().size();i++){
|
|
|
|
+ page.getRecords().get(i).setContent(HtmlUtils.htmlUnescape(page.getRecords().get(i).getContent()));
|
|
for(int j=0;j<list.size();j++){
|
|
for(int j=0;j<list.size();j++){
|
|
Integer categoryId1 = page.getRecords().get(i).getCategoryid();
|
|
Integer categoryId1 = page.getRecords().get(i).getCategoryid();
|
|
Integer categoryId2 = list.get(j).getId();
|
|
Integer categoryId2 = list.get(j).getId();
|
|
@@ -76,7 +78,10 @@ public class HceArticleServiceImpl extends AbstractCrudService<HceArticleMapper,
|
|
if(list.size() > 0){
|
|
if(list.size() > 0){
|
|
throw new BusinessException("同一个栏目下面内容标题重复,请重新填写内容标题");
|
|
throw new BusinessException("同一个栏目下面内容标题重复,请重新填写内容标题");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ hceArticle.setContent(HtmlUtils.htmlEscapeHex(hceArticle.getContent()));
|
|
hceArticle.setCreatedate(LocalDateTime.now());
|
|
hceArticle.setCreatedate(LocalDateTime.now());
|
|
|
|
+
|
|
this.save(hceArticle);
|
|
this.save(hceArticle);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -89,6 +94,8 @@ public class HceArticleServiceImpl extends AbstractCrudService<HceArticleMapper,
|
|
if(list.size() > 0){
|
|
if(list.size() > 0){
|
|
throw new BusinessException("同一个栏目下面内容标题重复,请重新填写内容标题");
|
|
throw new BusinessException("同一个栏目下面内容标题重复,请重新填写内容标题");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ hceArticle.setContent(HtmlUtils.htmlEscapeHex(hceArticle.getContent()));
|
|
hceArticle.setModifydate(LocalDateTime.now());
|
|
hceArticle.setModifydate(LocalDateTime.now());
|
|
this.updateById(hceArticle);
|
|
this.updateById(hceArticle);
|
|
}
|
|
}
|