Commit 2059a107 authored by 黄奎's avatar 黄奎
parents 2e1eea62 87ef2099
...@@ -303,7 +303,7 @@ namespace Mall.Module.Product ...@@ -303,7 +303,7 @@ namespace Mall.Module.Product
} }
} }
var scList = goods_ShoppingCartRepository.GetList(new RB_Goods_ShoppingCart_Extend() { UserId = demodel.UserId, SpecificationSort = demodel.SpecificationSort, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }); var scList = goods_ShoppingCartRepository.GetList(new RB_Goods_ShoppingCart_Extend() { GoodsId = demodel.GoodsId, UserId = demodel.UserId, SpecificationSort = demodel.SpecificationSort, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
if (scList.Any()) if (scList.Any())
{ {
//更新数量 //更新数量
...@@ -930,7 +930,7 @@ namespace Mall.Module.Product ...@@ -930,7 +930,7 @@ namespace Mall.Module.Product
integralModel = integral_SettingsRepository.GetIntegralSettingsList(new Model.Entity.MarketingCenter.RB_Integral_Settings() { TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }).FirstOrDefault(); integralModel = integral_SettingsRepository.GetIntegralSettingsList(new Model.Entity.MarketingCenter.RB_Integral_Settings() { TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }).FirstOrDefault();
} }
//快递默认 //快递默认
demodel.DeliveryMethod ??= OrderDeliveryMethodEnum.ExpressDistribution; //demodel.DeliveryMethod ??= OrderDeliveryMethodEnum.ExpressDistribution;
#region 快递列表 #region 快递列表
var mallbaseModel = mallBaseRepository.GetListRepository(new Model.Extend.BaseSetUp.RB_MallBase_Extend() { TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }).FirstOrDefault(); var mallbaseModel = mallBaseRepository.GetListRepository(new Model.Extend.BaseSetUp.RB_MallBase_Extend() { TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }).FirstOrDefault();
var Delivery = new object(); var Delivery = new object();
...@@ -951,7 +951,7 @@ namespace Mall.Module.Product ...@@ -951,7 +951,7 @@ namespace Mall.Module.Product
}); });
} }
} }
if (arr.Any()) {//设置默认发货方式 if (arr.Any() && demodel.DeliveryMethod == 0) {//设置默认发货方式
var delmodel = DelivertList.Where(x => x.Value == arr[0]).FirstOrDefault(); var delmodel = DelivertList.Where(x => x.Value == arr[0]).FirstOrDefault();
demodel.DeliveryMethod = (OrderDeliveryMethodEnum)Convert.ToInt32(delmodel.Value); demodel.DeliveryMethod = (OrderDeliveryMethodEnum)Convert.ToInt32(delmodel.Value);
} }
...@@ -965,7 +965,7 @@ namespace Mall.Module.Product ...@@ -965,7 +965,7 @@ namespace Mall.Module.Product
#endregion #endregion
//获取用户的默认收货地址 //获取用户的默认收货地址
RB_Member_ShippingAddress_Extend defModel = new RB_Member_ShippingAddress_Extend(); RB_Member_ShippingAddress_Extend defModel;
if (demodel.AddressId > 0) if (demodel.AddressId > 0)
{ {
defModel = member_ShippingAddressRepository.GetEntity<RB_Member_ShippingAddress_Extend>(demodel.AddressId); defModel = member_ShippingAddressRepository.GetEntity<RB_Member_ShippingAddress_Extend>(demodel.AddressId);
...@@ -974,6 +974,7 @@ namespace Mall.Module.Product ...@@ -974,6 +974,7 @@ namespace Mall.Module.Product
{ {
defModel = member_ShippingAddressRepository.GetList(new RB_Member_ShippingAddress_Extend() { UserId = demodel.UserId, IsDefault = 1, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }).FirstOrDefault(); defModel = member_ShippingAddressRepository.GetList(new RB_Member_ShippingAddress_Extend() { UserId = demodel.UserId, IsDefault = 1, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }).FirstOrDefault();
} }
defModel ??= new RB_Member_ShippingAddress_Extend();
List<int> disList = new List<int>(); List<int> disList = new List<int>();
//地址 //地址
if (defModel.Id > 0) if (defModel.Id > 0)
...@@ -2476,6 +2477,7 @@ namespace Mall.Module.Product ...@@ -2476,6 +2477,7 @@ namespace Mall.Module.Product
if (umodel.DownlineCondition == Common.Enum.User.DistrbutorReferralsEnum.SCXD && umodel.IsBeDownline==2) { if (umodel.DownlineCondition == Common.Enum.User.DistrbutorReferralsEnum.SCXD && umodel.IsBeDownline==2) {
//首次下单成为下线 //首次下单成为下线
Dictionary<string, object> keyValues1 = new Dictionary<string, object>() { Dictionary<string, object> keyValues1 = new Dictionary<string, object>() {
{nameof(RB_Member_User_Extend.SuperiorId),umodel.WaitSuperiorId },
{nameof(RB_Member_User_Extend.IsBeDownline),1 }, {nameof(RB_Member_User_Extend.IsBeDownline),1 },
{nameof(RB_Member_User_Extend.BeDownlineDate),DateTime.Now }, {nameof(RB_Member_User_Extend.BeDownlineDate),DateTime.Now },
}; };
......
...@@ -1490,6 +1490,24 @@ namespace Mall.Module.Product ...@@ -1490,6 +1490,24 @@ namespace Mall.Module.Product
#endregion #endregion
#region 返回参数 #region 返回参数
string shipping = "";
if (model.FullNumPinkage > 0) {
shipping += "单品满" + model.FullNumPinkage + "件包邮";
}
if (model.FullMoneyPinkage > 0) {
if (model.FullNumPinkage > 0)
{
shipping += ",单品满¥" + model.FullMoneyPinkage.Value.ToString("#0.00") + "包邮";
}
else {
shipping += "单品满¥" + model.FullMoneyPinkage.Value.ToString("#0.00") + "包邮";
}
}
string limit = "";
if (model.AreaList.Any()) {
limit = "仅限" + string.Join(",", model.AreaList.Select(x => x.AreaName)) + "购买";
}
return new return new
{ {
goods = new goods = new
...@@ -1576,12 +1594,12 @@ namespace Mall.Module.Product ...@@ -1576,12 +1594,12 @@ namespace Mall.Module.Product
}), }),
share = model.MaxShare,//分销佣金 share = model.MaxShare,//分销佣金
favorite = model.Favorite,//是否收藏 favorite = model.Favorite,//是否收藏
//goods_marketing = new goods_marketing = new
//{ {
// limit = "", limit,
// pickup = "", pickup = "",
// shipping = "" shipping
//}, },
goods_marketing_award = new goods_marketing_award = new
{ {
integral = new integral = new
......
...@@ -268,6 +268,24 @@ namespace Mall.Module.User ...@@ -268,6 +268,24 @@ namespace Mall.Module.User
} }
}; };
goods_OrderRepository.Update(keyValues, wheres); goods_OrderRepository.Update(keyValues, wheres);
//下线
if (umodel.DownlineCondition == Common.Enum.User.DistrbutorReferralsEnum.SCFK && umodel.IsBeDownline == 2)
{
//首次下单成为下线
Dictionary<string, object> keyValues1 = new Dictionary<string, object>() {
{nameof(RB_Member_User_Extend.SuperiorId),umodel.WaitSuperiorId },
{nameof(RB_Member_User_Extend.IsBeDownline),1 },
{nameof(RB_Member_User_Extend.BeDownlineDate),DateTime.Now },
};
List<WhereHelper> wheres1 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Member_User_Extend.Id),
FiledValue=umodel.Id,
OperatorEnum=OperatorEnum.Equal
}
};
member_UserRepository.Update(keyValues1, wheres1);
}
} }
return flag; return flag;
} }
......
...@@ -56,6 +56,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -56,6 +56,7 @@ namespace Mall.WebApi.Controllers.MallBase
x.Price, x.Price,
x.InventoryNum, x.InventoryNum,
x.SpecificationList, x.SpecificationList,
x.SpecificationSort,
x.Number, x.Number,
x.GoodsStatus, x.GoodsStatus,
x.TenantId, x.TenantId,
......
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