Commit 442582d8 authored by liudong1993's avatar liudong1993

电商库存操作日志

parent 029e3439
using Mall.Common.AOP;
using Mall.Common.Enum.User;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Entity.Property
{
/// <summary>
/// 电商库存系统日志表实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Property_Log
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 来源id
/// </summary>
public int? SourceId
{
get;
set;
}
/// <summary>
/// 来源类型 1仓库操作 2商品操作 3 采购
/// </summary>
public int? Type
{
get;
set;
}
/// <summary>
/// 操作内容
/// </summary>
public string Content
{
get;
set;
}
/// <summary>
/// 操作人
/// </summary>
public int CreateBy
{
get;
set;
}
/// <summary>
/// CreateDate
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Property;
using System.Linq;
using Mall.Model.Entity.User;
namespace Mall.Repository.Property
{
/// <summary>
/// 商品订单日志仓储层
/// </summary>
public class RB_Property_LogRepository : RepositoryBase<RB_Property_Log>
{
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Property_Log> GetList(RB_Property_Log dmodel)
{
string where = $" 1=1 ";
if (dmodel.Type > 0)
{
where += $@" and {nameof(RB_Property_Log.Type)}={dmodel.Type}";
}
if (dmodel.SourceId > 0)
{
where += $@" and {nameof(RB_Property_Log.SourceId)}={dmodel.SourceId}";
}
string sql = $@"SELECT * FROM RB_Property_Log where {where} order by Id asc";
return Get<RB_Property_Log>(sql).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