Commit 5661bfca authored by 黄奎's avatar 黄奎

1111

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