timePublish.md 3.07 KB

定时发布资讯接口

接口名: /guang/article/timePublish

方法

POST JSONRAW

入参


属性名称 类型 例子 说明 是否必填 长度限制
id int 33615 资讯id 1-11
publishTime String 2016-02-19 16:17 定时发布时间 16-19

对应SQL的操作库表

 <update id="updateByPrimaryKeySelective" parameterType="com.yohobuy.platform.dal.guang.model.Article" >
    update article
    <set >
      <if test="articleTitle != null" >
        article_title = #{articleTitle,jdbcType=VARCHAR},
      </if>
      <if test="maxSortId != null" >
        max_sort_id = #{maxSortId,jdbcType=INTEGER},
      </if>
      <if test="minSortId != null" >
        min_sort_id = #{minSortId,jdbcType=INTEGER},
      </if>
      <if test="authorId != null" >
        author_id = #{authorId,jdbcType=INTEGER},
      </if>
      <if test="coverImage != null" >
        cover_image = #{coverImage,jdbcType=VARCHAR},
      </if>
      <if test="coverImageType != null" >
        cover_image_type = #{coverImageType,jdbcType=TINYINT},
      </if>
      <if test="url != null" >
        url = #{url,jdbcType=VARCHAR},
      </if>
      <if test="adsImgSize != null" >
        ads_img_size = #{adsImgSize,jdbcType=VARCHAR},
      </if>
      <if test="articleType != null" >
        article_type = #{articleType,jdbcType=TINYINT},
      </if>
      <if test="articleSummary != null" >
        article_summary = #{articleSummary,jdbcType=VARCHAR},
      </if>
      <if test="articleGender != null" >
        article_gender = #{articleGender,jdbcType=CHAR},
      </if>
      <if test="brand != null" >
        brand = #{brand,jdbcType=VARCHAR},
      </if>
      <if test="tag != null" >
        tag = #{tag,jdbcType=VARCHAR},
      </if>
      <if test="praise != null" >
        praise = #{praise,jdbcType=INTEGER},
      </if>
      <if test="browse != null" >
        browse = #{browse,jdbcType=INTEGER},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=TINYINT},
        publish_time = UNIX_TIMESTAMP(),
      </if>
      <if test="isRecommend != null" >
        is_recommend = #{isRecommend,jdbcType=INTEGER},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=INTEGER},
      </if>
      <if test="publishTime != null" >
        publish_time = #{publishTime,jdbcType=INTEGER},
      </if>
      <if test="publishState != null" >
        publish_state = #{publishState,jdbcType=TINYINT},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=INTEGER},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>

错误编码


错误码code 消息 说明
400 请选择要发布的资讯
200 修改成功!
400 修改失败!

返回

{
    "code":200,
    "message":"修改成功!"
}