Commit 246aa61a authored by 黄奎's avatar 黄奎

页面修改

parent cdb7537c
using Edu.Common.Enum;
using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB;
namespace Edu.Model.Entity.Customer
{
/// <summary>
/// 客户类型实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Student_Type
{
/// <summary>
/// 主键编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 客户类型名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Info { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 修改人
/// </summary>
public int UpdateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime UpdateTime { get; set; }
/// <summary>
/// 集团编号
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 删除状态(0-正常,1-删除)
/// </summary>
public DateStateEnum Status { get; set; }
/// <summary>
/// 排序
/// </summary>
public int No { get; set; }
}
}
using Edu.Model.Entity.Customer;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Model.ViewModel.Customer
{
/// <summary>
/// 客户类型扩展实体类
/// </summary>
public class RB_Student_Type_Extend : RB_Student_Type
{
}
}
using Edu.Common.Enum;
using Edu.Model.Entity.Customer;
using Edu.Model.ViewModel.Customer;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Edu.Repository.Customer
{
/// <summary>
/// 客户类型仓储层
/// </summary>
public class RB_Student_TypeRepository : BaseRepository<RB_Student_Type>
{
/// <summary>
/// 获取客户类型列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Student_Type_Extend> GetStudentTypeListRepository(RB_Student_Type_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Student_Type AS A
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Type_Extend.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Student_Type_Extend.Group_Id), query.Group_Id);
}
}
builder.AppendFormat(" ORDER BY A.{0} ASC ", nameof(RB_Student_Type_Extend.No));
return Get<RB_Student_Type_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