158 lines
5.2 KiB
C#
158 lines
5.2 KiB
C#
using HL_FristAidPlatform_DataBase;
|
|
using HL_FristAidPlatform_Help;
|
|
using HL_FristAidPlatform_IDataBase;
|
|
using HL_FristAidPlatform_Models;
|
|
|
|
namespace HL_FristAidPlatform_Bussiness
|
|
{
|
|
/// <summary>
|
|
/// 系统用户与各中心数据平台用户对应表
|
|
/// </summary>
|
|
public class T_SYS_UserMatchCentreBLL
|
|
{
|
|
private IT_SYS_UserMatchCentre IService = new T_SYS_UserMatchCentreDB();
|
|
|
|
#region 增
|
|
/// <summary>
|
|
/// 增加一条数据
|
|
/// </summary>
|
|
/// <param name="model">实体</param>
|
|
/// <returns></returns>
|
|
public MessageModel<T_SYS_UserMatchCentre> Add(T_SYS_UserMatchCentre model)
|
|
{
|
|
if (IService.Add(model))
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 新增 仅更新赋值的字段
|
|
/// </summary>
|
|
/// <param name="model"></param>
|
|
/// <returns></returns>
|
|
public MessageModel<T_SYS_UserMatchCentre> AddNotNullColumns(T_SYS_UserMatchCentre model)
|
|
{
|
|
if (IService.AddNotNullColumns(model) > 0)
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 删
|
|
/// <summary>
|
|
/// 删除一条数据
|
|
/// </summary>
|
|
/// <param name="ID">主键</param>
|
|
/// <returns></returns>
|
|
public MessageModel<T_SYS_UserMatchCentre> Delete(long ID)
|
|
{
|
|
if (IService.Delete(ID))
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 逻辑删除
|
|
/// </summary>
|
|
/// <param name="model">实体类</param>
|
|
/// <returns></returns>
|
|
public MessageModel<T_SYS_UserMatchCentre> LogicalDelete(T_SYS_UserMatchCentre model)
|
|
{
|
|
if (IService.LogicalDelete(model) > 0)
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 改
|
|
/// <summary>
|
|
/// 更新一条数据
|
|
/// </summary>
|
|
/// <param name="model">实体</param>
|
|
/// <returns></returns>
|
|
public MessageModel<T_SYS_UserMatchCentre> Update(T_SYS_UserMatchCentre model)
|
|
{
|
|
if (IService.Update(model))
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 仅更新赋值的字段
|
|
/// </summary>
|
|
/// <param name="model">实体类</param>
|
|
/// <returns></returns>
|
|
public MessageModel<T_SYS_UserMatchCentre> UpdateNotNullColumns(T_SYS_UserMatchCentre model)
|
|
{
|
|
if (IService.UpdateNotNullColumns(model) > 0)
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = true, Msg = "操作成功" };
|
|
}
|
|
else
|
|
{
|
|
return new MessageModel<T_SYS_UserMatchCentre> { Success = false, Msg = "操作失败" };
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 查
|
|
/// <summary>
|
|
/// 得到一个对象实体
|
|
/// </summary>
|
|
/// <param name="guid">主键</param>
|
|
/// <returns></returns>
|
|
public T_SYS_UserMatchCentre GetModel(string guid)
|
|
{
|
|
return IService.GetModel(guid);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据分页获得数据列表
|
|
/// </summary>
|
|
/// <param name="pageIndex">起始页</param>
|
|
/// <param name="pageSize">每页条数</param>
|
|
/// <param name="key">关键词</param>
|
|
/// <returns></returns>
|
|
public TableModel<T_SYS_UserMatchCentre> GetPageList(int pageIndex, int pageSize, string key)
|
|
{
|
|
return IService.GetPageList(pageIndex, pageSize, key);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 根据用户编号获取列表
|
|
/// </summary>
|
|
/// <param name="userId">用户编号</param>
|
|
/// <param name="systemModuleId">所属模块编号</param>
|
|
/// <returns></returns>
|
|
public TableModel<T_SYS_UserMatchCentre> GetByUserID(long userId, long systemModuleId)
|
|
{
|
|
return IService.GetByUserID(userId, systemModuleId);
|
|
}
|
|
#endregion
|
|
}
|
|
} |