update
This commit is contained in:
parent
1682838d37
commit
77440dc935
|
|
@ -1,3 +1,6 @@
|
||||||
{
|
{
|
||||||
"kiroAgent.configureMCP": "Disabled"
|
"kiroAgent.configureMCP": "Disabled",
|
||||||
|
"cSpell.words": [
|
||||||
|
"Cognitio"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
我需要写一个接口,用来保存用户的成绩信息。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表的方法。
|
||||||
|
|
@ -11,7 +11,7 @@ var AppConfig = &appConfig{
|
||||||
},
|
},
|
||||||
// 安全配置
|
// 安全配置
|
||||||
Security: SecurityConfig{
|
Security: SecurityConfig{
|
||||||
Enable: true, // 是否启用安全校验
|
Enable: false, // 是否启用安全校验
|
||||||
HeaderKey: "X-App-Sign", // 请求头校验字段
|
HeaderKey: "X-App-Sign", // 请求头校验字段
|
||||||
SecretKey: "yts@2025#secure", // 签名密钥
|
SecretKey: "yts@2025#secure", // 签名密钥
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ var whiteList = []string{
|
||||||
"/api/auth/login",
|
"/api/auth/login",
|
||||||
"/api/auth/register",
|
"/api/auth/register",
|
||||||
"/swagger/",
|
"/swagger/",
|
||||||
|
"/swagger/index.html",
|
||||||
}
|
}
|
||||||
|
|
||||||
// AuthMiddleware 登录鉴权中间件
|
// AuthMiddleware 登录鉴权中间件
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ func generateSign(timestamp, secretKey string) string {
|
||||||
// 安全校验白名单
|
// 安全校验白名单
|
||||||
var securityWhitelist = []string{
|
var securityWhitelist = []string{
|
||||||
"/swagger/",
|
"/swagger/",
|
||||||
|
"/swagger/index.html",
|
||||||
}
|
}
|
||||||
|
|
||||||
func isSecurityWhitelist(path string) bool {
|
func isSecurityWhitelist(path string) bool {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue