Commit b2c2de32 authored by 吴春's avatar 吴春

提交

parent 6b8088f3
......@@ -21,6 +21,11 @@ namespace Mall.Common.Enum.MallBase
/// 起送规则
/// </summary>
[EnumField("起送规则")]
OpenMinPrice = 3
OpenMinPrice = 3,
/// <summary>
/// 区域购买
/// </summary>
[EnumField("区域购买")]
AreaBuy =4
}
}
using Mall.Common.AOP;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Entity.BaseSetUp
{
/// <summary>
/// 电子面单实体表
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_ElectronicSheet
{
public int ID { get; set; }
/// <summary>
/// 商户id
/// </summary>
public int TenantId { get; set; }
/// <summary>
/// 小程序id
/// </summary>
public int MallBaseId { get; set; }
public int Status { get; set; }
public DateTime CreateDate { get; set; }
public DateTime UpdateDate { get; set; }
/// <summary>
/// 发件人姓名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 发件人电话
/// </summary>
public string Mobile { get; set; }
/// <summary>
/// 地址
/// </summary>
public string Address { get; set; }
/// <summary>
/// 0-否1-是
/// </summary>
public int IsDefault { get; set; }
/// <summary>
/// 省
/// </summary>
public int ProvinceId { get; set; }
/// <summary>
/// 市
/// </summary>
public int CityId { get; set; }
/// <summary>
/// 区
/// </summary>
public int DistrictId { get; set; }
/// <summary>
/// 发件人手机
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 发件人邮箱
/// </summary>
public string Email { get; set; }
/// <summary>
/// 发件人公司
/// </summary>
public string Company { get; set; }
/// <summary>
/// 网点名称
/// </summary>
public string WebDot { get; set; }
/// <summary>
/// 网点编码
/// </summary>
public string WebCode { get; set; }
/// <summary>
/// 月结编码
/// </summary>
public string MonthlyCode { get; set; }
/// <summary>
/// 电子面单密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 电子面单账号
/// </summary>
public string Account { get; set; }
/// <summary>
/// 是否打印商品,0-否,10是
/// </summary>
public int IsPrintGoods { get; set; }
/// <summary>
/// 是否订阅手短信,0-否,10是
/// </summary>
public int IsSubscribeSMS { get; set; }
/// <summary>
/// 快递公司Id
/// </summary>
public int ExpressId { get; set; }
}
}
using Mall.Common.AOP;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Entity.BaseSetUp
{
/// <summary>
/// 退货地址
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Logistics_Delivery
{
public int ID { get; set; }
/// <summary>
/// 商户id
/// </summary>
public int TenantId { get; set; }
/// <summary>
/// 小程序id
/// </summary>
public int MallBaseId { get; set; }
public int Status { get; set; }
/// <summary>
/// 0-否1-是
/// </summary>
public int IsDefault { get; set; }
public DateTime CreateDate { get; set; }
public DateTime UpdateDate { get; set; }
/// <summary>
/// 收货人姓名
/// </summary>
public string Name { get; set; }
/// <summary>
/// 联系方式
/// </summary>
public string Mobile { get; set; }
/// <summary>
/// 地址
/// </summary>
public string Address { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remarks { get; set; }
/// <summary>
/// 省
/// </summary>
public int ProvinceId { get; set; }
/// <summary>
/// 市
/// </summary>
public int CityId { get; set; }
/// <summary>
/// 区
/// </summary>
public int DistrictId { get; set; }
}
}
using Mall.Common.AOP;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Entity.BaseSetUp
{
/// <summary>
/// 快递公司
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Logistics_Express
{
public int ID { get; set; }
/// <summary>
/// 商户id
/// </summary>
public int TenantId { get; set; }
/// <summary>
/// 小程序id
/// </summary>
public int MallBaseId { get; set; }
public int Status { get; set; }
/// <summary>
/// 快递公司名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 快递公司缩写
/// </summary>
public string ExpressCode { get; set; }
}
}
using Mall.Common.AOP;
using Mall.Model.Entity.BaseSetUp;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Extend.BaseSetUp
{
/// <summary>
/// 电子面单扩展实体表
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_ElectronicSheet_Extend : RB_ElectronicSheet
{
/// <summary>
/// 省
/// </summary>
public string ProvinceName { get; set; }
/// <summary>
/// 市
/// </summary>
public string CityName { get; set; }
/// <summary>
/// 区
/// </summary>
public string DistrictName { get; set; }
/// <summary>
/// 快递公司
/// </summary>
public string ExpressName { get; set; }
}
}
using Mall.Common.AOP;
using Mall.Model.Entity.BaseSetUp;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Extend.BaseSetUp
{
/// <summary>
/// 退货地址扩展表
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Logistics_Delivery_Extend : RB_Logistics_Delivery
{
/// <summary>
/// 省
/// </summary>
public string ProvinceName { get; set; }
/// <summary>
/// 市
/// </summary>
public string CityName { get; set; }
/// <summary>
/// 区
/// </summary>
public string DistrictName { get; set; }
}
}
This diff is collapsed.
using Mall.Model.Entity.BaseSetUp;
using Mall.Model.Extend.BaseSetUp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mall.Repository.BaseSetUp
{
/// <summary>
/// 电子面单仓储层
/// </summary>
public class RB_ElectronicSheetRepository : RepositoryBase<RB_ElectronicSheet>
{
/// <summary>
/// 表名称
/// </summary>
public string TableName { get { return nameof(RB_ElectronicSheet); } }
// <summary>
/// 表名称
/// </summary>
public string DestinationTableName { get { return nameof(RB_Destination); } }
/// <summary>
///电子面单列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_ElectronicSheet_Extend> GetElectronicSheetPage(int pageIndex, int pageSize, out long rowCount, RB_ElectronicSheet_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.Append(@$" SELECT a.*,b.`Name` as ProvinceName,c.`Name` as CityName,d.`Name` as DistrictName FROM {TableName} as a
LEFT JOIN {DestinationTableName} as b on a.ProvinceId = b.ID
LEFT JOIN {DestinationTableName} as c on a.CityId = c.ID
LEFT JOIN {DestinationTableName} as d on a.DistrictId = d.ID WHERE a.{nameof(RB_ElectronicSheet_Extend.Status)}=0");
if (query != null)
{
// where += $@" and {nameof(RB_Customer_InfoCreate.CustomerId)}={dmodel.CustomerId}";
if (query.TenantId > 0)
{
builder.Append($" AND a.{nameof(RB_ElectronicSheet_Extend.TenantId)}={query.TenantId}");
}
if (query.TenantId > 0)
{
builder.Append($" AND a.{nameof(RB_ElectronicSheet_Extend.MallBaseId)}={query.MallBaseId}");
}
if (!string.IsNullOrWhiteSpace(query.Name))
{
builder.Append(@$" AND (a.{nameof(RB_ElectronicSheet_Extend.Name)} like '%{query.Name}%' or a.{nameof(RB_ElectronicSheet_Extend.Mobile)} like '%{query.Name}%')
or a.{nameof(RB_ElectronicSheet_Extend.WebCode)} like '%{query.Name}%') or a.{nameof(RB_ElectronicSheet_Extend.WebDot)} like '%{query.Name}%')
or a.{nameof(RB_ElectronicSheet_Extend.Company)} like '%{query.Name}%')
");
}
}
return GetPage<RB_ElectronicSheet_Extend>(pageIndex, pageSize, out rowCount, builder.ToString()).ToList();
}
/// <summary>
/// 电子面单列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_ElectronicSheet_Extend> GetElectronicSheetList(RB_ElectronicSheet_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.Append(@$" SELECT a.*,b.`Name` as ProvinceName,c.`Name` as CityName,d.`Name` as DistrictName FROM {TableName} as a
LEFT JOIN { DestinationTableName} as b on a.ProvinceId = b.ID
LEFT JOIN { DestinationTableName} as c on a.CityId = c.ID
LEFT JOIN { DestinationTableName} as d on a.DistrictId = d.ID WHERE a.{ nameof(RB_ElectronicSheet_Extend.Status)}= 0 ");
if (query != null)
{
if (query.ID > 0)
{
builder.Append($" AND a.{nameof(RB_ElectronicSheet_Extend.ID)}={query.ID}");
}
if (query.TenantId > 0)
{
builder.Append($" AND a.{nameof(RB_ElectronicSheet_Extend.TenantId)}={query.TenantId}");
}
if (query.TenantId > 0)
{
builder.Append($" AND a.{nameof(RB_ElectronicSheet_Extend.MallBaseId)}={query.MallBaseId}");
}
if (!string.IsNullOrWhiteSpace(query.Name))
{
builder.Append($" AND a.{nameof(RB_ElectronicSheet_Extend.Name)} like '%{query.Name}%'");
}
if (!string.IsNullOrWhiteSpace(query.Mobile))
{
builder.Append($" AND a.{nameof(RB_ElectronicSheet_Extend.Mobile)} like '%{query.Mobile}%'");
}
}
return Get<RB_ElectronicSheet_Extend>(builder.ToString()).ToList();
}
}
}
using Mall.Model.Entity.BaseSetUp;
using Mall.Model.Extend.BaseSetUp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mall.Repository.BaseSetUp
{
/// <summary>
/// 退货地址仓储层
/// </summary>
public class RB_Logistics_DeliveryRepository : RepositoryBase<RB_Logistics_Delivery>
{
/// <summary>
/// 表名称
/// </summary>
public string TableName { get { return nameof(RB_Logistics_Delivery); } }
// <summary>
/// 表名称
/// </summary>
public string DestinationTableName { get { return nameof(RB_Destination); } }
/// <summary>
/// 退货地址列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_Logistics_Delivery_Extend> GetPageListRepository(int pageIndex, int pageSize, out long rowCount, RB_Logistics_Delivery_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.Append(@$" SELECT a.*,b.`Name` as ProvinceName,c.`Name` as CityName,d.`Name` as DistrictName FROM {TableName} as a
LEFT JOIN {DestinationTableName} as b on a.ProvinceId = b.ID
LEFT JOIN {DestinationTableName} as c on a.CityId = c.ID
LEFT JOIN {DestinationTableName} as d on a.DistrictId = d.ID WHERE a.{nameof(RB_Logistics_Delivery_Extend.Status)}=0");
if (query != null)
{
// where += $@" and {nameof(RB_Customer_InfoCreate.CustomerId)}={dmodel.CustomerId}";
if (query.TenantId > 0)
{
builder.Append($" AND a.{nameof(RB_Logistics_Delivery_Extend.TenantId)}={query.TenantId}");
}
if (query.TenantId > 0)
{
builder.Append($" AND a.{nameof(RB_Logistics_Delivery_Extend.MallBaseId)}={query.MallBaseId}");
}
if (!string.IsNullOrWhiteSpace(query.Name))
{
builder.Append($" AND (a.{nameof(RB_Logistics_Delivery_Extend.Name)} like '%{query.Name}%' or a.{nameof(RB_Logistics_Delivery_Extend.Mobile)} like '%{query.Mobile}%') ");
}
}
return GetPage<RB_Logistics_Delivery_Extend>(pageIndex, pageSize, out rowCount, builder.ToString()).ToList();
}
/// <summary>
/// 退货地址列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_Logistics_Delivery_Extend> GetLogisticsDeliveryList(RB_Logistics_Delivery_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.Append(@$" SELECT a.*,b.`Name` as ProvinceName,c.`Name` as CityName,d.`Name` as DistrictName FROM {TableName} as a
LEFT JOIN { DestinationTableName} as b on a.ProvinceId = b.ID
LEFT JOIN { DestinationTableName} as c on a.CityId = c.ID
LEFT JOIN { DestinationTableName} as d on a.DistrictId = d.ID WHERE a.{ nameof(RB_Logistics_Delivery_Extend.Status)}= 0 ");
if (query != null)
{
if (query.ID > 0)
{
builder.Append($" AND a.{nameof(RB_Logistics_Delivery_Extend.ID)}={query.ID}");
}
if (query.TenantId > 0)
{
builder.Append($" AND a.{nameof(RB_Logistics_Delivery_Extend.TenantId)}={query.TenantId}");
}
if (query.TenantId > 0)
{
builder.Append($" AND a.{nameof(RB_Logistics_Delivery_Extend.MallBaseId)}={query.MallBaseId}");
}
if (!string.IsNullOrWhiteSpace(query.Name))
{
builder.Append($" AND a.{nameof(RB_Logistics_Delivery_Extend.Name)} like '%{query.Name}%'");
}
if (!string.IsNullOrWhiteSpace(query.Mobile))
{
builder.Append($" AND a.{nameof(RB_Logistics_Delivery_Extend.Mobile)} like '%{query.Mobile}%'");
}
}
return Get<RB_Logistics_Delivery_Extend>(builder.ToString()).ToList();
}
}
}
using Mall.Model.Entity.BaseSetUp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mall.Repository.BaseSetUp
{
public class RB_Logistics_ExpressRepository:RepositoryBase<RB_Logistics_Express>
{
/// <summary>
/// 表名称
/// </summary>
public string TableName { get { return nameof(RB_Logistics_Express); } }
/// <summary>
/// 快递公司列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_Logistics_Express> GetLogisticsExpressList(RB_Logistics_Express query)
{
StringBuilder builder = new StringBuilder();
builder.Append($" SELECT * FROM {TableName} WHERE {nameof(RB_Logistics_Express.Status)}=0 ");
if (query != null)
{
if (query.ID > 0)
{
builder.Append($" AND {nameof(RB_Logistics_Express.ID)}={query.ID}");
}
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_Logistics_Express.TenantId)}={query.TenantId}");
}
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_Logistics_Express.MallBaseId)}={query.MallBaseId}");
}
if (!string.IsNullOrWhiteSpace(query.Name))
{
builder.Append($" AND {nameof(RB_Logistics_Express.Name)} like '%{query.Name}%'");
}
}
return Get<RB_Logistics_Express>(builder.ToString()).ToList();
}
}
}
......@@ -42,7 +42,7 @@ namespace Mall.Repository.BaseSetUp
}
if (query.RulesType > 0)
{
builder.Append($" AND a.{nameof(RB_Logistics_Rules_Extend.RulesType)}={(int)query.RulesType}");
builder.Append($" AND {nameof(RB_Logistics_Rules_Extend.RulesType)}={(int)query.RulesType}");
}
}
return GetPage<RB_Logistics_Rules_Extend>(pageIndex, pageSize, out rowCount, builder.ToString()).ToList();
......@@ -81,7 +81,7 @@ namespace Mall.Repository.BaseSetUp
}
if (query.RulesType > 0)
{
builder.Append($" AND a.{nameof(RB_Logistics_Rules_Extend.RulesType)}={(int)query.RulesType}");
builder.Append($" AND {nameof(RB_Logistics_Rules_Extend.RulesType)}={(int)query.RulesType}");
}
}
return Get<RB_Logistics_Rules_Extend>(builder.ToString()).ToList();
......
......@@ -59,11 +59,11 @@ namespace Mall.Repository.BaseSetUp
{
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_MallBase_Extend.TenantId)}={query.TenantId}");
builder.Append($" AND a.{nameof(RB_MallBase_Extend.TenantId)}={query.TenantId}");
}
if (query.MallBaseId > 0)
{
builder.Append($" AND {nameof(RB_MallBase_Extend.MallBaseId)}={query.MallBaseId}");
builder.Append($" AND a.{nameof(RB_MallBase_Extend.MallBaseId)}={query.MallBaseId}");
}
}
return Get<RB_MallBase_Extend>( builder.ToString()).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