# 班级API

# 根据当前用户查询其班级列表

# 请求路径

/class/v1/user-classes/

# 请求方式

get

# 请求参数
参数名 类型 名称 必填 说明
schoolId Long 学校id
classTypeId Integer 班级类型id
pageIndex Integer 页码 如果不填,默认为1。必须大于0
pageSize Integer 每页返回多少数据 如果不填,默认为20。必须大于0,最大为50
# 返回结果
字段 字型 名称 字段解释
page 当前页码
total 总共多少页
pagesize 每页多少条数据
records 总共多少行数据
rows 具体的数据列行
字段 字型 名称 字段解释
schoolId Long 学校id
classId Long 班级id
className String 班级名称
customName String 班级别名
gradeId Long 年级id
gradeName String 年级名称
classAdviserId String 班主任ID 有可能多个,中间以","隔开
classAdviserName String 班主任名称 有可能返回null,如果返回null,必须使用id再进行查询
classTypeId Integer 班级类型ID
classTypeName String 班级类型名称
# 请求示例

/class/v1/user-classes?schoolId=1

# 返回示例
{
    "code": 200,
    "success": true,
    "data": {
        "page": 20,
        "total": 1,
        "pagesize": 20,
        "records": 20,
        "rows": [
            {
                "classId": 38502,
                "schoolId": 6101130178,
                "className": "8班",
                "customName": "中8班",
                "gradeId": 2,
                "gradeName": "中",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37707,
                "schoolId": 6101130178,
                "className": "扫码入园班",
                "customName": "扫码入园班",
                "gradeId": 23,
                "gradeName": "小小托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37608,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37604,
                "schoolId": 6101130178,
                "className": "9班",
                "customName": "Kii",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37603,
                "schoolId": 6101130178,
                "className": "3班",
                "customName": "呼和个",
                "gradeId": 23,
                "gradeName": "小小托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 36101,
                "schoolId": 6101130178,
                "className": "4班",
                "customName": "明年",
                "gradeId": 2,
                "gradeName": "中",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 35302,
                "schoolId": 6101130178,
                "className": "15班",
                "customName": "悄悄",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 34403,
                "schoolId": 6101130178,
                "className": "2班",
                "customName": "为人父君",
                "gradeId": 21,
                "gradeName": "托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 34101,
                "schoolId": 6101130178,
                "className": "20班",
                "customName": "卡殿",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 31501,
                "schoolId": 6101130178,
                "className": "9班",
                "customName": "44",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 31401,
                "schoolId": 6101130178,
                "className": "11班",
                "customName": "测试创建",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 30900,
                "schoolId": 6101130178,
                "className": "5班",
                "customName": "测试",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29739,
                "schoolId": 6101130178,
                "className": "12班",
                "customName": "阿梨",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29600,
                "schoolId": 6101130178,
                "className": "19班",
                "customName": "芒果",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29512,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "芝麻粒",
                "gradeId": 21,
                "gradeName": "托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29511,
                "schoolId": 6101130178,
                "className": "3班",
                "customName": "西瓜",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29510,
                "schoolId": 6101130178,
                "className": "20班",
                "customName": "升级",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29509,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "葡萄",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29002,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "青柠",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 27875,
                "schoolId": 6101130178,
                "className": "5班",
                "customName": "苹果班",
                "gradeId": 2,
                "gradeName": "中",
                "classTypeId": 1,
                "classTypeName": "普通班"
            }
        ]
    },
    "msg": "操作成功"
}

# 根据某个用户查询其班级列表

# 请求路径

/class/v1/queryClassesByUserId/

# 请求方式

get

# 请求参数
参数名 类型 名称 必填 说明
schoolId Long 学校id
userId Long 用户id
classTypeId Integer 班级类型id
pageIndex Integer 页码 如果不填,默认为1。必须大于0
pageSize Integer 每页返回多少数据 如果不填,默认为20。必须大于0,最大为50
# 返回结果
字段 字型 名称 字段解释
page 当前页码
total 总共多少页
pagesize 每页多少条数据
records 总共多少行数据
rows 具体的数据列行
字段 字型 名称 字段解释
schoolId Long 学校id
classId Long 班级id
className String 班级名称
customName String 班级别名
gradeId Long 年级id
gradeName String 年级名称
classAdviserId String 班主任ID 有可能多个,中间以","隔开
classAdviserName String 班主任名称 有可能返回null,如果返回null,必须使用id再进行查询
classTypeId Integer 班级类型ID
classTypeName String 班级类型名称
# 请求示例

/class/v1/queryClassesByUserId?userId=1&&schoolId=1

