Commit f5dd4810 authored by 黄奎's avatar 黄奎

页面修改

parent a22624e0
......@@ -5,10 +5,10 @@ using VT.FW.DB;
namespace Edu.Model.Entity.Customer
{
/// <summary>
/// 同行幸福存折实体类
/// </summary>
[Serializable]
/// <summary>
/// 客户幸福存折和返佣实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Customer_BalanceDetail
{
......@@ -40,7 +40,7 @@ namespace Edu.Model.Entity.Customer
/// <summary>
/// 类型 1存入 2扣除
/// </summary>
public int Type { get; set; }
public int BalanceType { get; set; }
/// <summary>
/// 变更金额
......
......@@ -6,9 +6,48 @@ using System.Text;
namespace Edu.Model.ViewModel.Customer
{
/// <summary>
/// 客户幸福存折扩展实体类
/// 客户幸福存折和返佣扩展实体类
/// </summary>
public class RB_Customer_BalanceDetail_ViewModel : RB_Customer_BalanceDetail
{
/// <summary>
/// 返佣类型字符串
/// </summary>
public string RebateTypeStr
{
get
{
string str = "";
if (this.RebateType == 1)
{
str = "返佣";
}
else
{
str = "幸福存折";
}
return str;
}
}
/// <summary>
/// 存入抵扣类型
/// </summary>
public string BalanceTypeStr
{
get
{
string str = "";
if (this.BalanceType == 1)
{
str = "存入";
}
else
{
str = "扣除";
}
return str;
}
}
}
}
......@@ -7,12 +7,12 @@ using System.Text;
namespace Edu.Module.Customer
{
/// <summary>
/// 同行幸福存折处理类
/// 客户幸福存折和返佣处理类
/// </summary>
public class CustomerBalanceDetailModule
{
/// <summary>
/// 同行幸福存折仓储层对象
/// 客户幸福存折和返佣仓储层对象
/// </summary>
private readonly RB_Customer_BalanceDetailRepository customer_BalanceDetailRepository = new RB_Customer_BalanceDetailRepository();
......
......@@ -8,7 +8,7 @@ using System.Linq;
namespace Edu.Repository.Customer
{
/// <summary>
/// 客户幸福存折仓储层
/// 客户幸福存折和返佣仓储层
/// </summary>
public class RB_Customer_BalanceDetailRepository : BaseRepository<RB_Customer_BalanceDetail>
{
......@@ -38,6 +38,18 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_BalanceDetail_ViewModel.CustomerId), query.CustomerId);
}
if (query.RebateType > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_BalanceDetail_ViewModel.RebateType), query.RebateType);
}
if (query.BalanceType > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_BalanceDetail_ViewModel.BalanceType), query.BalanceType);
}
if (query.OrderId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Customer_BalanceDetail_ViewModel.OrderId), query.OrderId);
}
}
return GetPage<RB_Customer_BalanceDetail_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
......
......@@ -32,6 +32,11 @@ namespace Edu.WebApi.Controllers.Customer
/// </summary>
private readonly CustomerTaskModule taskModule = new CustomerTaskModule();
/// <summary>
/// 客户幸福存折和返佣处理类对象
/// </summary>
private readonly CustomerBalanceDetailModule balanceDetailModule = new CustomerBalanceDetailModule();
#region 同行管理
/// <summary>
......@@ -324,5 +329,34 @@ namespace Edu.WebApi.Controllers.Customer
return ApiResult.Success(data: data);
}
#endregion
#region 客户幸福存折和返佣
/// <summary>
/// 获取同行任务分页列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetCustomerBalanceDetailPage()
{
var pageModel = JsonHelper.DeserializeObject<ResultPageModel>(RequestParm.Msg.ToString());
var query = new RB_Customer_BalanceDetail_ViewModel()
{
Group_Id = base.UserInfo.Group_Id,
RebateType = base.ParmJObj.GetInt("RebateType"),
BalanceType = base.ParmJObj.GetInt("BalanceType"),
CustomerId=base.ParmJObj.GetInt("CustomerId"),
OrderId=base.ParmJObj.GetInt("OrderId"),
};
var list = balanceDetailModule.GetCustomerBalanceDetailPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
foreach (var item in list)
{
}
pageModel.PageData = list;
pageModel.Count = rowsCount;
return ApiResult.Success(data: pageModel);
}
#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