后台管理系统接口需求分析


管理员登录

请求URL:

  • ./public/RootLogin

请求方式:

  • POST

参数:

参数名 必选 类型 说明
username string 管理员用户名
password string 密码

返回示例

  {
    "code": "OK",
    "data": {
        "token": "73186b2324b65e1280d81c0f8a6465275a9cda063dfd67.57329289",
        "user_info": {
            "username": "xnliu",
        }
    }
}

用户管理


获取用户列表(只获取上传过user_name的用户)

请求URL:

  • ./UserController/userList

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string 管理员token
user_name string user_name用于查询
page int 页码数,默认为1
page_size int pagesize

获取用户:condition['user_name']='xnliu'

返回示例

{
    "code": "OK",
    "data": {
        "user_list": [
            {
                "open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
                "nick_name": "小黄人",
                "user_name": "欧阳清",
                "avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSLGCic1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxRiaqo27KgxtwReJmicUkeHl3FX2fxVVuZwmA/0",
                "gender": 2,
                "city": "Hangzhou",
                "province": "Zhejiang",
                "country": "China",
                "language": "zh_CN",
                "status": "NORMAL",
                "mobile": "13588235393",
                "email": "[email protected]",
                "university": "浙江大学",
                "subject": "机械设计",
                "degree": "研究生",
                "payment": "0.01"
            },
            {
                "open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
                "nick_name": "花开",
                "user_name": "朱梓骁",
                "avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSLGCic1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxRiaqo27KgxtwReJmicUkeHl3FX2fxVVuZwmA/0",
                "gender": 2,
                "city": "Hangzhou",
                "province": "Zhejiang",
                "country": "China",
                "language": "zh_CN",
                "status": "NORMAL",
                "mobile": "13588235393",
                "email": "[email protected]",
                "university": "清华大学",
                "subject": "化学工业",
                "degree": "本科",
                "payment": "0.01"
            }
        ]
    }
}

返回参数说明

参数名 类型 说明
payment float 用户累计消费
status string STOP NORMAL分别表示被停用和正常

获取用户简单列表,用于查询时显示

请求URL:

  • ./UserController/getAAUserList

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string 管理员token
user_name string user_name用于查询
page int 页码数,默认为1
page_size int pagesize

获取用户:condition['user_name']='xnliu'

返回示例

{
    "code": "OK",
    "data": {
        "user_list": [
            {
                "open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
                "nick_name": "小黄人",
                "user_name": "欧阳清",
                "status": "NORMAL",
            },
            {
                "open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
                "nick_name": "花开",
                "user_name": "朱梓骁",            
                "status": "NORMAL",            
            }
        ]
    }
}

获取用户数量

请求URL:

  • ./UserController/userNum

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string 管理员token
user_name string user_name用于查询
page int 页码数,默认为1

获取用户:condition['user_name']='xnliu'

返回示例

{
    "code": "OK",
    "data": {       
     total_num: 5
    }
}

高校管理


高校列表接口

请求URL:

  • ./UniversityController/universityList

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string shopAdmin token
page int 页码数,默认为1
page_size int 每页条目数,默认为20

返回示例

 {
    "code": "OK",
    "data": {
    "list": [
             {
                "university_id": 1,
                "university_name": "Harvard",
                "badge": "jss292424.png",
                "photo": "bsdihdjaass.png",
                "rank": 1,
                "status": "NORMAL",
                "desc": "Philadelphia University is located in Philadelphia, Pennsylvania, USA. In 1884, the Philadelphia Philology School",
                "address": "Philadelphia, Pennsylvania, USA"
            },
            {
                "university_id": 2,
                "university_name": "William and Mary College",
                "badge": "jss26524.png",
                "photo": "bsdihd455ss.png",
                "rank": 2,
                "status": "NORMAL",
                "desc": "Founded in 1693, the William and Mary College, also known as the William and Mary College, is the second oldest institution of higher education in the nation with a history just behind Harvard University founded in 1636",
                "address": "Virginia, United States"
            },
        ]
     }
}

单个高校信息

请求URL:

  • ./UniversityController/displayUniversity

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string shopAdmin token
university_id int

返回示例

 {
    "code": "OK",
    "data": {
    "universityItem": {
                "university_id": 1,
                "university_name": "Harvard",
                "badge": "jss292424.png",
                "photo": "bsdihdjaass.png",
                "rank": 1,
                "status": "NORMAL",
                "desc": "Philadelphia University is located in Philadelphia, Pennsylvania, USA. In 1884, the Philadelphia Philology School",
                "address": "Philadelphia, Pennsylvania, USA"
            }
     }
}

新增高校信息

请求URL:

  • ./UniversityController/addUniversity

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string Admin token
university_name string 名称,不能为空 ,限制128字符
desc string 描述,不能超过2048字符
rank int 学校排名
address string 高校地址,不能超过128字符
university_attr array 高校校徽图片、介绍图

