Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024年精弘毅行后端代码 #21

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
7abe80b
feat:修改管理员功能
Sep 29, 2024
3755607
fix:修改管理员获取队伍接口,可以提供code获取
Oct 2, 2024
07cea62
perf:给team的code添加索引
Oct 2, 2024
2555b69
fix:获取参数显示有无签到码绑定
Oct 2, 2024
a06eb6e
feat:新增makefile文件
Penryn Oct 8, 2024
d82dc85
perf:补充用户类型和优化师生注册的信息填写
Penryn Oct 8, 2024
dc8f93b
fix:将提交队伍改成学生抢提交资格,教师直接提交
Penryn Oct 8, 2024
a3395c1
fix:修改获取团队信息显示成员身份
Penryn Oct 8, 2024
832cdd8
docs:补充管理员路由接口的注释信息
Penryn Oct 8, 2024
6d8f88f
fix:修改makefile,使构建需要的二进制文件
Penryn Oct 11, 2024
30480e0
fix:修改教师注册的存储数据
Penryn Oct 11, 2024
006a5bc
fix:修改redis初始化的数据
Penryn Oct 11, 2024
d10db91
feat:新增补充记录管理端请求数据的中间件
Penryn Oct 11, 2024
fe7f225
fix:修改教师不能加入学生队伍
Penryn Oct 11, 2024
6623ffb
feat:新增校友登录的接口
Penryn Oct 11, 2024
9459df1
fix:修改日志记录格式
Penryn Oct 12, 2024
365986c
fix:修改校友登陆检测身份
Penryn Oct 12, 2024
0088f94
fix:修改个人状态时的不需要先绑定签到码
Penryn Oct 12, 2024
82ee724
fix:修改重组不能重复jwt和修复队长未修改状态的错误
Penryn Oct 12, 2024
916a5aa
fix(admin):修复重组后队伍编号未更新
Penryn Oct 12, 2024
ee48f57
fix(admin):修复教师未提交到集合
Penryn Oct 14, 2024
fc4535c
fix(admin):修复取消提交教师队仍能增加队伍数量
Penryn Oct 14, 2024
7f33a8c
fix(admin):修改redis导入mysql的时间限制
Penryn Oct 17, 2024
a82bfb9
fix(admin):修改后端响应的错误信息
Penryn Oct 17, 2024
595d59d
fix(admin):修改校友登录为导入成员都可登录
Penryn Oct 17, 2024
7e3e08c
feat(admin):新增查看各路线已报名的队伍和人员情况
Penryn Oct 17, 2024
2dbe386
fix(login):修改登录新增用户信息和更新队伍队长的openid
Penryn Oct 17, 2024
0f0a64e
feat(admin):新增终点确认功能
Penryn Oct 17, 2024
5b4a764
fix(admin):修改更改个人状态为批量更改
Penryn Oct 17, 2024
d8ef908
fix(admin):修改配置文件,补充前端测试url
Penryn Oct 17, 2024
22ab58f
fix(admin):修复登录未更改队伍队长的问题
Penryn Oct 18, 2024
66d7867
refactor: 重构注册、提交报名和中断中间件
Penryn Oct 31, 2024
f9db001
feat: 新增更换队长功能
Penryn Nov 2, 2024
4ea6ab4
refactor: 重构更改队伍信息不修改路线
Penryn Nov 3, 2024
c884273
fix: 修复非学生队长转交学生的权限问题和修复提交后还可更改队长的问题
Penryn Nov 3, 2024
98a5b01
fix: 修复转交队长失败的问题
Penryn Nov 6, 2024
c5510a6
perf: 优化只有已有资格的队伍才不能解散团队
Penryn Nov 6, 2024
c59edcd
refactor: 解除解散团队、更改团队信息、提交团队的限制
Penryn Nov 6, 2024
4a7251e
perf: 优化管理员打卡逻辑
Penryn Nov 20, 2024
9cd1417
perf: 优化个人签到逻辑
Penryn Nov 20, 2024
65ecc60
perf: 优化莫干山打卡逻辑
Penryn Nov 20, 2024
c09bc8f
refactor: 补充更新队伍状态时记录当前时间
Penryn Nov 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions config/config.example.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
server:
wechatAPPID: "" # 公众号开发者ID(AppID) 切记不可泄漏
wechatAPPID: "" # 公众号开发者ID(AppID) 切记不可泄漏,个人服务号没有权限使用网页授权,需要使用服务号
wechatSecret: "" # 公众号开发者密码(AppSecret) 切记不可泄漏
wechatRedirect: "" # 回调链接的地址(即授权后重定向的uri) 注:需要加 http/https
JWTSecret: "" # JWT 加密密钥
AESSecret: "" # AES 加密密钥
port: "8888"
wechatRedirect: "" # 回调链接的地址(即授权后重定向的login接口uri) 注:需要加 http/https
JWTSecret: "" # JWT 加密密钥,长度不限
AESSecret: "" # AES 加密密钥,长度为16位
port: ""
debug: true # 这个设置大多数情况下无法热更新 修改了这个配置后请重启服务器
secret: # 管理端高级功能的密码

frontend:
url: "" # 前端域名 注:需要加 http/https
url: "" # 正式环境前端域名 注:需要加 http/https
#url: "http://localhost:3000" # 前端测试域名 注:需要加 http/https

database:
host: "127.0.0.1"
Expand All @@ -23,8 +25,8 @@ redis:
password: ""
db: 0

startDate: "2021-11-01 00:00:00" # 报名开始的日期
expiredDate: "2021-11-10 00:00:00" # 报名结束的日期
startDate: "2024-10-08 00:00:00" # 报名开始的日期
expiredDate: "2024-10-18 00:00:00" # 报名结束的日期

teamUpperLimit: # 每天的团队上限
0: # 第一天
Expand All @@ -45,12 +47,7 @@ teamUpperLimit: # 每天的团队上限
3: 66
4: 75
5: 25
3: # 第四天
1: 150
2: 120
3: 99
4: 100
5: 50


QPS: 5000 # 任意一秒内最多可以接受的并发量
wechat: # 微信小程序相关配置 (切记不能泄漏)
Expand All @@ -63,4 +60,5 @@ number:
PF_Half:
PF_All:
MGS_Half:
MGS_All:
MGS_All:

18 changes: 18 additions & 0 deletions controller/admin/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,21 @@ func AuthWithoutCode(c *gin.Context) {
"jwt": jwtToken,
})
}

type BlockWithSecretForm struct {
Secret string `json:"secret" binding:"required"`
}

func BlockWithSecret(c *gin.Context) {
var postForm BlockWithSecretForm
err := c.ShouldBindJSON(&postForm)
if err != nil {
utility.ResponseError(c, "参数错误")
return
}
if postForm.Secret != global.Config.GetString("server.secret") {
utility.ResponseError(c, "密码错误")
return
}
utility.ResponseSuccess(c, nil)
}
Loading