fix: 配置操作指定有申请的学生直接应用或退回

This commit is contained in:
TsMask
2024-07-22 11:48:42 +08:00
parent 603500d581
commit 58f803d780

View File

@@ -124,9 +124,10 @@ func (s *PtNeConfigApplyController) Edit(c *gin.Context) {
// 指定有申请的学生直接应用 (管理/教师自身操作)
if body.ApplyId == "" && body.NeType != "" && body.Student != "" {
applyInfos := s.ptNeConfigApplyService.SelectList(model.PtNeConfigApply{CreateBy: body.Student})
applyInfos := s.ptNeConfigApplyService.SelectList(model.PtNeConfigApply{CreateBy: body.Student, NeType: body.NeType, Status: "0"})
if len(applyInfos) == 0 {
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
// 未找到申请信息
c.JSON(200, result.ErrMsg("Application Information Not Found"))
return
}
applyInfo := applyInfos[0]