# 比赛平台用户接口
## 修改需求
- 删除学生接口：当前接口直接从数据库内删除了学生，而不是写删除标记位del_flag；逻辑应该是：先判断当前学生是否有报名记录，如果有，则不允许删除，如果没有，则可删除，并将del_flag置为2。
- /app/registration/userList 接口，返回：需增加比赛地点；参赛人的报名的组别、学校名称、指导老师1、指导老师2.
- 




## 大平台接口
> 提供根据手机号查询学生信息；但不提供学生照片。
### 密钥和接口文档
 密码kBzrhWnEArk2AJskj8          账号Ekatong
 接口文档：https://wlkj.suzhou.edu.cn/space/api/edu_sz/index.html  接口文档
### 获取系统token
https://wlkj.suzhou.edu.cn/v1/api/edu/suzhou/app-user/login
POST application/json
{
   "name": "Ekatong",
   "password": "kBzrhWnEArk2AJskj8"
}
返回结果：7200s有效期
HTTP/1.1 200 OK
{
"code": 1,
"message": "SUCCESS",
"result": "55494ffd78ef4eb5b3281dbfbab1f3b5"
}

### 获取学生信息
1. 根据学生身份证号获取学生信息
https://wlkj.suzhou.edu.cn/v1/api/edu/suzhou/student/find-by-nationalId
POST application/json
{
   "token": "55494ffd78ef4eb5b3281dbfbab1f3b5",
   "nationalId": "33010219900101001"
}
Response:
{
   "code": 1,
   "message": "SUCCESS",
   "result": {
        "avatar": null,
        "className": null,
        "clazz": 70259,
        "enrollYear": 2022,
        "gender": 2,
        "grade": 12,
        "gradeName": "九年级",
        "name": "徐可馨",
        "nationalId": "Wqa75Z9mKyWxaiJTcFqFGyonmTLi/xvmX9GqavsVAt8=",
        "parents": null,
        "phone": null,
        "relation": null,
        "schoolId": 1731,
        "schoolName": "苏州市吴中区木渎实验中学",
        "status": 1
   }
}
2. 根据家长身份证或手机获取

https://wlkj.suzhou.edu.cn/v1/api/edu/suzhou/student/find-by-parent
POST application/json,nationalId和phone任选其一
{
   "token": "55494ffd78ef4eb5b3281dbfbab1f3b5",
   "nationalId": "320586198111298814",
   "phone": "17706212809"
}

Response:
{
    "code": 1,
    "message": "SUCCESS",
    "result": [
        {
            "avatar": null,
            "className": "2210",
            "clazz": 70259,
            "enrollYear": 2022,
            "gender": 2,
            "grade": 12,
            "gradeName": "九年级",
            "name": "徐可馨",
            "nationalId": "Wqa75Z9mKyWxaiJTcFqFGyonmTLi/xvmX9GqavsVAt8=",
            "parents": null,
            "phone": null,
            "relation": "父子",
            "schoolId": 1731,
            "schoolName": "苏州市吴中区木渎实验中学",
            "status": 1
        }
    ]
}
nationalId: AES解密，ECB 模式，key: "1c6e847bed8f49b5"

## E卡通接口
> 提供根据学生身份证号，查询学生信息；提供学生照片。
### 根据学生身份证获取信息
https://ekt1.suzhou.edu.cn/szcarddev/szcard/cardEntrance
POST application/json
{
        "sign":"ek8Ta83lM0Ba",
        "method":"getStudentInfo",
        "type":"01",//04:市民卡号，citizenCard
        "idCardNo":"320506201003100025",
        "appId":"Le6J0u14rVwOm8H4csT6pSi1c5dR7OOI"
}

Response:
{
    "birthday": "",
    "gradeName": "初中二年级",
    "gender": "1",
    "idCardNo": "320506201003100025",
    "regionName": "吴中区",
    "resultCode": "0",
    "className": "(10)班",
    "userName": "徐可馨",
    "imgUrl": "http://ekt.suzhou.edu.cn/group1/M00/08/15/rBIHN2AJL3aARW6RAA-mOHkosuE730.png",
    "returnCode": "0000",
    "returnMsg": "success",
    "phone": "",
    "gradeType": "0",
    "schoolName": "苏州市吴中区木渎实验中学",
    "ecardNumber": "0820189771"
}

照片需要把imgUrl改为https://ekt1.suzhou.edu.cn/xxxx

