Commit 90e83d59 authored by 黄奎's avatar 黄奎

2222

parent def8be30
...@@ -322,16 +322,18 @@ namespace EduSpider.Spiders.ClassInRule ...@@ -322,16 +322,18 @@ namespace EduSpider.Spiders.ClassInRule
CourseId = courseModel.CourseId, CourseId = courseModel.CourseId,
TeacherIds=courseModel.TeacherUid.ToString() TeacherIds=courseModel.TeacherUid.ToString()
}).FirstOrDefault(); }).FirstOrDefault();
teacherList.Add(new RB_Course_Teacher() int newId =Convert.ToInt32(DateTime.Now.ToString("yyyyMMdd"));
var courseTeacher = new RB_Course_Teacher()
{ {
id = cTeacherModel?.id ?? 0, id = cTeacherModel?.id ?? newId,
uid = Convert.ToInt32(courseModel.TeacherUid), uid = Convert.ToInt32(courseModel.TeacherUid),
phone = courseModel.TeacherAccount, phone = courseModel.TeacherAccount,
logo = courseModel.TeacherLogo, logo = courseModel.TeacherLogo,
name = courseModel.TeacherName, name = courseModel.TeacherName,
courseId = courseId, courseId = courseId,
courseTeacherId = courseModel.TeacherId courseTeacherId = courseModel.TeacherId
}); };
teacherList.Add(courseTeacher);
} }
} }
if (list != null && list.Count > 0) if (list != null && list.Count > 0)
......
...@@ -108,7 +108,6 @@ namespace EduSpider.Spiders.ClassInRule ...@@ -108,7 +108,6 @@ namespace EduSpider.Spiders.ClassInRule
public static void RequestExamDetail(string cookie,int courseId, int examId, int tid,ref RB_HomeWork m) public static void RequestExamDetail(string cookie,int courseId, int examId, int tid,ref RB_HomeWork m)
{ {
var request = Utility.HttpHelper.GenerateHttp(cookie); var request = Utility.HttpHelper.GenerateHttp(cookie);
VTX.FW.Helper.LogHelper.WriteInfo("RequestExamDetail", $"正在查询测验详细信息"); VTX.FW.Helper.LogHelper.WriteInfo("RequestExamDetail", $"正在查询测验详细信息");
var paramStr = $"courseId={courseId}&examsId=[{examId}]&teachersId=[{tid}]&page=1&perpage=20"; var paramStr = $"courseId={courseId}&examsId=[{examId}]&teachersId=[{tid}]&page=1&perpage=20";
var content = new StringContent(paramStr, System.Text.Encoding.UTF8, "application/x-www-form-urlencoded"); var content = new StringContent(paramStr, System.Text.Encoding.UTF8, "application/x-www-form-urlencoded");
...@@ -116,26 +115,28 @@ namespace EduSpider.Spiders.ClassInRule ...@@ -116,26 +115,28 @@ namespace EduSpider.Spiders.ClassInRule
var resultStr = response.Result.Content.ReadAsStringAsync().Result ?? string.Empty; var resultStr = response.Result.Content.ReadAsStringAsync().Result ?? string.Empty;
var result = resultStr.TryToJObject(); var result = resultStr.TryToJObject();
if (result.flag) if (result.flag)
{ {
var data = (result.val.ContainsKey("data") ? result.val["data"] : new JObject()) as JObject; var data = (result.val.ContainsKey("data") ? result.val["data"] : new JObject()) as JObject;
var homeObj = (data["examsData"] as JArray)?.FirstOrDefault() as JObject; var homeObj = (data["examsData"] as JArray)?.FirstOrDefault() as JObject;
m.Num = homeObj.GetInt("shouldStSum"); if (homeObj != null)
m.Cream_num = homeObj.GetInt("excellentStSum"); {
m.Revised_num = 0; //未匹配数据; m.Num = homeObj.GetInt("shouldStSum");
m.Rnum = homeObj.GetInt("beReviewStSum"); m.Cream_num = homeObj.GetInt("excellentStSum");
m.Cnum = homeObj.GetInt("endStSum"); m.Revised_num = 0; //未匹配数据;
m.Rnum = homeObj.GetInt("beReviewStSum");
m.Cnum = homeObj.GetInt("endStSum");
m.Score_value = homeObj.GetDecimal("score_value"); m.Score_value = homeObj.GetDecimal("score_value");
m.Th_cancel = string.Empty; m.Th_cancel = string.Empty;
m.Ref_num = homeObj.GetInt("needReStSum"); m.Ref_num = homeObj.GetInt("needReStSum");
m.Refc_num = homeObj.GetInt("alreadyReStSum"); m.Refc_num = homeObj.GetInt("alreadyReStSum");
m.Av_score = homeObj.GetDecimal("averageScore")/100; m.Av_score = homeObj.GetDecimal("averageScore") / 100;
m.Max_score = homeObj.GetDecimal("highestScore")/100; m.Max_score = homeObj.GetDecimal("highestScore") / 100;
m.Min_score = homeObj.GetDecimal("lowestScore")/100; m.Min_score = homeObj.GetDecimal("lowestScore") / 100;
}
} }
} }
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
"DefaultConnectionPName": "MySql.Data.MySqlClient" "DefaultConnectionPName": "MySql.Data.MySqlClient"
}, },
//ĬToken //ĬToken
"DefaultToken": "" "DefaultToken": "sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%2212780052%22%2C%22first_id%22%3A%22180f59907abbed-081e4952c5b26f-12333272-2073600-180f59907acbc8%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22%24device_id%22%3A%22180f59907abbed-081e4952c5b26f-12333272-2073600-180f59907acbc8%22%7D; PHPSESSID=pv72vus2bq8l9t7dsa5c8f6ll2; locationArgumentLang=zh-CN; __tk_id=983ff2e12cab08755cb345a7043f801b; _eeos_uid=12780052; _eeos_useraccount=18140082327; _eeos_userlogo=%2Fupload%2Fimages%2F20200126%2F709df9532bee722f2268_70.jpg; _eeos_domain=.eeo.cn; _eeos_remember=1; _eeos_traffic=EqlIOFq4S2hz5FTTtHzNUViBYcWCixrJYMCF6Y5yJuD8eq8ZwPvVSHMvUkLFA5lzNoaTrDBpGhEJ4HgSuhP1iF%2B0dGt1KgDzV1r8UBfonWA%3D; _eeos_sid=12780052; _eeos_nsid=kspGu2gfMu%2BU2EFgLpSGyg%3D%3D"
} }
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