# 返回示例
{
    "code": 200,
    "success": true,
    "data": {
        "page": 20,
        "total": 1,
        "pagesize": 20,
        "records": 20,
        "rows": [
            {
                "classId": 38502,
                "schoolId": 6101130178,
                "className": "8班",
                "customName": "中8班",
                "gradeId": 2,
                "gradeName": "中",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37707,
                "schoolId": 6101130178,
                "className": "扫码入园班",
                "customName": "扫码入园班",
                "gradeId": 23,
                "gradeName": "小小托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37608,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37604,
                "schoolId": 6101130178,
                "className": "9班",
                "customName": "Kii",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37603,
                "schoolId": 6101130178,
                "className": "3班",
                "customName": "呼和个",
                "gradeId": 23,
                "gradeName": "小小托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 36101,
                "schoolId": 6101130178,
                "className": "4班",
                "customName": "明年",
                "gradeId": 2,
                "gradeName": "中",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 35302,
                "schoolId": 6101130178,
                "className": "15班",
                "customName": "悄悄",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 34403,
                "schoolId": 6101130178,
                "className": "2班",
                "customName": "为人父君",
                "gradeId": 21,
                "gradeName": "托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 34101,
                "schoolId": 6101130178,
                "className": "20班",
                "customName": "卡殿",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 31501,
                "schoolId": 6101130178,
                "className": "9班",
                "customName": "44",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 31401,
                "schoolId": 6101130178,
                "className": "11班",
                "customName": "测试创建",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 30900,
                "schoolId": 6101130178,
                "className": "5班",
                "customName": "测试",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29739,
                "schoolId": 6101130178,
                "className": "12班",
                "customName": "阿梨",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29600,
                "schoolId": 6101130178,
                "className": "19班",
                "customName": "芒果",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29512,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "芝麻粒",
                "gradeId": 21,
                "gradeName": "托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29511,
                "schoolId": 6101130178,
                "className": "3班",
                "customName": "西瓜",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29510,
                "schoolId": 6101130178,
                "className": "20班",
                "customName": "升级",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29509,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "葡萄",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29002,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "青柠",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 27875,
                "schoolId": 6101130178,
                "className": "5班",
                "customName": "苹果班",
                "gradeId": 2,
                "gradeName": "中",
                "classTypeId": 1,
                "classTypeName": "普通班"
            }
        ]
    },
    "msg": "操作成功"
}

# 根据schoolId查询classType列表

# 请求路径

/class/v1/types

# 请求方式

get

# 请求参数
参数名 类型 名称 必填 说明
schoolId Long 学校id
# 返回结果
字段 字型 名称 字段解释
classTypeId Integer 班级类型ID
schoolId Long 学校id
typeName String 自定义的班级类型的名字
# 请求示例

/class/v1/types?schoolId=1

# 返回示例
{
    "code": 200,
    "success": true,
    "data": [
        {
            "typeId": 1,
            "typeName": "普通班"
        },
        {
            "typeId": 9,
            "typeName": "兴趣/特长班"
        },
        {
            "typeId": 10,
            "typeName": "校车班"
        }
    ],
    "msg": "操作成功"
}

# 根据schoolId分页查询班级列表

# 请求路径

/class/v1/school-classes

# 请求方式

get

# 请求参数
参数名 类型 名称 必填 说明
schoolId Long 学校id
classTypeId Integer 班级类型id
pageIndex Integer 页码 如果不填,默认为1。必须大于0
pageSize Integer 每页返回多少数据 如果不填,默认为20。必须大于0,最大为50
# 返回结果
字段 字型 名称 字段解释
page 当前页码
total 总共多少页
pagesize 每页多少条数据
records 总共多少行数据
rows 具体的数据列行
字段 字型 名称 字段解释
schoolId Long 学校id
classId Long 班级id
className String 班级名称
customName String 班级别名
gradeId Long 年级id
gradeName String 年级名称
classAdviserId String 班主任ID 有可能多个,中间以","隔开
classAdviserName String 班主任名称 有可能返回null,如果返回null,必须使用id再进行查询
classTypeId Integer 班级类型ID
classTypeName String 班级类型名称
# 请求示例

/class/v1/school-classes?schoolId=1

