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

2222

parent def8be30
......@@ -322,16 +322,18 @@ namespace EduSpider.Spiders.ClassInRule
CourseId = courseModel.CourseId,
TeacherIds=courseModel.TeacherUid.ToString()
}).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),
phone = courseModel.TeacherAccount,
logo = courseModel.TeacherLogo,
name = courseModel.TeacherName,
courseId = courseId,
courseTeacherId = courseModel.TeacherId
});
};
teacherList.Add(courseTeacher);
}
}
if (list != null && list.Count > 0)
......
......@@ -108,7 +108,6 @@ namespace EduSpider.Spiders.ClassInRule
public static void RequestExamDetail(string cookie,int courseId, int examId, int tid,ref RB_HomeWork m)
{
var request = Utility.HttpHelper.GenerateHttp(cookie);
VTX.FW.Helper.LogHelper.WriteInfo("RequestExamDetail", $"正在查询测验详细信息");
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");
......@@ -116,11 +115,12 @@ namespace EduSpider.Spiders.ClassInRule
var resultStr = response.Result.Content.ReadAsStringAsync().Result ?? string.Empty;
var result = resultStr.TryToJObject();
if (result.flag)
{
var data = (result.val.ContainsKey("data") ? result.val["data"] : new JObject()) as JObject;
var homeObj = (data["examsData"] as JArray)?.FirstOrDefault() as JObject;
if (homeObj != null)
{
m.Num = homeObj.GetInt("shouldStSum");
m.Cream_num = homeObj.GetInt("excellentStSum");
m.Revised_num = 0; //未匹配数据;
......@@ -133,9 +133,10 @@ namespace EduSpider.Spiders.ClassInRule
m.Ref_num = homeObj.GetInt("needReStSum");
m.Refc_num = homeObj.GetInt("alreadyReStSum");
m.Av_score = homeObj.GetDecimal("averageScore")/100;
m.Max_score = homeObj.GetDecimal("highestScore")/100;
m.Min_score = homeObj.GetDecimal("lowestScore")/100;
m.Av_score = homeObj.GetDecimal("averageScore") / 100;
m.Max_score = homeObj.GetDecimal("highestScore") / 100;
m.Min_score = homeObj.GetDecimal("lowestScore") / 100;
}
}
}
......
......@@ -5,5 +5,5 @@
"DefaultConnectionPName": "MySql.Data.MySqlClient"
},
//Ĭ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