Commit bdb034f2 authored by 吴春's avatar 吴春

新增电商商户id与小程序id

parent 94e9b6e5
...@@ -23,12 +23,19 @@ namespace Property.Repository ...@@ -23,12 +23,19 @@ namespace Property.Repository
{ {
string where = " where 1=1 "; string where = " where 1=1 ";
where += string.Format(" AND {0}={1}", nameof(RB_Supplies_WareHouse_Extend.Status), 0); where += string.Format(" AND {0}={1}", nameof(RB_Supplies_WareHouse_Extend.Status), 0);
where += $@" and RB_Group_Id={dmodel.RB_Group_Id}"; where += $@" and RB_Group_Id={dmodel.RB_Group_Id}";
if (!string.IsNullOrWhiteSpace(dmodel.Name.Trim())) if (!string.IsNullOrWhiteSpace(dmodel.Name.Trim()))
{ {
where += " and " + nameof(RB_Supplies_WareHouse_Extend.Name) + " like '%" + dmodel.Name.Trim() + "%'"; where += " and " + nameof(RB_Supplies_WareHouse_Extend.Name) + " like '%" + dmodel.Name.Trim() + "%'";
} }
if (dmodel.TenantId > 0)
{
where += " and " + nameof(RB_Supplies_WareHouse_Extend.TenantId) + "="+ dmodel.TenantId;
}
if (dmodel.MallBaseId > 0)
{
where += " and " + nameof(RB_Supplies_WareHouse_Extend.MallBaseId) + "=" + dmodel.MallBaseId;
}
string sql = $@" select * from RB_Supplies_WareHouse {where} order by Id desc"; string sql = $@" select * from RB_Supplies_WareHouse {where} order by Id desc";
return GetPage<RB_Supplies_WareHouse_Extend>(pageIndex, pageSize, out count, sql).ToList(); return GetPage<RB_Supplies_WareHouse_Extend>(pageIndex, pageSize, out count, sql).ToList();
} }
...@@ -48,7 +55,16 @@ namespace Property.Repository ...@@ -48,7 +55,16 @@ namespace Property.Repository
{ {
where += " and " + nameof(RB_Supplies_WareHouse_Extend.Name) + " like '%" + dmodel.Name + "%'"; where += " and " + nameof(RB_Supplies_WareHouse_Extend.Name) + " like '%" + dmodel.Name + "%'";
} }
if (!string.IsNullOrEmpty(dmodel.WareHouseIdStr)) { if (dmodel.TenantId > 0)
{
where += " and " + nameof(RB_Supplies_WareHouse_Extend.TenantId) + "=" + dmodel.TenantId;
}
if (dmodel.MallBaseId > 0)
{
where += " and " + nameof(RB_Supplies_WareHouse_Extend.MallBaseId) + "=" + dmodel.MallBaseId;
}
if (!string.IsNullOrEmpty(dmodel.WareHouseIdStr))
{
where += $@" and {nameof(RB_Supplies_WareHouse.Id)} in ({dmodel.WareHouseIdStr})"; where += $@" and {nameof(RB_Supplies_WareHouse.Id)} in ({dmodel.WareHouseIdStr})";
} }
......
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