# 返回示例
{
    "code": 200,
    "success": true,
    "data": {
        "page": 1,
        "total": 2,
        "pagesize": 20,
        "records": 21,
        "rows": [
            {
                "classId": 38502,
                "schoolId": 6101130178,
                "className": "8班",
                "customName": "中8班",
                "gradeId": 2,
                "gradeName": "中",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37707,
                "schoolId": 6101130178,
                "className": "扫码入园班",
                "customName": "扫码入园班",
                "gradeId": 23,
                "gradeName": "小小托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37608,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37604,
                "schoolId": 6101130178,
                "className": "9班",
                "customName": "Kii",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 37603,
                "schoolId": 6101130178,
                "className": "3班",
                "customName": "呼和个",
                "gradeId": 23,
                "gradeName": "小小托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 36101,
                "schoolId": 6101130178,
                "className": "4班",
                "customName": "明年",
                "gradeId": 2,
                "gradeName": "中",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 35302,
                "schoolId": 6101130178,
                "className": "15班",
                "customName": "悄悄",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 34403,
                "schoolId": 6101130178,
                "className": "2班",
                "customName": "为人父君",
                "gradeId": 21,
                "gradeName": "托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 34101,
                "schoolId": 6101130178,
                "className": "20班",
                "customName": "卡殿",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 31501,
                "schoolId": 6101130178,
                "className": "9班",
                "customName": "44",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 31401,
                "schoolId": 6101130178,
                "className": "11班",
                "customName": "测试创建",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 30900,
                "schoolId": 6101130178,
                "className": "5班",
                "customName": "测试",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29739,
                "schoolId": 6101130178,
                "className": "12班",
                "customName": "阿梨",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29600,
                "schoolId": 6101130178,
                "className": "19班",
                "customName": "芒果",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29512,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "芝麻粒",
                "gradeId": 21,
                "gradeName": "托",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29511,
                "schoolId": 6101130178,
                "className": "3班",
                "customName": "西瓜",
                "gradeId": 1,
                "gradeName": "小",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29510,
                "schoolId": 6101130178,
                "className": "20班",
                "customName": "升级",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29509,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "葡萄",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 29002,
                "schoolId": 6101130178,
                "className": "1班",
                "customName": "青柠",
                "gradeId": 3,
                "gradeName": "大",
                "classTypeId": 1,
                "classTypeName": "普通班"
            },
            {
                "classId": 27875,
                "schoolId": 6101130178,
                "className": "5班",
                "customName": "苹果班",
                "gradeId": 2,
                "gradeName": "中",
                "classTypeId": 1,
                "classTypeName": "普通班"
            }
        ]
    },
    "msg": "操作成功"
}

# 根据classId获取此班学生总数量、男生数量、女生数量、家长数量、老师数量

# 请求路径

/class/v1/counts

# 请求方式

get

# 请求参数
参数名 类型 名称 必填 说明
classId Long 班级id
# 返回结果
字段 字型 名称 字段解释
totalCount Integer 学生总数量
maleChildCount Integer 男生数量
femaleChildCount Integer 女生数量
parentCount Integer 家长数量
teacherCount Integer 老师数量
# 请求示例

/class/v1/counts?classId=1

# 返回示例
{
    "code": 200,
    "success": true,
    "data": {
        "maleCount": 0,
        "femaleCount": 0,
        "totalCount": 0,
        "parentCount": 0,
        "teacherCount": 0
    },
    "msg": "操作成功"
}

# 根据classId查询学生列表

# 请求路径

/class/v1/students

# 请求方式

get

# 请求参数
参数名 类型 名称 必填 说明
classId Long 班级id
pageIndex Integer 页码 如果不填,默认为1。必须大于0
pageSize Integer 每页返回多少数据 如果不填,默认为20。必须大于0,最大为50
# 返回结果
字段 字型 名称 字段解释
page 当前页码
total 总共多少页
pagesize 每页多少条数据
records 总共多少行数据
rows 具体的数据列行
字段 字型 名称 字段解释
studentId Long 孩子id
studentName String 孩子名称
studentIcon String 孩子头像
studentSex String 孩子性别
studentNum String 孩子学号
studentAge Intever 孩子年龄
# 请求示例

/class/v1/students?classId=1

# 返回示例
{
    "code": 200,
    "success": true,
    "data": {
        "page": 1,
        "total": 1,
        "pagesize": 20,
        "records": 4,
        "rows": [
            {
                "studentId": 116821,
                "studentName": "创建",
                "studentIcon": "",
                "studentAge": 0,
                "studentSex": "女"
            },
            {
                "studentId": 116101,
                "studentName": "再加一个",
                "studentIcon": "",
                "studentAge": 0,
                "studentSex": "女"
            },
            {
                "studentId": 116100,
                "studentName": "人数",
                "studentIcon": "",
                "studentAge": 0,
                "studentSex": "男"
            },
            {
                "studentId": 115414,
                "studentName": "大红",
                "studentIcon": "",
                "studentAge": 0,
                "studentSex": "男"
            }
        ]
    },
    "msg": "操作成功"
}

#

# 通过classId查询班级信息

# 请求路径

/class/v1/classInfo

# 请求方式

get

# 请求参数

参数名 类型 名称 必填 说明
classId Long 班级id

# 返回结果

字段 字型 名称 字段解释
classId Long 班级id
schoolId Long 学校id
className String 班级名称
customName String 昵称
gradeId Long 年级id
classTypeId Long 班级类型id
gradeName String 年级名称
classTypeName String 班级类型名称
classAdviserId String 班主任id
classAdviserName String 班主任名称

# 请求示例

/class/v1/classInfo?classId=1

# 调用成后返回如下

{
    "code": 200,
    "success": true,
    "data": {
        "classId": 29509,
        "schoolId": 6101130178,
        "className": "1班",
        "customName": "葡萄",
        "gradeId": 3,
        "classTypeId": 0,
        "gradeName":"",
        "classTypeName":"",
        "classAdviserId":"",
        "classAdviserName":""
    },
    "msg": "操作成功"
}
Last Updated: 12/9/2020, 7:37:32 PM