**TIPS:图片上传接口:./ImageController/uploadImage
input name="file" type视情况指定
返回示例

  "code": "OK",
    "data": {
        "image": {
            "image_id": "8",
            "image_save_name": "b725bb1708a0c5c7a34d0c4d96583629.png",
            "image_hash": "b725bb1708a0c5c7a34d0c4d96583629",
            "upload_path": "PRODUCT_DETAIL"
        }
    }

返回示例

  {
    "code": "OK",
    "data": {
        "university_id": "3"
    }
}

编辑高校信息

请求URL:

  • ./UniversityController/editUniversity

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string Admin token
university_id int 待编辑的university_id
edit_data[university_name] string 名称,不能为空 ,限制128字符
edit_data[desc] string 描述,不能超过2048字符
edit_data[rank] int 学校排名
edit_data[ address] string 高校地址,不能超过128字符
edit_data[university_attr] array 高校校徽图片、介绍图

返回示例

 {
    "code": "OK",
    "data": {
        "msg": "高校信息已成功编辑"
    }
}

删除高校

请求URL:

  • ./UniversityController/deleteUniversity

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string Admin token
university_id int 待删除的university_id

返回示例

  {
    "code": "OK",
    "data": {
        "msg": ""
    }
}

获取高校数量

请求URL:

  • ./UniversityController/universityNum

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string 管理员token
page int 页码数,默认为1

返回示例

{
    "code": "OK",
    "data": {       
     total_num: 5
    }
}

订单管理


订单列表接口

请求URL:

  • ./SalesController/listOrder

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string shopAdmin token
condition array 搜索条件,[‘user_name’=>’xx’,……]
page int 页码数,默认为1
page_size int 每页条目数,默认为20

返回示例

 {
    "code": "OK",
    "data": {
            "order_list": [
             { 
                "order_id": 1,
                "order_sn": "18021250445844",
                "open_id": "olx8H0Tx0rlev97sa2bCIOQcWVKo",
                "status": "INIT",
                "payment": "200.00",
                "order_time": "2018-02-05 10:31:42",
                "pay_time": null,
                "publication": 200,
                "citation": 200,
                "review": 100,
                "immigration_type": "EB1A",
                 "user_info":{
                      "open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
                      "nick_name": "花开",
                      "user_name": "朱梓骁",
                      "avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSLGCic1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxRiaqo27KgxtwReJmicUkeHl3FX2fxVVuZwmA/0",
                      "gender": 2,
                      "city": "Hangzhou",
                      "province": "Zhejiang",
                      "country": "China",
                      "language": "zh_CN",
                      "status": "NORMAL",
                      "mobile": "13588235393",
                      "email": "[email protected]",
                      "university": "浙江大学",
                      "subject": "数字媒体技术",
                      "degree": "本科",
                       }        
                },
              {  
                "order_id": 2,
                "order_sn": "18021250445844",
                "open_id": "olx8H0Tx0rlev97sa2bCIOQcWVKo",
                "status": "INIT",
                "payment": "200.00",
                "order_time": "2018-02-05 10:31:42",
                "pay_time": null,
                "publication": 200,
                "citation": 200,
                "review": 100,
                "immigration_type": "EB1A",
                 "user_info":{
                      "open_id": "olx8H0UHfk3RrzTe4ofZBWzl8J-0",
                      "nick_name": "花开",
                      "user_name": "朱梓骁",
                      "avatar_url": "https://wx.qlogo.cn/mmopen/vi_32/wUMSLGCic1FOhTM5yV1Nw3S7txib7v0Fp0TPogtegNUeqvKS9t0OFxRiaqo27KgxtwReJmicUkeHl3FX2fxVVuZwmA/0",
                      "gender": 2,
                      "city": "Hangzhou",
                      "province": "Zhejiang",
                      "country": "China",
                      "language": "zh_CN",
                      "status": "NORMAL",
                      "mobile": "13588235393",
                      "email": "[email protected]",
                      "university": "浙江大学",
                      "subject": "化学工业",
                      "degree": "本科",
            }        
         }
      ]      
    }
}

发起订单服务

请求URL:

  • ./SalesController/serveOrder

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string shopAdmin token
order_id int 订单order_id

返回示例

{
    "code": "OK",
    "data": ""
    }

删除已完成订单

请求URL:

  • ./SalesController/deleteOrder

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string shopAdmin token
order_id int 订单order_id

返回示例

{
    "code": "OK",
    "data": ""
    }

获取订单数量

请求URL:

  • ./SalesController/orderNum

请求方式:

  • POST

参数:

参数名 必选 类型 说明
token string 管理员token
page int 页码数,默认为1

返回示例

{
    "code": "OK",
    "data": {       
     total_num: 5
    }
}

你可能感兴趣的:(后台管理系统接口需求分析)