Commit a964fe06 authored by 黄奎's avatar 黄奎

查询修改

parent b1766434
......@@ -4,6 +4,7 @@ using System.Text;
using Mall.Model.Entity.Assess;
using Mall.Model.Extend.Assess;
using System.Linq;
using VT.FW.DB.Dapper;
namespace Mall.Repository.Assess
{
......@@ -23,6 +24,7 @@ namespace Mall.Repository.Assess
/// <returns></returns>
public List<RB_Assess_Category_Extend> GetPageList(int pageIndex, int pageSize, out long rowCount, RB_Assess_Category_Extend dmodel)
{
var parameters = new DynamicParameters();
string where = $" 1=1 and e.{nameof(RB_Assess_Category_Extend.Status)}=0 ";
if (dmodel.TenantId > 0) {
where += $@" and e.{nameof(RB_Assess_Category_Extend.TenantId)}={dmodel.TenantId}";
......@@ -39,8 +41,13 @@ namespace Mall.Repository.Assess
{
where += $@" and e.{nameof(RB_Assess_Category_Extend.Id)} ={dmodel.Id}";
}
if (!string.IsNullOrEmpty(dmodel.Name))
{
where += $@" and e.{nameof(RB_Assess_Category_Extend.Name)} like @Name";
parameters.Add("Name", "%" + dmodel.Name + "%");
}
string sql = $@"select * from RB_Assess_Category e where {where} order by e.Id desc";
return GetPage<RB_Assess_Category_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
return GetPage<RB_Assess_Category_Extend>(pageIndex, pageSize, out rowCount, sql, parameters).ToList();
}
/// <summary>
......
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