修复 更新学生学科 导致的学科枚举转换异常问题 #52
|
|
@ -424,14 +424,18 @@ namespace Learn.Archives.API.Controllers
|
|||
var subjectArr = row.高考选科.Split(",")
|
||||
.Select(s => s.ToEnum<SubjectEnum>())
|
||||
.ToArray();
|
||||
userCenterUpdate.Add(new User
|
||||
var upUser = new User
|
||||
{
|
||||
Id = uid,
|
||||
Phone = row.Phone,
|
||||
GLSubject = (int?)subjectArr[0],
|
||||
GSubject1 = (int?)subjectArr[1],
|
||||
GSubject2 = (int?)subjectArr[2],
|
||||
});
|
||||
};
|
||||
if (subjectArr.Length > 0)
|
||||
upUser.GLSubject = (int?)subjectArr[0];
|
||||
if (subjectArr.Length > 1)
|
||||
upUser.GSubject1 = (int?)subjectArr[1];
|
||||
if (subjectArr.Length > 2)
|
||||
upUser.GSubject2 = (int?)subjectArr[2];
|
||||
userCenterUpdate.Add(upUser);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue