Commit 9cd6c9e7 authored by 吴春's avatar 吴春

提交代码

parent 6d57c7ea
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Common.Plugin;
namespace Mall.Common.Enum.Goods
{
/// <summary>
/// 课程价格优惠类型
/// </summary>
public enum CoursePriceDiscountEnum
{
/// <summary>
/// 买送
/// </summary>
[EnumField("买送")]
BuySend = 1,
/// <summary>
/// 单人报名优惠
/// </summary>
[EnumField("单人报名优惠")]
SingleJoin = 2,
/// <summary>
/// 两人报名优惠
/// </summary>
[EnumField("两人报名优惠")]
DoubleJoin = 3,
/// <summary>
/// 续费报名优惠
/// </summary>
[EnumField("续费报名优惠")]
Renewal = 4,
///// <summary>
///// 刷卡分期
///// </summary>
//[EnumField("刷卡分期")]
//Staging =5,
}
}
...@@ -356,5 +356,10 @@ namespace Mall.Model.Entity.Product ...@@ -356,5 +356,10 @@ namespace Mall.Model.Entity.Product
/// 储值卡抵扣金额 /// 储值卡抵扣金额
/// </summary> /// </summary>
public decimal DepositMoney { get; set; } public decimal DepositMoney { get; set; }
/// <summary>
/// 教育erp对应的人员id
/// </summary>
public int EduUserId { get; set; }
} }
} }
...@@ -393,5 +393,11 @@ namespace Mall.Model.Entity.Product ...@@ -393,5 +393,11 @@ namespace Mall.Model.Entity.Product
/// 储值卡退回金额 /// 储值卡退回金额
/// </summary> /// </summary>
public decimal DepositRefundMoney { get; set; } public decimal DepositRefundMoney { get; set; }
/// <summary>
/// 规格对应的班级(甲鹤小程序)
/// </summary>
public int ClassId { get; set; }
} }
} }
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Common.Enum.Goods;
using VT.FW.DB;
namespace Mall.Model.Entity.Product
{
/// <summary>
/// 甲鹤小程序优惠表实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Goods_Preferential
{
/// <summary>
/// 主键编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 商品编号
/// </summary>
public int GoodsId { get; set; }
/// <summary>
/// 优惠条件
/// </summary>
public string PreferentialTerms { get; set; }
/// <summary>
/// 销售返佣类型(0-百分比,1-固定金额)
/// </summary>
public int SaleCommissionType { get; set; }
/// <summary>
/// 销售返佣
/// </summary>
public decimal SaleCommissionMoney { get; set; }
/// <summary>
/// 同行返佣类型(0-百分比,1-固定金额)
/// </summary>
public int B2BCommissionType { get; set; }
/// <summary>
/// 同行返佣
/// </summary>
public decimal B2BCommissionMoney { get; set; }
/// <summary>
/// 课程价格优惠类型(见枚举)
/// </summary>
public CoursePriceDiscountEnum PriceDiscountType { get; set; }
/// <summary>
/// 购买人数
/// </summary>
public int BuyNum { get; set; }
/// <summary>
/// 赠送人数
/// </summary>
public int SendNum { get; set; }
/// <summary>
/// 优惠价格类型(0-百分比,1-固定金额)
/// </summary>
public int PriceType { get; set; }
/// <summary>
/// 优惠金额
/// </summary>
public decimal PriceMoney { get; set; }
/// <summary>
/// 商户号
/// </summary>
public int TenantId
{
get;
set;
}
/// <summary>
/// 小程序id
/// </summary>
public int MallBaseId
{
get;
set;
}
/// <summary>
/// 状态
/// </summary>
public Common.Enum.DateStateEnum Status { get; set; }
/// <summary>
/// 教育返佣类型(0-百分比,1-固定金额)
/// </summary>
public int EduCommissionType { get; set; }
/// <summary>
/// 教育同行佣金
/// </summary>
public decimal EduCommissionMoney { get; set; }
}
}
...@@ -94,5 +94,10 @@ namespace Mall.Model.Entity.Product ...@@ -94,5 +94,10 @@ namespace Mall.Model.Entity.Product
get; get;
set; set;
} }
/// <summary>
/// 班级id
/// </summary>
public int ClassId { get; set; }
} }
} }
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Product;
namespace Mall.Model.Extend.Product
{
/// <summary>
/// 商品优惠表扩展实体类
/// </summary>
public class RB_Goods_Preferential_Extend : RB_Goods_Preferential
{
/// <summary>
/// 商品编号
/// </summary>
public string QGoodsIds { get; set; }
/// <summary>
/// 优惠类型字符串
/// </summary>
public string PriceDiscountTypeStr { get { return Common.Plugin.EnumHelper.GetEnumName(this.PriceDiscountType); } }
}
}
...@@ -62,6 +62,10 @@ namespace Mall.Module.Product ...@@ -62,6 +62,10 @@ namespace Mall.Module.Product
/// </summary> /// </summary>
private readonly RB_Goods_SpecificationValueRepository goods_SpecificationValueRepository = new RB_Goods_SpecificationValueRepository(); private readonly RB_Goods_SpecificationValueRepository goods_SpecificationValueRepository = new RB_Goods_SpecificationValueRepository();
/// <summary> /// <summary>
/// 商品优惠仓储类
/// </summary>
private readonly RB_Goods_PreferentialRepository RB_Goods_PreferentialRepository = new RB_Goods_PreferentialRepository();
/// <summary>
/// 商品规格价格 /// 商品规格价格
/// </summary> /// </summary>
private readonly RB_Goods_SpecificationPriceRepository goods_SpecificationPriceRepository = new RB_Goods_SpecificationPriceRepository(); private readonly RB_Goods_SpecificationPriceRepository goods_SpecificationPriceRepository = new RB_Goods_SpecificationPriceRepository();
...@@ -360,6 +364,15 @@ namespace Mall.Module.Product ...@@ -360,6 +364,15 @@ namespace Mall.Module.Product
///</summary> ///</summary>
private readonly RB_OrderGoods_LogRepository orderGoodsLogRepository = new RB_OrderGoods_LogRepository(); private readonly RB_OrderGoods_LogRepository orderGoodsLogRepository = new RB_OrderGoods_LogRepository();
/// <summary>
/// 教育创建人
/// </summary>
private readonly Repository.Education.RB_AccountRepository RB_AccountRepository = new Repository.Education.RB_AccountRepository();
/// <summary>
/// 教育销售
/// </summary>
private readonly Repository.Education.RB_Education_EduSellRepository education_EduSellRepository = new Repository.Education.RB_Education_EduSellRepository();
#region 购物车 #region 购物车
/// <summary> /// <summary>
...@@ -1618,6 +1631,17 @@ namespace Mall.Module.Product ...@@ -1618,6 +1631,17 @@ namespace Mall.Module.Product
if (demodel.DetailList.Any()) if (demodel.DetailList.Any())
{ {
string GoodsIds = string.Join(",", demodel.DetailList.Select(x => x.GoodsId)); string GoodsIds = string.Join(",", demodel.DetailList.Select(x => x.GoodsId));
List<RB_Goods_Preferential_Extend> goodsPreferentialList = new List<RB_Goods_Preferential_Extend>();
if (!string.IsNullOrWhiteSpace(GoodsIds))
{
goodsPreferentialList = RB_Goods_PreferentialRepository.GetGoodsPreferentialListRepostory(new RB_Goods_Preferential_Extend { TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId, QGoodsIds = GoodsIds });
}
var gList = goodsRepository.GetList(new RB_Goods_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }); var gList = goodsRepository.GetList(new RB_Goods_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
var clist = goods_CategoryRepository.GetList(new RB_Goods_Category_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }); var clist = goods_CategoryRepository.GetList(new RB_Goods_Category_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
...@@ -2166,8 +2190,14 @@ namespace Mall.Module.Product ...@@ -2166,8 +2190,14 @@ namespace Mall.Module.Product
item.Attr_list = attr_list; item.Attr_list = attr_list;
item.Discounts = discounts; item.Discounts = discounts;
item.CategoryIdList = categoryList.Select(x => x.CategoryId ?? 0).ToList(); item.CategoryIdList = categoryList.Select(x => x.CategoryId ?? 0).ToList();
} }
if (demodel.User_Coupon_Id > 0 && GoodsCouponList.Any()) if (demodel.User_Coupon_Id > 0 && GoodsCouponList.Any())
{ {
decimal FinalMoney = GoodsCouponList.Sum(x => x.TotalMoney); decimal FinalMoney = GoodsCouponList.Sum(x => x.TotalMoney);
...@@ -2313,6 +2343,49 @@ namespace Mall.Module.Product ...@@ -2313,6 +2343,49 @@ namespace Mall.Module.Product
TotalGoodsMoney -= couponMoney;//总价格需减去优惠券金额 TotalGoodsMoney -= couponMoney;//总价格需减去优惠券金额
} }
if (goodsPreferentialList != null && goodsPreferentialList.Any())
{
if (item.Number > 0)//教育订单判断是否有优惠
{
var nowGoodsPreferentialList = goodsPreferentialList.Where(x => x.GoodsId == item.GoodsId).ToList();
if (nowGoodsPreferentialList != null && nowGoodsPreferentialList.Any())
{
decimal goodsCouponsMoney = 0;
foreach (var itemPreferential in nowGoodsPreferentialList.OrderByDescending(x => (int)x.PriceDiscountType))
{
if (itemPreferential.PriceDiscountType == CoursePriceDiscountEnum.DoubleJoin && item.Number > 1)
{
goodsCouponsMoney = (item.Unit_Price ?? 0) * ((itemPreferential.PriceMoney) / Convert.ToDecimal(100)) * (item.Number ?? 0);
break;
}
else if (itemPreferential.PriceDiscountType == CoursePriceDiscountEnum.SingleJoin)
{
goodsCouponsMoney = (item.Unit_Price ?? 0) * ((itemPreferential.PriceMoney) / Convert.ToDecimal(100)) * (item.Number ?? 0);
break;
}
else if (itemPreferential.PriceDiscountType == CoursePriceDiscountEnum.BuySend)
{
int joinNum = (item.Number ?? 0) / (itemPreferential.BuyNum + itemPreferential.SendNum) * itemPreferential.BuyNum + (item.Number ?? 0) % (itemPreferential.BuyNum + itemPreferential.SendNum);
goodsCouponsMoney = (item.Unit_Price ?? 0) * (item.Number ?? 0) - (item.Unit_Price ?? 0) * joinNum;
break;
}
}
if (goodsCouponsMoney > 0)
{
couponMoney += goodsCouponsMoney;
item.CouponMoney += goodsCouponsMoney;
TotalGoodsMoney -= goodsCouponsMoney;//总价格需减去优惠券金额
//item.Final_Price -= goodsCouponsMoney;
CouponsMoney += goodsCouponsMoney;
}
}
}
}
#region 运费 #region 运费
decimal Express = 0; decimal Express = 0;
string FreeShippingDescription = ""; string FreeShippingDescription = "";
...@@ -2556,7 +2629,8 @@ namespace Mall.Module.Product ...@@ -2556,7 +2629,8 @@ namespace Mall.Module.Product
depositModel.SurplusPrice = 0; depositModel.SurplusPrice = 0;
TotalDepositMoney += item.DepositMoney; TotalDepositMoney += item.DepositMoney;
} }
else { else
{
item.Final_Price = 0; item.Final_Price = 0;
item.DepositMoney = CurrentMoney; item.DepositMoney = CurrentMoney;
depositModel.SurplusPrice -= CurrentMoney; depositModel.SurplusPrice -= CurrentMoney;
...@@ -2673,7 +2747,8 @@ namespace Mall.Module.Product ...@@ -2673,7 +2747,8 @@ namespace Mall.Module.Product
sign = "", sign = "",
confine_order_count = gmodel.LimitBuyOrderNum,//限制订单数量 confine_order_count = gmodel.LimitBuyOrderNum,//限制订单数量
form_id = gmodel.FormsId,//表单id form_id = gmodel.FormsId,//表单id
marketingLogo = JsonHelper.Serialize(tempLogo) marketingLogo = JsonHelper.Serialize(tempLogo),
}); });
} }
} }
...@@ -3047,6 +3122,7 @@ namespace Mall.Module.Product ...@@ -3047,6 +3122,7 @@ namespace Mall.Module.Product
List<RB_Member_DiscountCoupon_Extend> cList = new List<RB_Member_DiscountCoupon_Extend>(); List<RB_Member_DiscountCoupon_Extend> cList = new List<RB_Member_DiscountCoupon_Extend>();
List<Model.Extend.MarketingCenter.RB_DiscountCoupon_Extend> dcList = new List<Model.Extend.MarketingCenter.RB_DiscountCoupon_Extend>(); List<Model.Extend.MarketingCenter.RB_DiscountCoupon_Extend> dcList = new List<Model.Extend.MarketingCenter.RB_DiscountCoupon_Extend>();
List<Model.Extend.MarketingCenter.RB_DiscountCoupon_Product_Extend> dcpList = new List<Model.Extend.MarketingCenter.RB_DiscountCoupon_Product_Extend>(); List<Model.Extend.MarketingCenter.RB_DiscountCoupon_Product_Extend> dcpList = new List<Model.Extend.MarketingCenter.RB_DiscountCoupon_Product_Extend>();
List<RB_Goods_Preferential_Extend> goodsPreferentialList = new List<RB_Goods_Preferential_Extend>();
demodel.CouponsIds = ""; demodel.CouponsIds = "";
bool IsCommissionCoupons = true;// 是否通用优惠券 2020-08-13 ld bool IsCommissionCoupons = true;// 是否通用优惠券 2020-08-13 ld
if (demodel.User_Coupon_Id > 0) if (demodel.User_Coupon_Id > 0)
...@@ -3081,6 +3157,15 @@ namespace Mall.Module.Product ...@@ -3081,6 +3157,15 @@ namespace Mall.Module.Product
} }
} }
} }
if (demodel.VersionSource == 1)//教育订单判断是否有优惠
{
string goodsIds = string.Join(",", demodel.DetailList.Select(x => x.GoodsId));
if (!string.IsNullOrWhiteSpace(goodsIds))
{
goodsPreferentialList = RB_Goods_PreferentialRepository.GetGoodsPreferentialListRepostory(new RB_Goods_Preferential_Extend { TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId, QGoodsIds = goodsIds });
}
}
#endregion #endregion
List<FreeShippingGoodsDetail> SatisfiedGoodsList = new List<FreeShippingGoodsDetail>();//可包邮的商品 List<FreeShippingGoodsDetail> SatisfiedGoodsList = new List<FreeShippingGoodsDetail>();//可包邮的商品
var depositModel = new RB_Member_DepositBuy_Extend();//储值卡 var depositModel = new RB_Member_DepositBuy_Extend();//储值卡
...@@ -3333,11 +3418,22 @@ namespace Mall.Module.Product ...@@ -3333,11 +3418,22 @@ namespace Mall.Module.Product
} }
item.CommissionPrice = speciPModel?.Commission ?? 0; item.CommissionPrice = speciPModel?.Commission ?? 0;
#region 查询规格图片 #region 查询规格图片
string simage = goods_SpecificationValueRepository.GetSpecificationImage(item.GoodsId ?? 0, item.SpecificationSort); //2021-08-03 update by:w 因为要把教育规格对应的班级保存起来
if (demodel.VersionSource == 1)
{
var sprcificationList = goods_SpecificationValueRepository.GetSpecificationListImage(item.GoodsId ?? 0, item.SpecificationSort);
string simage = sprcificationList.Where(x => !string.IsNullOrWhiteSpace(x.Image)).OrderBy(x => x.Id).FirstOrDefault()?.Image ?? "";
if (!string.IsNullOrEmpty(simage)) if (!string.IsNullOrEmpty(simage))
{ {
item.CoverImage = simage;//规格图片赋值 item.CoverImage = simage;//规格图片赋值
} }
item.ClassId = sprcificationList.OrderBy(x => x.Id).FirstOrDefault()?.ClassId ?? 0;//(班级id)
}
else
{
string simage = goods_SpecificationValueRepository.GetSpecificationImage(item.GoodsId ?? 0, item.SpecificationSort);
}
#endregion #endregion
item.SmallShopsCostPrice = gmodel.SellingPrice ?? 0; item.SmallShopsCostPrice = gmodel.SellingPrice ?? 0;
...@@ -3787,6 +3883,42 @@ namespace Mall.Module.Product ...@@ -3787,6 +3883,42 @@ namespace Mall.Module.Product
} }
} }
if (demodel.VersionSource == 1 && item.Number > 0)//教育订单判断是否有优惠
{
var nowGoodsPreferentialList = goodsPreferentialList.Where(x => x.GoodsId == item.GoodsId).ToList();
if (nowGoodsPreferentialList != null && nowGoodsPreferentialList.Any())
{
decimal goodsCouponsMoney = 0;
foreach (var itemPreferential in nowGoodsPreferentialList.OrderByDescending(x => (int)x.PriceDiscountType))
{
if (itemPreferential.PriceDiscountType == CoursePriceDiscountEnum.DoubleJoin && item.Number > 1)
{
goodsCouponsMoney = (item.Unit_Price ?? 0) * ((itemPreferential.PriceMoney) / Convert.ToDecimal(100)) * (item.Number ?? 0);
break;
}
else if (itemPreferential.PriceDiscountType == CoursePriceDiscountEnum.SingleJoin)
{
goodsCouponsMoney = (item.Unit_Price ?? 0) * ((itemPreferential.PriceMoney) / Convert.ToDecimal(100)) * (item.Number ?? 0);
break;
}
else if (itemPreferential.PriceDiscountType == CoursePriceDiscountEnum.BuySend)
{
int joinNum = (item.Number ?? 0) / (itemPreferential.BuyNum + itemPreferential.SendNum) * itemPreferential.BuyNum + (item.Number ?? 0) % (itemPreferential.BuyNum + itemPreferential.SendNum);
goodsCouponsMoney = (item.Unit_Price ?? 0) * (item.Number ?? 0) - (item.Unit_Price ?? 0) * joinNum;
break;
}
}
if (goodsCouponsMoney > 0)
{
item.CouponMoney += goodsCouponsMoney;
TotalMoney -= goodsCouponsMoney;//总价格需减去优惠券金额
item.Final_Price -= goodsCouponsMoney;
CouponsMoney += goodsCouponsMoney;
}
}
}
#region 运费 #region 运费
decimal Express = 0; decimal Express = 0;
decimal TExpress = 0; decimal TExpress = 0;
...@@ -4032,7 +4164,8 @@ namespace Mall.Module.Product ...@@ -4032,7 +4164,8 @@ namespace Mall.Module.Product
#endregion #endregion
#region 储值卡使用 #region 储值卡使用
if (demodel.Use_Deposit_Id > 0 && depositModel.SurplusPrice > 0) { if (demodel.Use_Deposit_Id > 0 && depositModel.SurplusPrice > 0)
{
if ((item.Final_Price ?? 0) > depositModel.SurplusPrice) if ((item.Final_Price ?? 0) > depositModel.SurplusPrice)
{ {
item.DepositMoney = depositModel.SurplusPrice; item.DepositMoney = depositModel.SurplusPrice;
...@@ -4079,12 +4212,14 @@ namespace Mall.Module.Product ...@@ -4079,12 +4212,14 @@ namespace Mall.Module.Product
{ {
return ApiResult.Failed("抵扣佣金不正确"); return ApiResult.Failed("抵扣佣金不正确");
} }
if (OldDepositMoney > (TotalMoney + TotalExpress - DeductionCommission)) { if (OldDepositMoney > (TotalMoney + TotalExpress - DeductionCommission))
{
//为了防止运费出现四舍五入不平均问题,只要全额抵扣的就重新赋下值 //为了防止运费出现四舍五入不平均问题,只要全额抵扣的就重新赋下值
TotalDepositMoney = (TotalMoney + TotalExpress - DeductionCommission); TotalDepositMoney = (TotalMoney + TotalExpress - DeductionCommission);
depositModel.SurplusPrice = OldDepositMoney - TotalDepositMoney; depositModel.SurplusPrice = OldDepositMoney - TotalDepositMoney;
} }
if (TotalDepositMoney != demodel.DepositMoney) { if (TotalDepositMoney != demodel.DepositMoney)
{
return ApiResult.Failed("储值卡抵扣金额有误"); return ApiResult.Failed("储值卡抵扣金额有误");
} }
//验证总额 //验证总额
...@@ -4127,7 +4262,8 @@ namespace Mall.Module.Product ...@@ -4127,7 +4262,8 @@ namespace Mall.Module.Product
demodel.Remark ??= ""; demodel.Remark ??= "";
demodel.ApplyForCancelStatus ??= 0; demodel.ApplyForCancelStatus ??= 0;
demodel.VersionSource ??= 0;//默认商城 demodel.VersionSource ??= 0;//默认商城
if (demodel.VersionSource == 1) { if (demodel.VersionSource == 1)
{
//教育端下单 初始化参数 //教育端下单 初始化参数
//demodel.PaymentWay = OrderPaymentTypeEnum.OfflinePay; //demodel.PaymentWay = OrderPaymentTypeEnum.OfflinePay;
//demodel.OrderStatus = OrderStatusEnum.Completed; //demodel.OrderStatus = OrderStatusEnum.Completed;
...@@ -4136,7 +4272,8 @@ namespace Mall.Module.Product ...@@ -4136,7 +4272,8 @@ namespace Mall.Module.Product
//demodel.ReceivingTime = DateTime.Now; //demodel.ReceivingTime = DateTime.Now;
//demodel.FinishTime = DateTime.Now; //demodel.FinishTime = DateTime.Now;
} }
if (demodel.Income == 0 && demodel.DepositMoney > 0) { if (demodel.Income == 0 && demodel.DepositMoney > 0)
{
//使用储值卡全额抵扣了,无需再次付款 //使用储值卡全额抵扣了,无需再次付款
demodel.PaymentWay = OrderPaymentTypeEnum.PayCards; demodel.PaymentWay = OrderPaymentTypeEnum.PayCards;
demodel.OrderStatus = OrderStatusEnum.WaitSendGoods; demodel.OrderStatus = OrderStatusEnum.WaitSendGoods;
...@@ -4347,30 +4484,50 @@ namespace Mall.Module.Product ...@@ -4347,30 +4484,50 @@ namespace Mall.Module.Product
/// <param name="UserId"></param> /// <param name="UserId"></param>
/// <param name="OrderId"></param> /// <param name="OrderId"></param>
/// <returns></returns> /// <returns></returns>
public bool SaveOrderUserAllParent(int UserId,int OrderId) { public bool SaveOrderUserAllParent(int UserId, int OrderId)
if (OrderId <= 0 || UserId <= 0) { {
if (OrderId <= 0 || UserId <= 0)
{
return false; return false;
} }
try try
{ {
string parentIds = member_UserRepository.GetMemberParentIdStr(UserId); string parentIds = member_UserRepository.GetMemberParentIdStr(UserId);
string distributorIds = ""; string distributorIds = "";
if (!string.IsNullOrEmpty(parentIds)) { int eduUserId = 0;
if (!string.IsNullOrEmpty(parentIds))
{
//查询用户是否是分销商 //查询用户是否是分销商
var dlist = distributor_InfoRepository.GetListForSingle(new RB_Distributor_Info_Extend() { UserIds = parentIds, AuditStatus = DistributorAuditStatusEnum.Audited }); var dlist = distributor_InfoRepository.GetListForSingle(new RB_Distributor_Info_Extend() { UserIds = parentIds, AuditStatus = DistributorAuditStatusEnum.Audited });
List<int> pList = JsonConvert.DeserializeObject<List<int>>("[" + parentIds + "]"); List<int> pList = JsonConvert.DeserializeObject<List<int>>("[" + parentIds + "]");
foreach (var item in pList) { foreach (var item in pList)
{
var dmodel = dlist.Where(x => x.UserId == item).FirstOrDefault(); var dmodel = dlist.Where(x => x.UserId == item).FirstOrDefault();
if (dmodel != null) { if (dmodel != null)
{
distributorIds += item + ","; distributorIds += item + ",";
} }
} }
if (!string.IsNullOrEmpty(distributorIds)) { if (!string.IsNullOrEmpty(distributorIds))
{
distributorIds = distributorIds[0..^1]; distributorIds = distributorIds[0..^1];
} }
var userList = member_UserRepository.GetList(new RB_Member_User_Extend { UserIds = parentIds });
if (userList != null && userList.Any(x => x.SuperiorId == 0))
{
int userId = userList.Where(x => x.SuperiorId == 0).FirstOrDefault()?.Id ?? 0;
var eduSellModel = GetEducationSellBaseInfo(new RB_Education_EduSell_Extend { UserId = userId }).FirstOrDefault();
if (eduSellModel != null && eduSellModel.Id > 0)
{
eduUserId = eduSellModel.EduSellId;
}
}
} }
Dictionary<string, object> keyValues = new Dictionary<string, object>() { Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Goods_Order_Extend.UserTree),parentIds }, { nameof(RB_Goods_Order_Extend.UserTree),parentIds },
{ nameof(RB_Education_Consult_Extend.EduUserId),eduUserId },
{ nameof(RB_Goods_Order_Extend.DistributorTree),distributorIds } { nameof(RB_Goods_Order_Extend.DistributorTree),distributorIds }
}; };
List<WhereHelper> wheres = new List<WhereHelper>() { List<WhereHelper> wheres = new List<WhereHelper>() {
...@@ -7561,7 +7718,8 @@ namespace Mall.Module.Product ...@@ -7561,7 +7718,8 @@ namespace Mall.Module.Product
IsNoTax = item.IsNoTax, IsNoTax = item.IsNoTax,
DepositMoney = item.DepositMoney, DepositMoney = item.DepositMoney,
DepositFreightMoney = item.DepositFreightMoney, DepositFreightMoney = item.DepositFreightMoney,
DepositRefundMoney = item.DepositRefundMoney DepositRefundMoney = item.DepositRefundMoney,
ClassId = item.ClassId
}, trans); }, trans);
item.Id = detailId; item.Id = detailId;
if (detailId > 0 && SatisfiedGoodsList.Any()) if (detailId > 0 && SatisfiedGoodsList.Any())
...@@ -7846,6 +8004,7 @@ namespace Mall.Module.Product ...@@ -7846,6 +8004,7 @@ namespace Mall.Module.Product
//回滚商品库存 //回滚商品库存
if (type == 1) if (type == 1)
{ {
List<int> classIdList = new List<int>();
int TotalIntegralNumber = 0; int TotalIntegralNumber = 0;
var detailList = goods_OrderDetailRepository.GetOrderDetailList(new RB_Goods_OrderDetail_Extend() { OrderId = omodel.OrderId, TenantId = tenantId, MallBaseId = mallBaseId }); var detailList = goods_OrderDetailRepository.GetOrderDetailList(new RB_Goods_OrderDetail_Extend() { OrderId = omodel.OrderId, TenantId = tenantId, MallBaseId = mallBaseId });
if (detailList.Any()) if (detailList.Any())
...@@ -8005,6 +8164,11 @@ namespace Mall.Module.Product ...@@ -8005,6 +8164,11 @@ namespace Mall.Module.Product
{ {
TotalIntegralNumber += (item.IntegralNumber ?? 0); TotalIntegralNumber += (item.IntegralNumber ?? 0);
} }
if (item.ClassId > 0)
{
classIdList.Add(item.ClassId);
}
} }
} }
var umodel = member_UserRepository.GetEntity(omodel.UserId); var umodel = member_UserRepository.GetEntity(omodel.UserId);
...@@ -8138,6 +8302,16 @@ namespace Mall.Module.Product ...@@ -8138,6 +8302,16 @@ namespace Mall.Module.Product
} }
} }
} }
if (classIdList != null && classIdList.Any())
{
var resultInfo = new
{
Msg = new { Order = classIdList },
};
System.Threading.Tasks.Task.Run(() => Common.Plugin.HttpHelper.HttpPost(Config.ReadConfigKey("EduUpdateGoodsSpecification"), JsonHelper.Serialize(resultInfo), "")) ;
}
} }
Task.Run(() => goods_LogRepository.Insert(new RB_Goods_Log() Task.Run(() => goods_LogRepository.Insert(new RB_Goods_Log()
{ {
...@@ -8602,10 +8776,34 @@ namespace Mall.Module.Product ...@@ -8602,10 +8776,34 @@ namespace Mall.Module.Product
}); });
//收货 自动确认订单 //收货 自动确认订单
SetOrderOperation(omodel.RefMapperTo<RB_Goods_Order_Extend>(), 6, "", 0,tenantId, mallBaseId, accessor); SetOrderOperation(omodel.RefMapperTo<RB_Goods_Order_Extend>(), 6, "", 0, tenantId, mallBaseId, accessor);
} }
return flag; return flag;
} }
#endregion #endregion
/// <summary>
/// 获取教育销售的基础信息
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Education_EduSell_Extend> GetEducationSellBaseInfo(RB_Education_EduSell_Extend query)
{
var list = education_EduSellRepository.GetEducationSellBaseInfo(query);
if (list != null && list.Any(x => x.EduSellId > 0))
{
string qIds = string.Join(",", list.Where(x => x.EduSellId > 0).Distinct().Select(x => x.EduSellId));
var employeeList = RB_AccountRepository.GetEmployeeListRepository(new Employee_ViewModel { QIds = qIds }).ToList();
if (employeeList != null && employeeList.Any())
{
foreach (var item in list)
{
item.employeeModel = new Employee_ViewModel();
item.employeeModel = employeeList.Where(x => x.Id == item.EduSellId).FirstOrDefault();
}
}
}
return list;
}
} }
} }
...@@ -92,6 +92,11 @@ namespace Mall.Module.Product ...@@ -92,6 +92,11 @@ namespace Mall.Module.Product
/// 商品规格价格 /// 商品规格价格
/// </summary> /// </summary>
private readonly RB_Goods_SpecificationPriceRepository goods_SpecificationPriceRepository = new RB_Goods_SpecificationPriceRepository(); private readonly RB_Goods_SpecificationPriceRepository goods_SpecificationPriceRepository = new RB_Goods_SpecificationPriceRepository();
/// <summary>
/// 商品优惠仓储类
/// </summary>
private readonly RB_Goods_PreferentialRepository RB_Goods_PreferentialRepository = new RB_Goods_PreferentialRepository();
/// <summary> /// <summary>
/// 分销商等级 /// 分销商等级
/// </summary> /// </summary>
...@@ -2452,6 +2457,13 @@ namespace Mall.Module.Product ...@@ -2452,6 +2457,13 @@ namespace Mall.Module.Product
tempLogo = new MarketingLogoItem(); tempLogo = new MarketingLogoItem();
} }
} }
List<RB_Goods_Preferential_Extend> goodsPreferentialList = new List<RB_Goods_Preferential_Extend>();
goodsPreferentialList = RB_Goods_PreferentialRepository.GetGoodsPreferentialListRepostory(new RB_Goods_Preferential_Extend { TenantId = model.TenantId, MallBaseId = model.MallBaseId, GoodsId = model.Id });
return new return new
{ {
goods = new goods = new
...@@ -2598,6 +2610,11 @@ namespace Mall.Module.Product ...@@ -2598,6 +2610,11 @@ namespace Mall.Module.Product
fatcode=model.FatCode, fatcode=model.FatCode,
goodsurl= model.GoodsUrl, goodsurl= model.GoodsUrl,
goodsLogo=model.goodsLogo, goodsLogo=model.goodsLogo,
goodsPreferentialList= goodsPreferentialList?.Select(x=>new {x.Id,
x.PriceDiscountTypeStr,
x.PriceDiscountType,
x.PriceMoney
})
}, },
delivery = "" delivery = ""
}; };
......
...@@ -389,7 +389,7 @@ namespace Mall.Module.User ...@@ -389,7 +389,7 @@ namespace Mall.Module.User
keyValues.Add(nameof(RB_Goods_Order_Extend.OrderStatus), Common.Enum.Goods.OrderStatusEnum.WaitReceiving); keyValues.Add(nameof(RB_Goods_Order_Extend.OrderStatus), Common.Enum.Goods.OrderStatusEnum.WaitReceiving);
keyValues.Add(nameof(RB_Goods_Order_Extend.DeliveryTime), DateTime.Now); keyValues.Add(nameof(RB_Goods_Order_Extend.DeliveryTime), DateTime.Now);
} }
else if (oldOrder.OrderClassify == 2) else if (oldOrder.OrderClassify == 2 || oldOrder.VersionSource == 1)
{ {
//教育订单 下单后 直接完成 无法取消订单 无法申请售后 //教育订单 下单后 直接完成 无法取消订单 无法申请售后
keyValues.Add(nameof(RB_Goods_Order_Extend.OrderStatus), Common.Enum.Goods.OrderStatusEnum.Completed); keyValues.Add(nameof(RB_Goods_Order_Extend.OrderStatus), Common.Enum.Goods.OrderStatusEnum.Completed);
...@@ -581,13 +581,18 @@ namespace Mall.Module.User ...@@ -581,13 +581,18 @@ namespace Mall.Module.User
//赠送粉象等级(+VIP返佣) ld 2020-08-03 //赠送粉象等级(+VIP返佣) ld 2020-08-03
var FXCOrder = oldOrder.RefMapperTo<RB_Goods_Order_Extend>(); var FXCOrder = oldOrder.RefMapperTo<RB_Goods_Order_Extend>();
FXCOrder.DetailList = orderGoodsList; FXCOrder.DetailList = orderGoodsList;
System.Threading.Tasks.Task.Run(() => InsertPresentFXGradeCommission(FXCOrder, Out_Trade_No,oldOrder.UserId ?? 0, oldOrder.OrderId)); System.Threading.Tasks.Task.Run(() => InsertPresentFXGradeCommission(FXCOrder, Out_Trade_No, oldOrder.UserId ?? 0, oldOrder.OrderId));
if (oldOrder.OrderClassify == 2) if (oldOrder.OrderClassify == 2)
{ {
//教育订单付款后订单状态为已完成 直接返佣 //教育订单付款后订单状态为已完成 直接返佣
InsertOrderCommissionCompleted(oldOrder.RefMapperTo<RB_Goods_Order_Extend>()); InsertOrderCommissionCompleted(oldOrder.RefMapperTo<RB_Goods_Order_Extend>());
} }
if (oldOrder.VersionSource == 1 && orderGoodsList != null && orderGoodsList.Any(x => x.ClassId > 0))//教育订单并且订单商品是教育erp同步过来的
{
System.Threading.Tasks.Task.Run(() => Synchro(orderGoodsList, oldOrder));
}
//发送订阅消息 //发送订阅消息
string goodsName = orderGoodsList.FirstOrDefault().GoodsName; string goodsName = orderGoodsList.FirstOrDefault().GoodsName;
...@@ -883,7 +888,7 @@ namespace Mall.Module.User ...@@ -883,7 +888,7 @@ namespace Mall.Module.User
//获取订单商品 //获取订单商品
var orderGoodsList = goodsOrderDetailRepository.GetOrderDetailList(new RB_Goods_OrderDetail_Extend { TenantId = oldOrder.TenantId, MallBaseId = oldOrder.MallBaseId, OrderId = oldOrder.OrderId }); var orderGoodsList = goodsOrderDetailRepository.GetOrderDetailList(new RB_Goods_OrderDetail_Extend { TenantId = oldOrder.TenantId, MallBaseId = oldOrder.MallBaseId, OrderId = oldOrder.OrderId });
oldOrder.DetailList = orderGoodsList; oldOrder.DetailList = orderGoodsList;
System.Threading.Tasks.Task.Run(() => InsertPresentFXGradeCommission(oldOrder, oldOrder.MerchantsNo,oldOrder.UserId ?? 0, oldOrder.OrderId)); System.Threading.Tasks.Task.Run(() => InsertPresentFXGradeCommission(oldOrder, oldOrder.MerchantsNo, oldOrder.UserId ?? 0, oldOrder.OrderId));
} }
...@@ -1449,7 +1454,7 @@ namespace Mall.Module.User ...@@ -1449,7 +1454,7 @@ namespace Mall.Module.User
/// <param name="OrderId">vip购买单号id</param> /// <param name="OrderId">vip购买单号id</param>
/// <param name="BuyUserId">购买人</param> /// <param name="BuyUserId">购买人</param>
/// <returns></returns> /// <returns></returns>
public bool InsertVipBuyCommission(int BuyUserId, int OrderId, string Out_Trade_No,decimal Money, DateTime Time_End) public bool InsertVipBuyCommission(int BuyUserId, int OrderId, string Out_Trade_No, decimal Money, DateTime Time_End)
{ {
bool flag = false; bool flag = false;
try try
...@@ -2037,5 +2042,46 @@ namespace Mall.Module.User ...@@ -2037,5 +2042,46 @@ namespace Mall.Module.User
return flag; return flag;
} }
#endregion #endregion
#region 同步甲鹤小程序订单到教育erp中去
public void Synchro(List<RB_Goods_OrderDetail_Extend> orderDetailList, Model.Entity.Product.RB_Goods_Order model)
{
List<object> classList = new List<object>();
foreach (var item in orderDetailList.Where(x => x.ClassId > 0))
{
classList.Add(new
{
ClassId = item.ClassId,
GuestNum = item.Number,
Unit_Price = item.Unit_Price,
PreferPrice = item.Final_Price,
SaleRemark = model.Remark,
IsLessPrice = (item.CouponMoney ?? 0) > 0 ? 1 : 0,
LessPrice = (item.CouponMoney ?? 0),
Income = item.Final_Price - item.ServiceCharge,
DiscountMoney = 0,
PlatformTax = item.ServiceCharge,
EnterID = model.EduUserId > 0 ? model.EduUserId : 1,
GuestName = model.Consignee + "," + model.Mobile
});
}
if (classList!=null&& classList.Any())
{
var resultInfo = new
{
Msg = new { Order = classList, EnterID = model.EduUserId > 0 ? model.EduUserId : 1 },
};
string apiResult = Common.Plugin.HttpHelper.HttpPost(Config.ReadConfigKey("EduOrderApi"), JsonHelper.Serialize(resultInfo), "");
Newtonsoft.Json.Linq.JObject parmsJob = Newtonsoft.Json.Linq.JObject.Parse(apiResult);
string resultCode = parmsJob.GetStringValue("Code");
if (resultCode == "1")//新增记录
{
}
}
}
#endregion
} }
} }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mall.Common.Enum;
using Mall.Model.Entity.Product;
using Mall.Model.Extend.Product;
namespace Mall.Repository.Product
{
/// <summary>
/// 商品优惠仓储类
/// </summary>
public class RB_Goods_PreferentialRepository : BaseRepository<RB_Goods_Preferential>
{
/// <summary>
/// 获取商品优惠列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Goods_Preferential_Extend> GetGoodsPreferentialListRepostory(RB_Goods_Preferential_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Goods_Preferential
WHERE 1=1 ");
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Goods_Preferential_Extend.Status), (int)DateStateEnum.Normal);
if (query == null)
{
return new List<RB_Goods_Preferential_Extend>();
}
else
{
if (query.TenantId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Goods_Preferential_Extend.TenantId), query.TenantId);
}
if (query.MallBaseId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Goods_Preferential_Extend.MallBaseId), query.MallBaseId);
}
if (query.GoodsId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Goods_Preferential_Extend.GoodsId), query.GoodsId);
}
if (!string.IsNullOrEmpty(query.QGoodsIds))
{
builder.AppendFormat(" AND {0} IN({1}) ", nameof(RB_Goods_Preferential_Extend.GoodsId), query.QGoodsIds);
}
if (query.Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Goods_Preferential_Extend.Id), query.Id);
}
}
return Get<RB_Goods_Preferential_Extend>(builder.ToString()).ToList();
}
/// <summary>
/// 根据商品编号删除优惠信息
/// </summary>
/// <param name="GoodsId">商品编号</param>
/// <returns></returns>
public bool DeleteGoodsPreferentialRepostory(int GoodsId)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(" DELETE FROM RB_Goods_Preferential WHERE GoodsId={0} ", GoodsId);
return base.Execute(builder.ToString()) > 0;
}
}
}
...@@ -21,22 +21,28 @@ namespace Mall.Repository.Product ...@@ -21,22 +21,28 @@ namespace Mall.Repository.Product
public List<RB_Goods_SpecificationValue_Extend> GetList(RB_Goods_SpecificationValue_Extend dmodel) public List<RB_Goods_SpecificationValue_Extend> GetList(RB_Goods_SpecificationValue_Extend dmodel)
{ {
string where = $" 1=1 and {nameof(RB_Goods_SpecificationValue.Status)}=0"; string where = $" 1=1 and {nameof(RB_Goods_SpecificationValue.Status)}=0";
if (dmodel.TenantId > 0) { if (dmodel.TenantId > 0)
{
where += $@" and {nameof(RB_Goods_SpecificationValue.TenantId)}={dmodel.TenantId}"; where += $@" and {nameof(RB_Goods_SpecificationValue.TenantId)}={dmodel.TenantId}";
} }
if (dmodel.MallBaseId > 0) { if (dmodel.MallBaseId > 0)
{
where += $@" and {nameof(RB_Goods_SpecificationValue.MallBaseId)}={dmodel.MallBaseId}"; where += $@" and {nameof(RB_Goods_SpecificationValue.MallBaseId)}={dmodel.MallBaseId}";
} }
if (dmodel.Id > 0) { if (dmodel.Id > 0)
{
where += $@" and {nameof(RB_Goods_SpecificationValue.Id)}={dmodel.Id}"; where += $@" and {nameof(RB_Goods_SpecificationValue.Id)}={dmodel.Id}";
} }
if (dmodel.SpecificationId > 0) { if (dmodel.SpecificationId > 0)
{
where += $@" and {nameof(RB_Goods_SpecificationValue.SpecificationId)}={dmodel.SpecificationId}"; where += $@" and {nameof(RB_Goods_SpecificationValue.SpecificationId)}={dmodel.SpecificationId}";
} }
if (dmodel.GoodsId > 0) { if (dmodel.GoodsId > 0)
{
where += $@" and {nameof(RB_Goods_SpecificationValue.GoodsId)}={dmodel.GoodsId}"; where += $@" and {nameof(RB_Goods_SpecificationValue.GoodsId)}={dmodel.GoodsId}";
} }
if (!string.IsNullOrEmpty(dmodel.GoodsIds)) { if (!string.IsNullOrEmpty(dmodel.GoodsIds))
{
where += $@" and {nameof(RB_Goods_SpecificationValue.GoodsId)} in({dmodel.GoodsIds})"; where += $@" and {nameof(RB_Goods_SpecificationValue.GoodsId)} in({dmodel.GoodsIds})";
} }
...@@ -68,5 +74,28 @@ namespace Mall.Repository.Product ...@@ -68,5 +74,28 @@ namespace Mall.Repository.Product
return ""; return "";
} }
} }
/// <summary>
/// 获取规格值图片
/// </summary>
/// <param name="goodsId"></param>
/// <param name="specificationSort"></param>
/// <returns></returns>
public List<RB_Goods_SpecificationValue_Extend> GetSpecificationListImage(int goodsId, string specificationSort)
{
try
{
int Sort = Convert.ToInt32(specificationSort.Split(":")[0]);
string sql = $@"select * from RB_Goods_SpecificationValue where Status=0 and GoodsId={goodsId} and Sort={Sort} order by Id asc ";
return Get<RB_Goods_SpecificationValue_Extend>(sql).ToList();
}
catch (Exception)
{
return new List<RB_Goods_SpecificationValue_Extend>();
}
}
} }
} }
...@@ -58,6 +58,8 @@ ...@@ -58,6 +58,8 @@
"PaymentFinanceApi": "http://192.168.20.7:8083/api/Mall/InsertFinanceBatchForMallOut", "PaymentFinanceApi": "http://192.168.20.7:8083/api/Mall/InsertFinanceBatchForMallOut",
"ZYRefundFinanceApi": "http://192.168.20.7:8083/api/Mall/SetMallOrderSalesTheWayRefund", "ZYRefundFinanceApi": "http://192.168.20.7:8083/api/Mall/SetMallOrderSalesTheWayRefund",
"PropertyApi": "http://192.168.1.13:8087/api/ECWorkFlow/SetECSuppliesStockInFlow", "PropertyApi": "http://192.168.1.13:8087/api/ECWorkFlow/SetECSuppliesStockInFlow",
"EduOrderApi": "http://192.168.20.17:8017/api/Order/SetBatchClassOrder",
"EduUpdateGoodsSpecification": "http://192.168.20.17:8017/api/Order/UpdateGoodsSpecification",
"FinanceKey": "FinanceMallInsertToERPViitto2020", "FinanceKey": "FinanceMallInsertToERPViitto2020",
"SettlementRate": "0.60", "SettlementRate": "0.60",
"EduActivityIncomeFinanceId": "9", "EduActivityIncomeFinanceId": "9",
......
...@@ -279,9 +279,9 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A ...@@ -279,9 +279,9 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
var newOrderGoods = new RB_Goods_OrderDetail_Extend var newOrderGoods = new RB_Goods_OrderDetail_Extend
{ {
FinanceType = 1, FinanceType = 1,
Final_Price = orderGoodsItem.Final_Price-orderGoodsItem.DepositMoney, Final_Price = orderGoodsItem.Final_Price - orderGoodsItem.DepositMoney,
Number = 1, Number = 1,
FreightMoney = orderGoodsItem.FreightMoney-orderGoodsItem.DepositFreightMoney, FreightMoney = orderGoodsItem.FreightMoney - orderGoodsItem.DepositFreightMoney,
GoodsName = orderGoodsItem.GoodsName, GoodsName = orderGoodsItem.GoodsName,
OrderNo = orderGoodsItem.OrderNo, OrderNo = orderGoodsItem.OrderNo,
Id = orderGoodsItem.Id, Id = orderGoodsItem.Id,
...@@ -588,7 +588,7 @@ and DATE_FORMAT(a.PayTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') AND a ...@@ -588,7 +588,7 @@ and DATE_FORMAT(a.PayTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') AND a
{ {
CostTypeId = item.DepositIncomeTypeId, CostTypeId = item.DepositIncomeTypeId,
Number = 1, Number = 1,
OriginalMoney =x.SalePrice, OriginalMoney = x.SalePrice,
UnitPrice = x.SalePrice, UnitPrice = x.SalePrice,
Remark = x.Name + x.OrderNo Remark = x.Name + x.OrderNo
}); });
...@@ -671,6 +671,7 @@ and DATE_FORMAT(a.PayTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') AND a ...@@ -671,6 +671,7 @@ and DATE_FORMAT(a.PayTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') AND a
{ {
//查询未付款的所有订单 //查询未付款的所有订单
var olist = goods_OrderRepository.GetCanCancelOrderList(item.CancelTime, item.TenantId, item.MallBaseId); var olist = goods_OrderRepository.GetCanCancelOrderList(item.CancelTime, item.TenantId, item.MallBaseId);
List<int> classIdList = new List<int>();
foreach (var qitem in olist) foreach (var qitem in olist)
{ {
try try
...@@ -872,6 +873,10 @@ and DATE_FORMAT(a.PayTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') AND a ...@@ -872,6 +873,10 @@ and DATE_FORMAT(a.PayTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') AND a
{ {
TotalIntegralNumber += (ditem.IntegralNumber ?? 0); TotalIntegralNumber += (ditem.IntegralNumber ?? 0);
} }
if (ditem.ClassId > 0)
{
classIdList.Add(ditem.ClassId);
}
} }
} }
var umodel = member_UserRepository.GetEntity(qitem.UserId); var umodel = member_UserRepository.GetEntity(qitem.UserId);
...@@ -1025,6 +1030,16 @@ and DATE_FORMAT(a.PayTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') AND a ...@@ -1025,6 +1030,16 @@ and DATE_FORMAT(a.PayTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') AND a
continue; continue;
} }
} }
if (classIdList != null && classIdList.Any())
{
var resultInfo = new
{
Msg = new { Order = classIdList },
};
string apiResult = Common.Plugin.HttpHelper.HttpPost(Config.ReadConfigKey("EduUpdateGoodsSpecification"), JsonHelper.Serialize(resultInfo), "");
}
} }
} }
return true; return true;
......
{ {
"ConnectionStrings": { "ConnectionStrings": {
"DefaultConnection": "server=192.168.20.214;user id=reborn;password=Reborn@2018;database=test_reborn_mall_3;CharSet=utf8; Convert Zero Datetime=true; ", "DefaultConnection": "server=192.168.20.214;user id=reborn;password=Reborn@2018;database=test_reborn_mall;CharSet=utf8; Convert Zero Datetime=true; ",
"DefaultConnectionPName": "MySql.Data.MySqlClient", "DefaultConnectionPName": "MySql.Data.MySqlClient",
"FinanceConnection": "server=192.168.20.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8; Convert Zero Datetime=true; ", "FinanceConnection": "server=192.168.20.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8; Convert Zero Datetime=true; ",
"FinanceConnectionPName": "MySql.Data.MySqlClient" "FinanceConnectionPName": "MySql.Data.MySqlClient"
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
"RebornDMC": "reborn_dmc", "RebornDMC": "reborn_dmc",
"IncomeFinanceApi": "http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallIn", "IncomeFinanceApi": "http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallIn",
"PaymentFinanceApi": "http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallOut", "PaymentFinanceApi": "http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallOut",
"EduUpdateGoodsSpecification": "http://192.168.20.17:8017/api/Order/UpdateGoodsSpecification",
"PayCertificateUrl": "D:/project/GitProject/Shopping/Mall.WebApi/", "PayCertificateUrl": "D:/project/GitProject/Shopping/Mall.WebApi/",
"SettlementRate": "0.60", "SettlementRate": "0.60",
//"FinanceKey": "FinanceMallInsertToERPViitto2020", //"FinanceKey": "FinanceMallInsertToERPViitto2020",
......
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