Commit 56524419 authored by 黄奎's avatar 黄奎

111

parent c0d0bacb
...@@ -32,31 +32,39 @@ namespace EduSpider.Repository ...@@ -32,31 +32,39 @@ namespace EduSpider.Repository
StuUid = item.StuUid, StuUid = item.StuUid,
HomeWorkId = item.HomeWorkId, HomeWorkId = item.HomeWorkId,
}).FirstOrDefault(); }).FirstOrDefault();
string createTimeStr = "";
if (defaultModel != null) if (VTX.FW.Helper.ConvertHelper.FormatDate(item.CreateTime) != "")
{ {
createTimeStr = VTX.FW.Helper.ConvertHelper.FormatTime(defaultModel.CreateTime.AddSeconds(1));
} }
else else
{ {
var homeWorkModel = new StuHomeWorkRepository().GetStuHomeWorkDetailsListRepository(new CourseQuery() string createTimeStr = "";
if (defaultModel != null)
{ {
CourseId = item.CourseId, createTimeStr = VTX.FW.Helper.ConvertHelper.FormatTime(defaultModel.CreateTime.AddSeconds(1));
HomeWorkId = item.HomeWorkId, }
StuIds = item.StuUid.ToString() else
}).FirstOrDefault();
if (homeWorkModel != null)
{ {
createTimeStr = VTX.FW.Helper.ConvertHelper.FormatTime(homeWorkModel.add_time.AddSeconds(1)); var homeWorkModel = new StuHomeWorkRepository().GetStuHomeWorkDetailsListRepository(new CourseQuery()
{
CourseId = item.CourseId,
HomeWorkId = item.HomeWorkId,
StuIds = item.StuUid.ToString()
}).FirstOrDefault();
if (homeWorkModel != null)
{
createTimeStr = VTX.FW.Helper.ConvertHelper.FormatTime(homeWorkModel.add_time.AddSeconds(1));
}
}
if (!string.IsNullOrEmpty(createTimeStr))
{
item.CreateTime = Convert.ToDateTime(createTimeStr);
}
else
{
item.CreateTime = DateTime.Now;
} }
}
if (!string.IsNullOrEmpty(createTimeStr))
{
item.CreateTime = Convert.ToDateTime(createTimeStr);
}
else
{
item.CreateTime = DateTime.Now;
} }
// flag = base.Insert(item) > 0; // flag = base.Insert(item) > 0;
} }
......
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