golang-yitisheng-server/Task4.md

23 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

我需要写一个接口用来保存用户的成绩信息。POST格式。
请求体:
```json
{
"CognitioPolyclinic": "文理分科",
"SubjectList": [
"科目1","科目2","科目3"
],
"ProfessionalCategory": "专业方向",
"ProfessionalCategoryChildren": ["专业子级方向1", "专业子级方向2", "专业子级方向3"],
"ProfessionalCategoryChildrenScore": {
"专业子级方向1": "专业子级方向1成绩分",
"专业子级方向2": "专业子级方向2成绩分",
"专业子级方向3": "专业子级方向3成绩分",
},
"ProfessionalScore": "专业成绩分",
"CulturalScore": "文化成绩分",
"EnglishScore": "英语成绩分",
"ChineseScore": "语文成绩分",
"Province": "省份",
}
```
帮我写一个接口用来保存用户的成绩信息。POST格式。同时校验这些参数是否有效这些都是必传值不能为空。CognitioPolyclinic=文科/理科。SubjectList只能包含"地理"、"政治"、"历史"、"化学"、"生物"有且只能传两个值关于成绩的值只能0-300。然后你写个插入到yx_user_score表的方法。