Commit 170b242e authored by 黄奎's avatar 黄奎

页面修改

parent 9cf9fe54
using Edu.Common.Enum;
using Edu.Model.Entity.Sell;
using Edu.Model.ViewModel.Sell;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace Edu.Repository.Sell
{
/// <summary>
/// 课程顾问、市场达标奖金配置仓储层
/// </summary>
public class RB_Bonus_PlanRepository : BaseRepository<RB_Bonus_Plan>
{
/// <summary>
/// 获取课程顾问、市场达标奖金配置分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Bonus_PlanExtend> GetBounsPlanDetailListRepository(int pageIndex,int pageSize,out long rowsCount,RB_Bonus_PlanExtend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Bonus_Plan AS A
WHERE 1=1
");
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Bonus_PlanExtend.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Bonus_PlanExtend.Group_Id), query.Group_Id);
}
}
return GetPage<RB_Bonus_PlanExtend>(pageIndex,pageSize,out rowsCount,builder.ToString()).ToList();
}
/// <summary>
/// 获取课程顾问、市场达标奖金配置列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Bonus_PlanExtend> GetBounsPlanDetailListRepository(RB_Bonus_PlanExtend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Bonus_Plan AS A
WHERE 1=1
");
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Bonus_PlanExtend.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Bonus_PlanExtend.Group_Id), query.Group_Id);
}
}
return Get<RB_Bonus_PlanExtend>(builder.ToString()).ToList();
}
}
}
using Edu.Common.Enum;
using Edu.Model.Entity.Sell;
using Edu.Model.ViewModel.Sell;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Edu.Repository.Sell
{
/// <summary>
/// 课程顾问、市场达标奖金配置阶梯仓储层
/// </summary>
public class RB_Bouns_PlanDetailRepository : BaseRepository<RB_Bouns_PlanDetail>
{
/// <summary>
/// 获取课程顾问、市场达标奖金配置阶梯列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Bouns_PlanDetail_Extend> GetBounsPlanDetailListRepository(RB_Bouns_PlanDetail_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Bouns_PlanDetail AS A
WHERE 1=1
");
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Bouns_PlanDetail_Extend.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.PlanId > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Bouns_PlanDetail_Extend.PlanId), query.PlanId);
}
}
return Get<RB_Bouns_PlanDetail_Extend>(builder.ToString()).ToList();
}
}
}
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