Commit 4e9e81d0 authored by liudong1993's avatar liudong1993

商品功能+订单表实体

parent 0e5110ee
using Mall.Common.AOP;
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_DistributionCommission
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 商品id
/// </summary>
public int? GoodsId
{
get;
set;
}
/// <summary>
/// 规格排序组 逗号分隔每规格值
/// </summary>
public string SpecificationSort
{
get;
set;
}
/// <summary>
/// 分销商等级 0普通等级
/// </summary>
public int? DistributorGrade
{
get;
set;
}
/// <summary>
/// 一级佣金
/// </summary>
public decimal? OneCommission
{
get;
set;
}
/// <summary>
/// 二级佣金
/// </summary>
public decimal? TwoCommission
{
get;
set;
}
/// <summary>
/// 三级佣金
/// </summary>
public decimal? ThreeCommission
{
get;
set;
}
/// <summary>
/// Status
/// </summary>
public int? Status
{
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;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
using Mall.Common.AOP;
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_ExpressRelevance
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 订单id
/// </summary>
public int? OrderId
{
get;
set;
}
/// <summary>
/// 订单明细id
/// </summary>
public int? OrderDetailId
{
get;
set;
}
/// <summary>
/// 订单快递id
/// </summary>
public int? OrderExpressId
{
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;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
using Mall.Common.AOP;
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_MemberPrice
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 商品id
/// </summary>
public int? GoodsId
{
get;
set;
}
/// <summary>
/// 规格排序组 逗号分隔每规格值
/// </summary>
public string SpecificationSort
{
get;
set;
}
/// <summary>
/// 分销商等级 0普通等级
/// </summary>
public int? MemberGrade
{
get;
set;
}
/// <summary>
/// 会员价格
/// </summary>
public decimal? MemberPrice
{
get;
set;
}
/// <summary>
/// Status
/// </summary>
public int? Status
{
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;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
using Mall.Common.AOP;
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_Order
{
/// <summary>
/// OrderId
/// </summary>
public int OrderId
{
get;
set;
}
/// <summary>
/// 订单号
/// </summary>
public string OrderNo
{
get;
set;
}
/// <summary>
/// 商户单号
/// </summary>
public string MerchantsNo
{
get;
set;
}
/// <summary>
/// 用户id
/// </summary>
public int? UserId
{
get;
set;
}
/// <summary>
/// 订单来源(平台) 枚举
/// </summary>
public int? OrderSource
{
get;
set;
}
/// <summary>
/// 订单类型 枚举
/// </summary>
public int? OrderType
{
get;
set;
}
/// <summary>
/// 支付方式 枚举
/// </summary>
public int? PaymentWay
{
get;
set;
}
/// <summary>
/// 应收金额
/// </summary>
public decimal? PreferPrice
{
get;
set;
}
/// <summary>
/// 实收金额
/// </summary>
public decimal? Income
{
get;
set;
}
/// <summary>
/// 运费
/// </summary>
public decimal? FreightMoney
{
get;
set;
}
/// <summary>
/// 配送方式
/// </summary>
public int? DeliveryMethod
{
get;
set;
}
/// <summary>
/// 手续费
/// </summary>
public decimal? Fee
{
get;
set;
}
/// <summary>
/// 退款
/// </summary>
public decimal? Refund
{
get;
set;
}
/// <summary>
/// 优惠金额
/// </summary>
public decimal? CouponMoney
{
get;
set;
}
/// <summary>
/// 优惠卷ids
/// </summary>
public string CouponsIds
{
get;
set;
}
/// <summary>
/// 收件人
/// </summary>
public string Consignee
{
get;
set;
}
/// <summary>
/// 手机号码
/// </summary>
public string Mobile
{
get;
set;
}
/// <summary>
/// 国家
/// </summary>
public int? Country
{
get;
set;
}
/// <summary>
/// 省
/// </summary>
public int? Province
{
get;
set;
}
/// <summary>
/// 市
/// </summary>
public int? City
{
get;
set;
}
/// <summary>
/// 区
/// </summary>
public int? District
{
get;
set;
}
/// <summary>
/// 收货地址
/// </summary>
public string ShippingAddress
{
get;
set;
}
/// <summary>
/// 买家留言
/// </summary>
public string BuyerMessage
{
get;
set;
}
/// <summary>
/// 下单备注
/// </summary>
public string Remark
{
get;
set;
}
/// <summary>
/// 订单状态 枚举
/// </summary>
public int? OrderStatus
{
get;
set;
}
/// <summary>
/// 回收 1是 2否
/// </summary>
public int? Recycled
{
get;
set;
}
/// <summary>
/// 删除状态
/// </summary>
public int? Status
{
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;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
using Mall.Common.AOP;
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_OrderDetail
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 订单id
/// </summary>
public int? OrderId
{
get;
set;
}
/// <summary>
/// 商品id
/// </summary>
public int? GoodsId
{
get;
set;
}
/// <summary>
/// 订单类型 枚举
/// </summary>
public int? OrderType
{
get;
set;
}
/// <summary>
/// 商品名称
/// </summary>
public string GoodsName
{
get;
set;
}
/// <summary>
/// 封面图
/// </summary>
public int? CoverImage
{
get;
set;
}
/// <summary>
/// 规格
/// </summary>
public string Specification
{
get;
set;
}
/// <summary>
/// 货号
/// </summary>
public string ProductCode
{
get;
set;
}
/// <summary>
/// 单价
/// </summary>
public decimal? Unit_Price
{
get;
set;
}
/// <summary>
/// 数量
/// </summary>
public int? Number
{
get;
set;
}
/// <summary>
/// 原价 (=单价*数量)
/// </summary>
public decimal? Original_Price
{
get;
set;
}
/// <summary>
/// 最终价格
/// </summary>
public decimal? Final_Price
{
get;
set;
}
/// <summary>
/// 折扣
/// </summary>
public decimal? DiscountRate
{
get;
set;
}
/// <summary>
/// 是否商品单独会员价购买 1是 2否
/// </summary>
public int? IsMemberPrice
{
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;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
using Mall.Common.AOP;
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_OrderExpress
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 类型 1快递 2其他方式
/// </summary>
public int? Type
{
get;
set;
}
/// <summary>
/// 快递id
/// </summary>
public int? ExpressId
{
get;
set;
}
/// <summary>
/// 邮编
/// </summary>
public string PostCode
{
get;
set;
}
/// <summary>
/// 快递单号
/// </summary>
public string ExpressNumber
{
get;
set;
}
/// <summary>
/// 备注
/// </summary>
public string Remark
{
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;
}
/// <summary>
/// UpdateDate
/// </summary>
public DateTime? UpdateDate
{
get;
set;
}
}
}
using Mall.Common.AOP;
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Product;
namespace Mall.Model.Extend.Product
{
/// <summary>
/// 商品关联分销佣金表扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Goods_DistributionCommission_Extend : RB_Goods_DistributionCommission
{
/// <summary>
/// 商品ids
/// </summary>
public string GoodsIds { get; set; }
}
}
......@@ -38,6 +38,18 @@ namespace Mall.Model.Extend.Product
/// </summary>
public string CoverImage { get; set; }
/// <summary>
/// 自定义分享图片
/// </summary>
public string CustomShareImagePath { get; set; }
/// <summary>
/// 运费名称
/// </summary>
public string FreightName { get; set; }
/// <summary>
/// 表单名称
/// </summary>
public string FormsName { get; set; }
/// <summary>
/// 轮播图列表
/// </summary>
public List<RB_ImageCommonModel> CarouselImageList { get; set; }
......@@ -61,6 +73,14 @@ namespace Mall.Model.Extend.Product
/// 规格价格列表
/// </summary>
public List<RB_Goods_SpecificationPrice_Extend> SpecificationPriceList { get; set; }
/// <summary>
/// 分销佣金列表
/// </summary>
public List<RB_Goods_DistributionCommission_Extend> DistributionCommissionList { get; set; }
/// <summary>
/// 会员价格列表
/// </summary>
public List<RB_Goods_MemberPrice_Extend> MemberPriceList { get; set; }
}
}
using Mall.Common.AOP;
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Product;
namespace Mall.Model.Extend.Product
{
/// <summary>
/// 商品关联会员价格表扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Goods_MemberPrice_Extend : RB_Goods_MemberPrice
{
/// <summary>
/// 商品ids
/// </summary>
public string GoodsIds { get; set; }
}
}
......@@ -17,5 +17,9 @@ namespace Mall.Model.Extend.Product
/// 更新类型
/// </summary>
public int? UpdateType { get; set; }
/// <summary>
/// ids
/// </summary>
public string ServiceIds { get; set; }
}
}
This diff is collapsed.
......@@ -448,7 +448,7 @@ namespace Mall.Module.User
public bool SetMemberIntegralInfo(RB_Member_Integral_Extend demodel)
{
var umodel = member_UserRepository.GetEntity(demodel.UserId);
int Integral = 0;
int Integral;
if ((int)demodel.Type == 1)
{
Integral = (umodel.Integral ?? 0) + (demodel.Integral ?? 0);
......
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Product;
using Mall.Model.Extend.Product;
using System.Linq;
namespace Mall.Repository.Product
{
/// <summary>
/// 商品关联分销佣金仓储层
/// </summary>
public class RB_Goods_DistributionCommissionRepository : RepositoryBase<RB_Goods_DistributionCommission>
{
/// <summary>
/// 列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public List<RB_Goods_DistributionCommission_Extend> GetList(RB_Goods_DistributionCommission_Extend dmodel)
{
string where = $" 1=1 and {nameof(RB_Goods_DistributionCommission.Status)}=0";
if (dmodel.TenantId > 0) {
where += $@" and {nameof(RB_Goods_DistributionCommission.TenantId)}={dmodel.TenantId}";
}
if (dmodel.MallBaseId > 0) {
where += $@" and {nameof(RB_Goods_SpecificationPrice.MallBaseId)}={dmodel.MallBaseId}";
}
if (dmodel.Id > 0) {
where += $@" and {nameof(RB_Goods_DistributionCommission.Id)}={dmodel.Id}";
}
if (dmodel.GoodsId > 0) {
where += $@" and {nameof(RB_Goods_DistributionCommission.GoodsId)}={dmodel.GoodsId}";
}
if (!string.IsNullOrEmpty(dmodel.GoodsIds)) {
where += $@" and {nameof(RB_Goods_DistributionCommission.GoodsId)} in({dmodel.GoodsIds})";
}
string sql = $@"select * from RB_Goods_DistributionCommission where {where} order by Id desc";
return Get<RB_Goods_DistributionCommission_Extend>(sql).ToList();
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Product;
using Mall.Model.Extend.Product;
using System.Linq;
namespace Mall.Repository.Product
{
/// <summary>
/// 商品关联会员价格仓储层
/// </summary>
public class RB_Goods_MemberPriceRepository : RepositoryBase<RB_Goods_MemberPrice>
{
/// <summary>
/// 列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public List<RB_Goods_MemberPrice_Extend> GetList(RB_Goods_MemberPrice_Extend dmodel)
{
string where = $" 1=1 and {nameof(RB_Goods_MemberPrice.Status)}=0";
if (dmodel.TenantId > 0) {
where += $@" and {nameof(RB_Goods_MemberPrice.TenantId)}={dmodel.TenantId}";
}
if (dmodel.MallBaseId > 0) {
where += $@" and {nameof(RB_Goods_MemberPrice.MallBaseId)}={dmodel.MallBaseId}";
}
if (dmodel.Id > 0) {
where += $@" and {nameof(RB_Goods_MemberPrice.Id)}={dmodel.Id}";
}
if (dmodel.GoodsId > 0) {
where += $@" and {nameof(RB_Goods_MemberPrice.GoodsId)}={dmodel.GoodsId}";
}
if (!string.IsNullOrEmpty(dmodel.GoodsIds)) {
where += $@" and {nameof(RB_Goods_MemberPrice.GoodsId)} in({dmodel.GoodsIds})";
}
string sql = $@"select * from RB_Goods_MemberPrice where {where} order by Id desc";
return Get<RB_Goods_MemberPrice_Extend>(sql).ToList();
}
}
}
......@@ -64,6 +64,9 @@ namespace Mall.Repository.Product
{
where += $@" and {nameof(RB_Product_Service.Id)}={dmodel.Id}";
}
if (!string.IsNullOrEmpty(dmodel.ServiceIds)) {
where += $@" and {nameof(RB_Product_Service.Id)} in({dmodel.ServiceIds})";
}
if (!string.IsNullOrEmpty(dmodel.Name))
{
where += $@" and {nameof(RB_Product_Service.Name)} like '%{dmodel.Name}%'";
......
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