内容管理首页
接口名: `/resources/resContentIndex
方法
POST JSONRAW
入参
属性名称 | 类型 | 例子 | 说明 | 是否必填 | 长度限制 |
---|---|---|---|---|---|
id | int | 4 | 资源id | 是 | 11 |
对应SQL的操作库表
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from resources
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getByResourcesId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select
<include refid="Base_Column_List"/>
from resources_content where resources_id = #{resourcesId,jdbcType=INTEGER} order by order_by ASC
</select>
<select id="getByContentId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
SELECT
<include refid="Base_Column_List"/>
,
<include refid="Blob_Column_List" />
from resources_content_data where resource_content_id= #{resourceContentId,jdbcType=INTEGER}
</select>
错误编码
错误码code | 消息 | 说明 |
---|---|---|
200 | 操作成功 | |
400 | 资源id不能为空! | |
400 | 资源id不正确! | |
400 | 未能根据id查询到资源! |
返回
{ "code": 200, "data": { "contentData": [ { "contentData": "{\"data\":{\"0\":{\"src\":\"http://img12.static.yhbimg.com/yhb-img01/2016/03/28/06/02b4288ca7b208d74dc0ccfdc25c767ede.jpg?imageView/{mode}/w/{width}/h/{height}\",\"alt\":\"\",\"url\":{},\"bgColor\":\"\",\"imgId\":\"0\"}},\"template_name\":\"focus\",\"template_intro\":\"焦点图\",\"focus_type\":\"1\"}", "createTime": 1459147951, "id": 5778, "platformId": 1, "publishTime": 0, "resourceContentId": 5782, "sortId": 12, "templateKey": "123", "updateTime": 0 } ], "resource": { "code": "b99901a444f488858b6200c1d553f4f3", "createTime": 1458892587, "id": 627, "name": "每日签到页", "platformId": 1, "sortId": 12 } }, "md5": "c1baf6ece852fb6c77549ab303f553c9", "message": "操作成功" }