cms部分修改

main
王家东 5 months ago
parent 7fde46bd0b
commit 7a6ea723dd
  1. 4
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsArticleController.java
  2. 5
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsArticle.java

@ -136,7 +136,7 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
cmsArticle.setColumnName(cmsColumn.getName()); cmsArticle.setColumnName(cmsColumn.getName());
} }
QueryWrapper<Subweside> subwesideQueryWrapper = new QueryWrapper<>(); QueryWrapper<Subweside> subwesideQueryWrapper = new QueryWrapper<>();
subwesideQueryWrapper.in("id", principal.getId()); subwesideQueryWrapper.in("compadminid", principal.getId());
List<Subweside> subwesideList = subwesideService.list(subwesideQueryWrapper); List<Subweside> subwesideList = subwesideService.list(subwesideQueryWrapper);
if (!subwesideList.isEmpty()) { if (!subwesideList.isEmpty()) {
List<String> subnames = subwesideList.stream() List<String> subnames = subwesideList.stream()
@ -145,7 +145,7 @@ public class CmsArticleController extends JeecgController<CmsArticle, ICmsArticl
String joinedString = String.join(", ", subnames); String joinedString = String.join(", ", subnames);
cmsArticle.setSource("来自子站:"+joinedString); cmsArticle.setSource("来自子站:"+joinedString);
}else { }else {
cmsArticle.setSource("管理员"); cmsArticle.setSource("");
} }
cmsArticleService.updateById(cmsArticle); cmsArticleService.updateById(cmsArticle);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");

@ -124,4 +124,9 @@ public class CmsArticle implements Serializable {
@Dict(dictTable = "subweside", dicText = "subname", dicCode = "id") @Dict(dictTable = "subweside", dicText = "subname", dicCode = "id")
@ApiModelProperty(value = "文章来源") @ApiModelProperty(value = "文章来源")
private java.lang.String artfrom; private java.lang.String artfrom;
/**简介*/
@Excel(name = "简介", width = 15)
@ApiModelProperty(value = "简介")
private java.lang.String info;
} }

Loading…
Cancel
Save