后台管理接口-品类管理模块

上级目录:品类管理模块

1. 获取当前品类下一级ID(平级)

  • URL: /manage/category/get_category.do
  • RequestMethod: POST
  • RequestParams:

categoryId, 后端默认值是0,也就是说前端如果不传递参数 值,后端默认给*品类

  • Response
  • Success
{
    "status": 0,
    "data": [
        {
            "id": 100006,
            "parentId": 100001,
            "name": "冰箱",
            "status": true,
            "sortOrder": null,
            "createTime": "2017-03-25T21:52:15.000+0000",
            "updateTime": "2017-03-25T21:52:15.000+0000"
        },
        {
            "id": 100007,
            "parentId": 100001,
            "name": "电视",
            "status": true,
            "sortOrder": null,
            "createTime": "2017-03-25T21:52:26.000+0000",
            "updateTime": "2017-03-25T21:52:26.000+0000"
        },
        {
            "id": 100008,
            "parentId": 100001,
            "name": "洗衣机",
            "status": true,
            "sortOrder": null,
            "createTime": "2017-03-25T21:52:39.000+0000",
            "updateTime": "2017-03-25T21:52:39.000+0000"
        },
        {
            "id": 100009,
            "parentId": 100001,
            "name": "空调",
            "status": true,
            "sortOrder": null,
            "createTime": "2017-03-25T21:52:45.000+0000",
            "updateTime": "2017-03-25T21:52:45.000+0000"
        },
        {
            "id": 100010,
            "parentId": 100001,
            "name": "电热水器",
            "status": true,
            "sortOrder": null,
            "createTime": "2017-03-25T21:52:54.000+0000",
            "updateTime": "2017-03-25T21:52:54.000+0000"
        }
    ]
}
  • Fail
{
    "status": 10,
    "msg": "用户未登录,请登录"
}
{
    "status": 0,
    "data": []
}

2. 增加节点

  • URL: /manage/category/add_category.do
  • RequestMethod: POST
  • RequestParams:

parentId, categoryName.其中parentId默认值是0

  • Response
  • Success
{
    "status": 0,
    "msg": "添加品类成功"
}
  • Fail
{
    "status":1,
    "msg": "添加品类失败"
}
{
    "status": 1,
    "msg": "该品类名已经被注册"
}
{
    "status": 1,
    "msg": "父类ID不存在"
}

逻辑出现问题了,没有完成。

3. 修改品类名称

URL: /manage/category/set_category_name.do

  • RequestMethod: POST
  • RequestParams:

categoryId, categoryName

  • Response
  • Success
{
    "status": 0,
    "msg": "更新品类名字成功"
}
  • Fail
{
    "status": 1,
    "msg": "该品类名已经被注册"
}
{
    "status": 1,
    "msg": "更新品类名字失败"
}

4. 获取当前品类ID以及递归字节点ID

URL: /manage/category/get_deep_category.do

  • RequestMethods: POST
  • RequestParams:

categoryId

  • Response:
  • Success:
{
    "status": 0,
    "data": [
        100001,(该节点本身)
        100007,
        100006,
        100009,
        100008,
        100010
    ]
}
  • Fail
{
    "status": 1,
    "msg": "无权限"
}
上一篇:R语言模拟人类生活预期寿命动态可视化动画图gif


下一篇:52 回文平方数