fix: 教师携带学生账号查询学生参数信息

This commit is contained in:
TsMask
2024-07-11 17:43:56 +08:00
parent 7abde21e4d
commit 12025f6ac7

View File

@@ -90,6 +90,7 @@ func (s *PtNeConfigDataController) Info(c *gin.Context) {
var querys struct {
NeType string `form:"neType" binding:"required"`
ParamName string `form:"paramName" binding:"required"`
Student string `form:"student"` // 教师携带学生账号查询
}
if err := c.ShouldBindQuery(&querys); err != nil {
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
@@ -106,6 +107,11 @@ func (s *PtNeConfigDataController) Info(c *gin.Context) {
}
if v.RoleKey == "teacher" {
stubType = "1"
// 查看学生数据
if querys.Student != "" {
currentUserName = querys.Student
stubType = "2"
}
}
if v.RoleKey == "student" {
stubType = "2"