addSC.md 2.6 KB

添加销售类目接口

接口名: /salesCategory/addSC

方法

POST JSONRAW

入参


属性名称 类型 例子 说明 是否必填 长度限制
categoryName String 创意家居 销售类目名称 50
relationParameter String 285,113 关联的物理类目id 500
relationUrl string 关联url 500
parentId string 1 父销售类目id 5
orderBy string 0 排序 5
icon string 销售类目图标 255

对应SQL的操作库表

<insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.yohobuy.platform.dal.product.model.SalesCategory">
        insert into sales_category
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="categoryId != null">
                category_id,
            </if>
            <if test="categoryName != null">
                category_name,
            </if>
            <if test="relationParameter != null">
                relation_parameter,
            </if>
            <if test="relationUrl != null">
                relation_url,
            </if>
            <if test="parentId != null">
                parent_id,
            </if>
            <if test="orderBy != null">
                order_by,
            </if>
            <if test="icon != null">
                icon,
            </if>
            <if test="categoryCode != null">
                category_code,
            </if>
            <if test="state != null">
                state,
            </if>
            <if test="levelNumber != null">
                level_number,
            </if>
            <if test="createTime != null">
                create_time,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="categoryId != null">
                #{categoryId,jdbcType=INTEGER},
            </if>
            <if test="categoryName != null">
                #{categoryName,jdbcType=VARCHAR},
            </if>
            <if test="relationParameter != null">
                #{relationParameter,jdbcType=VARCHAR},
            </if>
            <if test="relationUrl != null">
                #{relationUrl,jdbcType=VARCHAR},
            </if>
            <if test="parentId != null">
                #{parentId,jdbcType=INTEGER},
            </if>
            <if test="orderBy != null">
                #{orderBy,jdbcType=INTEGER},
            </if>
            <if test="icon != null">
                #{icon,jdbcType=VARCHAR},
            </if>
            <if test="categoryCode != null">
                #{categoryCode,jdbcType=VARCHAR},
            </if>
            <if test="state != null">
                #{state,jdbcType=INTEGER},
            </if>
            <if test="levelNumber != null">
                #{levelNumber,jdbcType=INTEGER},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=INTEGER},
            </if>
        </trim>
    </insert>

响应码


响应码code 消息 说明
200 addSC success

返回

{
  "code": 200,
  "data": "",
  "md5": "d751713988987e9331980363e24189ce",
  "message": "addSC success."
}