Commit 6383400c authored by 吴春's avatar 吴春

提交代码

parent 1dce10e4
using VT.FW.DB;
using Mall.Common.Enum.Goods;
using Mall.Common.Enum.User;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Entity.Product
{
/// <summary>
/// 商品订单明细表实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Goods_OrderDetailFreeShipping
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 订单商品id
/// </summary>
public int? OrderDetailId
{
get;
set;
}
/// <summary>
/// 单品满件包邮
/// </summary>
public int? FullNumPinkage
{
get;
set;
}
/// <summary>
/// 单品满额包邮
/// </summary>
public decimal? FullMoneyPinkage
{
get;
set;
}
/// <summary>
/// 包邮规则名称
/// </summary>
public string Name { get; set; }
public int Status { get; set; }
/// <summary>
/// 包邮规则对应的分类
/// </summary>
public int? Category { get; set; }
/// <summary>
/// 商户号
/// </summary>
public int TenantId
{
get;
set;
}
/// <summary>
/// 小程序id
/// </summary>
public int MallBaseId
{
get;
set;
}
/// <summary>
/// CreateDate
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
}
}
using Mall.Model.Entity.Product;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mall.Repository.Product
{
public class RB_Goods_OrderDetailFreeShippingRepository : BaseRepository<RB_Goods_OrderDetailFreeShipping>
{
/// <summary>
/// 表名称
/// </summary>
public string TableName { get { return nameof(RB_Goods_OrderDetailFreeShipping); } }
/// <summary>
/// 物料规则列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_Goods_OrderDetailFreeShipping> GetPageListRepository(int pageIndex, int pageSize, out long rowCount, RB_Goods_OrderDetailFreeShipping query)
{
StringBuilder builder = new StringBuilder();
builder.Append($" SELECT * FROM {TableName} WHERE {nameof(RB_Goods_OrderDetailFreeShipping.Status)}=0");
if (query != null)
{
// where += $@" and {nameof(RB_Customer_InfoCreate.CustomerId)}={dmodel.CustomerId}";
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_Goods_OrderDetailFreeShipping.TenantId)}={query.TenantId}");
}
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_Goods_OrderDetailFreeShipping.MallBaseId)}={query.MallBaseId}");
}
if (query.OrderDetailId > 0)
{
builder.Append($" AND {nameof(RB_Goods_OrderDetailFreeShipping.OrderDetailId)}={query.OrderDetailId}");
}
}
return GetPage<RB_Goods_OrderDetailFreeShipping>(pageIndex, pageSize, out rowCount, builder.ToString()).ToList();
}
/// <summary>
/// 物流规则列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_Goods_OrderDetailFreeShipping> GetLogisticsRulesList(RB_Goods_OrderDetailFreeShipping query)
{
StringBuilder builder = new StringBuilder();
builder.Append($" SELECT * FROM {TableName} WHERE {nameof(RB_Goods_OrderDetailFreeShipping.Status)}=0 ");
if (query != null)
{
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_Goods_OrderDetailFreeShipping.TenantId)}={query.TenantId}");
}
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_Goods_OrderDetailFreeShipping.MallBaseId)}={query.MallBaseId}");
}
if (query.OrderDetailId > 0)
{
builder.Append($" AND {nameof(RB_Goods_OrderDetailFreeShipping.OrderDetailId)}={query.OrderDetailId}");
}
}
return Get<RB_Goods_OrderDetailFreeShipping>(builder.ToString()).ToList();
}
}
}
......@@ -1403,7 +1403,7 @@ namespace Mall.WebApi.Controllers.User
var SupplierList = supplierModule.GetList(new RB_Supplier_Extend { TenantId = userInfo.TenantId, MallBaseId = userInfo.MallBaseId, Introducer = userInfo.UserId });//我的供应商
var obj = SupplierList.Select(x => new { x.Name, x.Mobile, SupplierCommissionList = x.SupplierCommissionList.Select(y => new { y.CommissionRate, y.CommissionType }) });
var obj = SupplierList.Select(x => new { x.ID,x.Name, x.Mobile, SupplierCommissionList = x.SupplierCommissionList.Select(y => new { y.CommissionRate, y.CommissionType }) });
return ApiResult.Success("", obj);
}
......
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