Commit 42755e70 authored by 罗超's avatar 罗超

提交修改

parent 4916c6bf
...@@ -5,6 +5,7 @@ using System.Text; ...@@ -5,6 +5,7 @@ using System.Text;
using Edu.AOP.CustomerAttribute; using Edu.AOP.CustomerAttribute;
using Edu.Model.Entity.App; using Edu.Model.Entity.App;
using Edu.Repository.App; using Edu.Repository.App;
using Edu.Repository.System;
namespace Edu.Module.System namespace Edu.Module.System
{ {
...@@ -23,6 +24,8 @@ namespace Edu.Module.System ...@@ -23,6 +24,8 @@ namespace Edu.Module.System
/// </summary> /// </summary>
private readonly RB_HomePage_LableRepository homeLableRepository = new RB_HomePage_LableRepository(); private readonly RB_HomePage_LableRepository homeLableRepository = new RB_HomePage_LableRepository();
private readonly RB_StageRepository stageRepository= new RB_StageRepository();
#region 首页banner图片列表 #region 首页banner图片列表
/// <summary> /// <summary>
/// 获取学生app首页banner列表 /// 获取学生app首页banner列表
...@@ -98,5 +101,31 @@ namespace Edu.Module.System ...@@ -98,5 +101,31 @@ namespace Edu.Module.System
return flag; return flag;
} }
#endregion #endregion
#region 客户阶段
/// <summary>
/// 获取客户阶段以及数量
/// </summary>
/// <param name="gid"></param>
/// <param name="id"></param>
/// <returns></returns>
public Object GetPeersCustomerStageCount(int gid,int id)
{
var list = stageRepository.GetPeersCustomerStageCount(gid,id);
if (list != null && list.Count > 0)
{
var result = list.Select(x => new
{
x.Id,
x.StageName,
x.ChildCount
});
}
return list;
}
#endregion
} }
} }
using Edu.Model.Entity.System; using Edu.Model.Entity.System;
using Edu.Model.ViewModel.System;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.System namespace Edu.Repository.System
{ {
public class RB_StageRepository:BaseRepository<RB_Stage> public class RB_StageRepository:BaseRepository<RB_Stage>
{ {
/// <summary>
/// 查找指定同业下,各阶段客户数量
/// </summary>
/// <param name="gid"></param>
/// <param name="id"></param>
/// <returns></returns>
public List<RB_Stage_ViewModel> GetPeersCustomerStageCount(int gid,int id)
{
string sql = "select Id,StageName,`No`,(select Count(0) from rb_Student where CustomerId=@id and StuStage=a.Id) as ChildCount from rb_stage a where Group_Id=@gid order by `No`";
DynamicParameters parameters = new DynamicParameters();
parameters.Add("gid", gid);
parameters.Add("id", id);
return Get<RB_Stage_ViewModel>(sql, parameters).ToList();
}
} }
} }
...@@ -280,6 +280,15 @@ namespace Edu.WebApi.Controllers.APP ...@@ -280,6 +280,15 @@ namespace Edu.WebApi.Controllers.APP
#endregion
#region 获取客户阶段
public Object GetPeersCustomerStageCount()
{
return appHomePageModule.GetPeersCustomerStageCount(base.AppUserInfo.Group_Id, base.AppUserInfo.Id);
}
#endregion #endregion
} }
} }
...@@ -5,6 +5,7 @@ using Edu.Model.ViewModel.Grade; ...@@ -5,6 +5,7 @@ using Edu.Model.ViewModel.Grade;
using Edu.Model.ViewModel.Sell; using Edu.Model.ViewModel.Sell;
using Edu.Module.Course; using Edu.Module.Course;
using Edu.Module.Customer; using Edu.Module.Customer;
using Edu.Module.System;
using Edu.WebApi.Filter; using Edu.WebApi.Filter;
using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
...@@ -35,11 +36,16 @@ namespace Edu.WebApi.Controllers.B2BApp ...@@ -35,11 +36,16 @@ namespace Edu.WebApi.Controllers.B2BApp
/// </summary> /// </summary>
private readonly ClassModule classModule = new ClassModule(); private readonly ClassModule classModule = new ClassModule();
/// <summary> /// <summary>
/// 客户返佣和幸福存折处理类对象 /// 客户返佣和幸福存折处理类对象
/// </summary> /// </summary>
private readonly CustomerBalanceDetailModule customerBalanceDetailModule = new CustomerBalanceDetailModule(); private readonly CustomerBalanceDetailModule customerBalanceDetailModule = new CustomerBalanceDetailModule();
private readonly AppHomePageModule appHomePageModule = new AppHomePageModule();
/// <summary> /// <summary>
/// 同行获取学员订单分页列表 /// 同行获取学员订单分页列表
/// </summary> /// </summary>
...@@ -119,5 +125,15 @@ namespace Edu.WebApi.Controllers.B2BApp ...@@ -119,5 +125,15 @@ namespace Edu.WebApi.Controllers.B2BApp
var obj = classModule.AppCustomerGetClassPlan(StuId); var obj = classModule.AppCustomerGetClassPlan(StuId);
return ApiResult.Success(data: obj); return ApiResult.Success(data: obj);
} }
#region 获取客户阶段
public Object GetPeersCustomerStageCount()
{
var result = appHomePageModule.GetPeersCustomerStageCount(base.AppletCustomerInfo.GroupId, base.AppletCustomerInfo.CustomerId);
return ApiResult.Success(data: result,message:"OK");
}
#endregion
} }
} }
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