@Component public class MyContentListDirective extends AbstractAppDirective
参数列表
categoryId
:分类id,当parentId为空时有效
containChild
:是否包含子分类,【true,false】
categoryIds
:多个分类id,当categoryId为空时有效
modelId
:多个模型id
parentId
:父内容id
onlyUrl
:外链,【true,false】
hasImages
:拥有图片列表,【true,false】
hasFiles
:拥有附件列表,【true,false】
hasProducts
:拥有产品列表,【true,false】
startPublishDate
:发布日期开始时间,【2020-01-01 23:59:59】,【2020-01-01】
endPublishDate
:发布日期结束时间,高级选项禁用时不能超过现在,【2020-01-01
23:59:59】,【2020-01-01】
status
:内容状态,【0:操作,1:已发布,2:待审核,3:驳回】
emptyParent
:高级选项:父内容id是否为空,【true,false】,当parentId为空时有效
orderField
排序字段,【score:评分,comments:评论数,clicks:点击数,publishDate:发布日期,updateDate:更新日期,checkDate:审核日期】,默认置顶级别倒序、发布日期按orderType排序
orderType
:排序类型,【asc:正序,desc:倒序】,默认为倒序
pageIndex
:页码
pageSize
:每页条数
返回结果
page
:PageHandler
page.list
:List类型 查询结果实体列表
CmsContent
<script> $.getJSON('${site.dynamicPath!}api/myContentList?pageSize=10&authToken=用户登录授权&authUserId=1', function(data){ console.log(data.totalCount); }); </script>
限定符和类型 | 字段和说明 |
---|---|
private CmsContentService |
service |
private StatisticsComponent |
statisticsComponent |
构造器和说明 |
---|
MyContentListDirective() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(RenderHandler handler,
SysApp app,
SysUser user) |
boolean |
needAppToken() |
boolean |
needUserToken() |
execute, getApp, getSite, getUser
execute, getName, getNamespace, getShortName, setName, setNamespace, setShortName
private CmsContentService service
private StatisticsComponent statisticsComponent
public void execute(RenderHandler handler, SysApp app, SysUser user) throws java.io.IOException, java.lang.Exception
execute
在类中 AbstractAppDirective
java.io.IOException
java.lang.Exception
public boolean needUserToken()
needUserToken
在类中 AbstractAppDirective
public boolean needAppToken()
needAppToken
在类中 AbstractAppDirective