updateSCStatus.md 1.95 KB

更新销售类目接口

接口名: /salesCategory/updateSCStatus

方法

POST JSONRAW

入参


属性名称 类型 例子 说明 是否必填 长度限制
categoryId String 4 销售类目id 5
status String 0 销售类目状态1:开启 0:关闭 5

对应SQL的操作库表

<update id="updateByPrimaryKeySelective" parameterType="com.yohobuy.platform.dal.product.model.SalesCategory">
        update sales_category
        <set>
            <if test="categoryName != null">
                category_name = #{categoryName,jdbcType=VARCHAR},
            </if>
            <if test="relationParameter != null">
                relation_parameter = #{relationParameter,jdbcType=VARCHAR},
            </if>
            <if test="relationUrl != null">
                relation_url = #{relationUrl,jdbcType=VARCHAR},
            </if>
            <if test="parentId != null">
                parent_id = #{parentId,jdbcType=INTEGER},
            </if>
            <if test="orderBy != null">
                order_by = #{orderBy,jdbcType=INTEGER},
            </if>
            <if test="icon != null">
                icon = #{icon,jdbcType=VARCHAR},
            </if>
            <if test="categoryCode != null">
                category_code = #{categoryCode,jdbcType=VARCHAR},
            </if>
            <if test="state != null">
                state = #{state,jdbcType=INTEGER},
            </if>
            <if test="levelNumber != null">
                level_number = #{levelNumber,jdbcType=INTEGER},
            </if>
            <if test="createTime != null">
                create_time = #{createTime,jdbcType=INTEGER},
            </if>
        </set>
        where category_id = #{categoryId,jdbcType=INTEGER}
    </update>

响应码


响应码code 消息 说明
200 updateSCStatus success
400 类目id丢失/状态丢失

返回

{
    "code": 200,
    "data": {
        "categoryId": "372",
        "state": "1"
    },
    "md5": "a6ab0cfc4ff244eeb636a127424e406e",
    "message": "updateSCStatus success"
}