Commit 72b561aa authored by liudong1993's avatar liudong1993

教师课程调整

parent 1a144e1f
......@@ -4,4 +4,9 @@
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Mall.Model\Mall.Model.csproj" />
<ProjectReference Include="..\Mall.Repository\Mall.Repository.csproj" />
</ItemGroup>
</Project>
......@@ -38,10 +38,6 @@ LEFT JOIN rb_education_teacher as et on tc.TeacherId=et.ID
{
sb.AppendFormat(" and tc.MallBaseId={0}", where.MallBaseId);
}
if (where.MallBaseId > 0)
{
sb.AppendFormat(" and tc.MallBaseId={0}", where.MallBaseId);
}
if (where.CourseClassId > 0)
{
sb.AppendFormat(" and tc.CourseClassId={0}", where.CourseClassId);
......@@ -91,10 +87,6 @@ LEFT JOIN rb_education_teacher as et on tc.TeacherId=et.ID
{
sb.AppendFormat(" and MallBaseId={0}", where.MallBaseId);
}
if (where.MallBaseId > 0)
{
sb.AppendFormat(" and MallBaseId={0}", where.MallBaseId);
}
if (where.CourseClassId > 0)
{
sb.AppendFormat(" and CourseClassId={0}", where.CourseClassId);
......@@ -146,10 +138,6 @@ left join (SELECT CourseId,SUM(case when OrderStaus =2 then 1 else 0 end) AS Con
{
sb.AppendFormat(" and tc.MallBaseId={0}", where.MallBaseId);
}
if (where.MallBaseId > 0)
{
sb.AppendFormat(" and tc.MallBaseId={0}", where.MallBaseId);
}
if (where.CourseClassId > 0)
{
sb.AppendFormat(" and tc.CourseClassId={0}", where.CourseClassId);
......@@ -173,11 +161,11 @@ left join (SELECT CourseId,SUM(case when OrderStaus =2 then 1 else 0 end) AS Con
if (where.CourseStudyState > 0) {
if (where.CourseStudyState == 1)
{
sb.AppendFormat(" AND CONCAT(DATE_FORMAT(StudyDate,'%Y-%m-%d'),' ',StudyEndDate) >= '{1}' ", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
sb.AppendFormat(" AND CONCAT(DATE_FORMAT(StudyDate,'%Y-%m-%d'),' ',StudyEndDate) >= '{0}' ", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
}
else if (where.CourseStudyState == 2)
{
sb.AppendFormat(" AND CONCAT(DATE_FORMAT(StudyDate,'%Y-%m-%d'),' ',StudyEndDate) < '{1}' ", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
sb.AppendFormat(" AND CONCAT(DATE_FORMAT(StudyDate,'%Y-%m-%d'),' ',StudyEndDate) < '{0}' ", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
}
}
}
......
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