Commit 8180f583 authored by 黄奎's avatar 黄奎

产品查询修改

parent bda0864e
...@@ -228,8 +228,14 @@ namespace Edu.Module.Course ...@@ -228,8 +228,14 @@ namespace Edu.Module.Course
if (list.Any()) if (list.Any())
{ {
string classIds = string.Join(",", list.Select(x => x.ClassId)); string classIds = string.Join(",", list.Select(x => x.ClassId));
string courseIds = string.Join(",", list.Select(qitem => qitem.CouseId));
//查询阶梯价格 //查询阶梯价格
List<RB_Course_Preferential_Extend> coursePreferentialList = new List<RB_Course_Preferential_Extend>();
var stepList = class_StepPriceRepository.GetClassStepPriceListRepository(new RB_Class_StepPrice_ViewModel() { QClassIds = classIds }); var stepList = class_StepPriceRepository.GetClassStepPriceListRepository(new RB_Class_StepPrice_ViewModel() { QClassIds = classIds });
coursePreferentialList = course_PreferentialRepository.GetCoursePreferentialListRepostory(new RB_Course_Preferential_Extend()
{
QCourseIds = courseIds
});
var otherCourseList = class_CourseRepository.GetClassCourseListRepository(new RB_Class_Course_Extend() { QClassIds = classIds }); var otherCourseList = class_CourseRepository.GetClassCourseListRepository(new RB_Class_Course_Extend() { QClassIds = classIds });
List<RB_Class_Plan_ViewModel> PlanFixed = new List<RB_Class_Plan_ViewModel>(); List<RB_Class_Plan_ViewModel> PlanFixed = new List<RB_Class_Plan_ViewModel>();
string k2classIds = string.Join(",", list.Where(x => x.ClassStyle == Common.Enum.Course.ClassStyleEnum.FixedDate).Select(x => x.ClassId)); string k2classIds = string.Join(",", list.Where(x => x.ClassStyle == Common.Enum.Course.ClassStyleEnum.FixedDate).Select(x => x.ClassId));
...@@ -239,6 +245,7 @@ namespace Edu.Module.Course ...@@ -239,6 +245,7 @@ namespace Edu.Module.Course
} }
foreach (var item in list) foreach (var item in list)
{ {
item.PreferentialList = coursePreferentialList?.Where(qitem => qitem.CourseId == item.CouseId)?.ToList() ?? new List<RB_Course_Preferential_Extend>();
item.ClassStepPriceList = stepList.Where(x => x.ClassId == item.ClassId).OrderBy(x => x.PersionNum).ToList(); item.ClassStepPriceList = stepList.Where(x => x.ClassId == item.ClassId).OrderBy(x => x.PersionNum).ToList();
item.OtherCourseList = otherCourseList?.Where(qitem => qitem.ClassId == item.ClassId)?.ToList() ?? new List<RB_Class_Course_Extend>(); item.OtherCourseList = otherCourseList?.Where(qitem => qitem.ClassId == item.ClassId)?.ToList() ?? new List<RB_Class_Course_Extend>();
item.DefaultTimeList = new List<ClassTimeItem>(); item.DefaultTimeList = new List<ClassTimeItem>();
......
...@@ -95,6 +95,23 @@ namespace Edu.WebApi.Controllers.Course ...@@ -95,6 +95,23 @@ namespace Edu.WebApi.Controllers.Course
x.OutRemark, x.OutRemark,
x.OrderStudentCount, x.OrderStudentCount,
SurplusNum, SurplusNum,
PreferentialList= x?.PreferentialList.Select(qitem=>new {
qitem.B2BCommissionMoney,
qitem.B2BCommissionType,
qitem.BuyNum,
qitem.CourseId,
qitem.EduCommissionMoney,
qitem.EduCommissionType,
qitem.Id,
qitem.PreferentialTerms,
qitem.PriceDiscountType,
qitem.PriceDiscountTypeStr,
qitem.PriceMoney,
qitem.PriceType,
qitem.SaleCommissionMoney,
qitem.SaleCommissionType,
qitem.SendNum,
}),
ClassStepPriceList = x.ClassStepPriceList.Select(z => new ClassStepPriceList = x.ClassStepPriceList.Select(z => new
{ {
z.ClassStepPriceId, z.ClassStepPriceId,
......
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