Commit 92cc6561 authored by 黄奎's avatar 黄奎

ClassIn学生接口调整

parent f87b925c
......@@ -63,7 +63,7 @@ namespace EduSpider.Spiders.ClassInRule
var stuArray = (data["studentList"] as JArray);
foreach (JObject x in stuArray)
{
stus.Add(new rb_student_hk()
var xModel = new rb_student_hk()
{
AddTime = ConvertHelper.UnixToDateTime(x.GetString("addTime")),
StudentAccount = x.GetString("studentAccount"),
......@@ -76,7 +76,16 @@ namespace EduSpider.Spiders.ClassInRule
StudentName = x.GetString("studentName"),
StudentUid = x.GetInt("studentUid", 0),
Stuno = x.GetString("stuno"),
});
};
if (string.IsNullOrEmpty(xModel.StudentAccount))
{
string mobile = x.GetString("mobile");
if (!string.IsNullOrEmpty(mobile))
{
xModel.StudentAccount = mobile;
}
}
stus.Add(xModel);
}
courseRepository.BatchSetStudent(stus);
InfoHelper.WriteLine($"已导入第{pageIndex}-{pageSize}页学员信息");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment