Commit 167db761 authored by 黄奎's avatar 黄奎

查询修改

parent 16effd7d
......@@ -24,6 +24,7 @@ namespace Mall.Repository.Product
/// <returns></returns>
public List<RB_Goods_Extend> GetPageList(int pageIndex, int pageSize, out long rowCount, RB_Goods_Extend dmodel, bool IsAllClassify = false)
{
DynamicParameters parameters = new DynamicParameters();
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 ";
if (dmodel.GoodsClassify == 3)
{//查询非司导商品
......@@ -63,7 +64,8 @@ namespace Mall.Repository.Product
}
if (!string.IsNullOrEmpty(dmodel.Name))
{
where += $@" and g.{nameof(RB_Goods_Extend.Name)} like '%{dmodel.Name}%'";
where += $@" and g.{nameof(RB_Goods_Extend.Name)} like @Name ";
parameters.Add("Name", "%" + dmodel.Name.Trim() + "%");
}
if (dmodel.GoodsStatus > 0)
{
......@@ -153,7 +155,7 @@ namespace Mall.Repository.Product
string sql = $@"select g.* from RB_Goods g
inner join rb_goods_category c on g.Id=c.GoodsId
where {where} group by g.Id order by {orderBy}";
return GetPage<RB_Goods_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
return GetPage<RB_Goods_Extend>(pageIndex, pageSize, out rowCount, sql, parameters).ToList();
}
/// <summary>
......
......@@ -722,10 +722,8 @@ namespace Mall.WebApi.Controllers.MallBase
demodel.BuyerMessage ??= "";//买家留言
demodel.OrderSource ??= Common.Enum.User.UserSourceEnum.WeiXin;
#region 赋默认值
//demodel.TenantId = userInfo.TenantId;
//demodel.MallBaseId = userInfo.MallBaseId;
demodel.TenantId = 12;
demodel.MallBaseId =2;
demodel.TenantId = userInfo.TenantId;
demodel.MallBaseId = userInfo.MallBaseId;
demodel.Country ??= 2;
demodel.OrderStatus = Common.Enum.Goods.OrderStatusEnum.NonPayment;
......
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