Commit d278f89f authored by 黄奎's avatar 黄奎

页面修改

parent e0efde1a
...@@ -95,5 +95,10 @@ namespace Mall.Model.Entity.Product ...@@ -95,5 +95,10 @@ namespace Mall.Model.Entity.Product
get; get;
set; set;
} }
/// <summary>
/// 关联讲义编号
/// </summary>
public int RelationId { get; set; }
} }
} }
...@@ -477,5 +477,10 @@ namespace Mall.Model.Extend.Product ...@@ -477,5 +477,10 @@ namespace Mall.Model.Extend.Product
/// 截止报名日期 /// 截止报名日期
/// </summary> /// </summary>
public string EndOrderTime { get; set; } public string EndOrderTime { get; set; }
/// <summary>
/// 讲义价格
/// </summary>
public decimal BookPrice { get; set; }
} }
} }
...@@ -10,5 +10,14 @@ namespace Mall.Model.Extend.Product ...@@ -10,5 +10,14 @@ namespace Mall.Model.Extend.Product
/// </summary> /// </summary>
public class RB_Goods_Relevance_Extend : RB_Goods_Relevance public class RB_Goods_Relevance_Extend : RB_Goods_Relevance
{ {
/// <summary>
/// 查询关联编号
/// </summary>
public string QRelevanceIds { get; set; }
/// <summary>
/// 商品编号
/// </summary>
public string QGoodsIds { get; set; }
} }
} }
...@@ -19,6 +19,11 @@ namespace Mall.Model.Extend.Product ...@@ -19,6 +19,11 @@ namespace Mall.Model.Extend.Product
/// </summary> /// </summary>
public string GoodsName { get; set; } public string GoodsName { get; set; }
/// <summary>
/// 教育商品扩展属性
/// </summary>
public string EduJsonData { get; set; }
/// <summary> /// <summary>
/// 课程评分 /// 课程评分
/// </summary> /// </summary>
...@@ -88,6 +93,11 @@ namespace Mall.Model.Extend.Product ...@@ -88,6 +93,11 @@ namespace Mall.Model.Extend.Product
/// </summary> /// </summary>
public RB_FreeShipping_Extend FreeShippingModel { get; set; } public RB_FreeShipping_Extend FreeShippingModel { get; set; }
/// <summary>
/// 绑定物品列表
/// </summary>
public List<RB_Goods_Relevance_Extend> GoodsRelevanceList { get; set; }
/// <summary> /// <summary>
/// 单品满件包邮 /// 单品满件包邮
/// </summary> /// </summary>
...@@ -109,5 +119,10 @@ namespace Mall.Model.Extend.Product ...@@ -109,5 +119,10 @@ namespace Mall.Model.Extend.Product
/// 营销标识 /// 营销标识
/// </summary> /// </summary>
public string MarketingLogo { get; set; } public string MarketingLogo { get; set; }
/// <summary>
/// 教育产品信息
/// </summary>
public GoodsJsonItem EduData { get; set;}
} }
} }
using System; using Mall.AOP.CustomerAttribute;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Mall.AOP.CustomerAttribute;
using Mall.Common; using Mall.Common;
using Mall.Common.API; using Mall.Common.API;
using Mall.Common.Enum;
using Mall.Common.Enum.Goods; using Mall.Common.Enum.Goods;
using Mall.Common.Enum.User; using Mall.Common.Enum.User;
using Mall.Common.Plugin; using Mall.Common.Plugin;
...@@ -26,6 +21,10 @@ using Mall.Repository.Product; ...@@ -26,6 +21,10 @@ using Mall.Repository.Product;
using Mall.Repository.Reserve; using Mall.Repository.Reserve;
using Mall.Repository.User; using Mall.Repository.User;
using Newtonsoft.Json; using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using VT.FW.DB; using VT.FW.DB;
namespace Mall.Module.Product namespace Mall.Module.Product
...@@ -242,19 +241,27 @@ namespace Mall.Module.Product ...@@ -242,19 +241,27 @@ namespace Mall.Module.Product
/// vip购买记录 /// vip购买记录
/// </summary> /// </summary>
private readonly RB_Vip_BuyRepository vip_BuyRepository = new RB_Vip_BuyRepository(); private readonly RB_Vip_BuyRepository vip_BuyRepository = new RB_Vip_BuyRepository();
/// <summary> /// <summary>
/// vip购买返佣 /// vip购买返佣
/// </summary> /// </summary>
private readonly RB_VipBuy_CommissionRepository vipBuy_CommissionRepository = new RB_VipBuy_CommissionRepository(); private readonly RB_VipBuy_CommissionRepository vipBuy_CommissionRepository = new RB_VipBuy_CommissionRepository();
/// <summary> /// <summary>
/// 供应商 /// 供应商
/// </summary> /// </summary>
private readonly RB_SupplierRepository supplierRepository = new RB_SupplierRepository(); private readonly RB_SupplierRepository supplierRepository = new RB_SupplierRepository();
/// <summary> /// <summary>
/// 推荐供应商返佣比例 /// 推荐供应商返佣比例
/// </summary> /// </summary>
private readonly RB_SupplierCommissionRepository supplierCommissionRepository = new RB_SupplierCommissionRepository(); private readonly RB_SupplierCommissionRepository supplierCommissionRepository = new RB_SupplierCommissionRepository();
/// <summary>
/// 分类包邮规则仓储层对象
/// </summary>
private readonly RB_FreeShippingRepository freeShippingRepository = new RB_FreeShippingRepository(); private readonly RB_FreeShippingRepository freeShippingRepository = new RB_FreeShippingRepository();
/// <summary> /// <summary>
/// 全局包邮记录 /// 全局包邮记录
/// </summary> /// </summary>
...@@ -372,15 +379,21 @@ namespace Mall.Module.Product ...@@ -372,15 +379,21 @@ namespace Mall.Module.Product
/// </summary> /// </summary>
private readonly RB_Message_NoticeRepository message_NoticeRepository = new RB_Message_NoticeRepository(); private readonly RB_Message_NoticeRepository message_NoticeRepository = new RB_Message_NoticeRepository();
/// <summary> /// <summary>
/// 教育创建人 /// 教育创建人
/// </summary> /// </summary>
private readonly Repository.Education.RB_AccountRepository RB_AccountRepository = new Repository.Education.RB_AccountRepository(); private readonly Repository.Education.RB_AccountRepository RB_AccountRepository = new Repository.Education.RB_AccountRepository();
/// <summary> /// <summary>
/// 教育销售 /// 教育销售
/// </summary> /// </summary>
private readonly Repository.Education.RB_Education_EduSellRepository education_EduSellRepository = new Repository.Education.RB_Education_EduSellRepository(); private readonly Repository.Education.RB_Education_EduSellRepository education_EduSellRepository = new Repository.Education.RB_Education_EduSellRepository();
/// <summary>
/// 关联物品仓储层对象
/// </summary>
private readonly Repository.Product.RB_Goods_RelevanceRepository goods_RelevanceRepository = new RB_Goods_RelevanceRepository();
#region 购物车 #region 购物车
/// <summary> /// <summary>
...@@ -416,6 +429,14 @@ namespace Mall.Module.Product ...@@ -416,6 +429,14 @@ namespace Mall.Module.Product
string categoryIds = string.Join(",", categoryList.Select(x => x.CategoryId).Distinct()); string categoryIds = string.Join(",", categoryList.Select(x => x.CategoryId).Distinct());
var freeShippingList = freeShippingRepository.GetFreeShippingListByCategoryIds(new RB_FreeShipping_Extend { MallBaseId = demodel.MallBaseId, TenantId = demodel.TenantId, CategoryIds = categoryIds }); var freeShippingList = freeShippingRepository.GetFreeShippingListByCategoryIds(new RB_FreeShipping_Extend { MallBaseId = demodel.MallBaseId, TenantId = demodel.TenantId, CategoryIds = categoryIds });
//商品关联信息列表
string relationIds = string.Join(",", list.Where(qitem => qitem.RelationId > 0).Select(qitem => qitem.RelationId));
List<RB_Goods_Relevance_Extend> goodsRelevanceList = new List<RB_Goods_Relevance_Extend>();
if (!string.IsNullOrEmpty(relationIds))
{
goodsRelevanceList= goods_RelevanceRepository.GetGoodsRelevanceListRepository(new RB_Goods_Relevance_Extend() { QRelevanceIds = relationIds });
}
#region 微店价格 #region 微店价格
RB_SmallShops_Info_Extend smallModel = new RB_SmallShops_Info_Extend(); RB_SmallShops_Info_Extend smallModel = new RB_SmallShops_Info_Extend();
List<RB_SmallShops_Price_Extend> smallPList = new List<RB_SmallShops_Price_Extend>(); List<RB_SmallShops_Price_Extend> smallPList = new List<RB_SmallShops_Price_Extend>();
...@@ -434,6 +455,8 @@ namespace Mall.Module.Product ...@@ -434,6 +455,8 @@ namespace Mall.Module.Product
#endregion #endregion
foreach (var item in list) foreach (var item in list)
{ {
item.EduData = goodsRepository.ParsingEduJsonRepository(item.EduJsonData);
item.GoodsRelevanceList = goodsRelevanceList?.Where(qitem => qitem.RelevanceId == item.RelationId)?.ToList()??new List<RB_Goods_Relevance_Extend> ();
item.CoverImage = ""; item.CoverImage = "";
if (!string.IsNullOrEmpty(item.CarouselImage) && item.CarouselImage != "[]") if (!string.IsNullOrEmpty(item.CarouselImage) && item.CarouselImage != "[]")
{ {
...@@ -673,12 +696,16 @@ namespace Mall.Module.Product ...@@ -673,12 +696,16 @@ namespace Mall.Module.Product
{ {
//更新数量 //更新数量
var scModel = scList.FirstOrDefault(); var scModel = scList.FirstOrDefault();
Dictionary<string, object> keyValues = new Dictionary<string, object>() { Dictionary<string, object> keyValues = new Dictionary<string, object>()
{
{ nameof(RB_Goods_ShoppingCart.Number),scModel.Number + demodel.Number}, { nameof(RB_Goods_ShoppingCart.Number),scModel.Number + demodel.Number},
{ nameof(RB_Goods_ShoppingCart.UpdateDate),DateTime.Now}, { nameof(RB_Goods_ShoppingCart.UpdateDate),DateTime.Now},
{ nameof(RB_Goods_ShoppingCart.RelationId),demodel.RelationId},
}; };
List<WhereHelper> wheres = new List<WhereHelper>() { List<WhereHelper> wheres = new List<WhereHelper>()
new WhereHelper(){ {
new WhereHelper()
{
FiledName=nameof(RB_Goods_ShoppingCart.Id), FiledName=nameof(RB_Goods_ShoppingCart.Id),
FiledValue=scModel.Id, FiledValue=scModel.Id,
OperatorEnum=OperatorEnum.Equal OperatorEnum=OperatorEnum.Equal
...@@ -699,7 +726,8 @@ namespace Mall.Module.Product ...@@ -699,7 +726,8 @@ namespace Mall.Module.Product
Status = 0, Status = 0,
TenantId = demodel.TenantId, TenantId = demodel.TenantId,
UpdateDate = DateTime.Now, UpdateDate = DateTime.Now,
UserId = demodel.UserId UserId = demodel.UserId,
RelationId=demodel.RelationId,
}) > 0; }) > 0;
} }
if (flag) if (flag)
...@@ -1550,8 +1578,7 @@ namespace Mall.Module.Product ...@@ -1550,8 +1578,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;
#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();
...@@ -1646,17 +1673,15 @@ namespace Mall.Module.Product ...@@ -1646,17 +1673,15 @@ namespace Mall.Module.Product
List<RB_Goods_Preferential_Extend> goodsPreferentialList = new List<RB_Goods_Preferential_Extend>(); List<RB_Goods_Preferential_Extend> goodsPreferentialList = new List<RB_Goods_Preferential_Extend>();
if (!string.IsNullOrWhiteSpace(GoodsIds)) if (!string.IsNullOrWhiteSpace(GoodsIds))
{ {
goodsPreferentialList = RB_Goods_PreferentialRepository.GetGoodsPreferentialListRepostory(new RB_Goods_Preferential_Extend { TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId, QGoodsIds = 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 });
//HK 2022-10-11新增教育关联商品
var goodsRelevanceList = goods_RelevanceRepository.GetGoodsRelevanceListRepository(new RB_Goods_Relevance_Extend() { QGoodsIds = GoodsIds });
var speciList = goods_SpecificationRepository.GetList(new RB_Goods_Specification_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }); var speciList = goods_SpecificationRepository.GetList(new RB_Goods_Specification_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
var speciVList = goods_SpecificationValueRepository.GetList(new RB_Goods_SpecificationValue_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }); var speciVList = goods_SpecificationValueRepository.GetList(new RB_Goods_SpecificationValue_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
var speciPList = goods_SpecificationPriceRepository.GetList(new RB_Goods_SpecificationPrice_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }); var speciPList = goods_SpecificationPriceRepository.GetList(new RB_Goods_SpecificationPrice_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
...@@ -1789,6 +1814,7 @@ namespace Mall.Module.Product ...@@ -1789,6 +1814,7 @@ namespace Mall.Module.Product
foreach (var item in demodel.DetailList) foreach (var item in demodel.DetailList)
{ {
var gmodel = gList.Where(x => x.Id == item.GoodsId).FirstOrDefault(); var gmodel = gList.Where(x => x.Id == item.GoodsId).FirstOrDefault();
if (gmodel == null || gmodel.GoodsStatus != 1) if (gmodel == null || gmodel.GoodsStatus != 1)
{ {
continue; continue;
...@@ -2191,9 +2217,13 @@ namespace Mall.Module.Product ...@@ -2191,9 +2217,13 @@ namespace Mall.Module.Product
} }
#endregion #endregion
//绑定物品价格
var tempRelevancePrice = goodsRelevanceList?.Where(qitem => qitem.GoodsId == gmodel.Id)?.Sum(qitem => qitem.RelevancePrice) ?? 0;
Total_integral_price += (item.IntegralMoney ?? 0); Total_integral_price += (item.IntegralMoney ?? 0);
Total_use_integral += (item.IntegralNumber ?? 0); Total_use_integral += (item.IntegralNumber ?? 0);
TotalGoodsMoney += item.Final_Price ?? 0; TotalGoodsMoney += (item.Final_Price ?? 0)+ tempRelevancePrice;
TotalGoodsOriginalMoney += (gmodel.OriginalPrice ?? 0) * (item.Number ?? 0); TotalGoodsOriginalMoney += (gmodel.OriginalPrice ?? 0) * (item.Number ?? 0);
TotalGoodsSellMoney += gmodel.MemberPrice * (item.Number ?? 0); TotalGoodsSellMoney += gmodel.MemberPrice * (item.Number ?? 0);
item.Unit_Price = gmodel.SellingPrice ?? 0; item.Unit_Price = gmodel.SellingPrice ?? 0;
...@@ -2205,14 +2235,8 @@ namespace Mall.Module.Product ...@@ -2205,14 +2235,8 @@ 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);
...@@ -2258,6 +2282,7 @@ namespace Mall.Module.Product ...@@ -2258,6 +2282,7 @@ namespace Mall.Module.Product
} }
} }
} }
#region 处理全局包邮 #region 处理全局包邮
List<RB_FreeShipping_Extend> freeShippingList = new List<RB_FreeShipping_Extend>(); List<RB_FreeShipping_Extend> freeShippingList = new List<RB_FreeShipping_Extend>();
var SatisfiedGoodsListAll = new List<FreeShippingGoodsDetail>(); var SatisfiedGoodsListAll = new List<FreeShippingGoodsDetail>();
...@@ -2320,6 +2345,7 @@ namespace Mall.Module.Product ...@@ -2320,6 +2345,7 @@ namespace Mall.Module.Product
} }
} }
#endregion #endregion
List<int> ExpressGoodsId = new List<int>(); List<int> ExpressGoodsId = new List<int>();
//赋值 //赋值
foreach (var item in demodel.DetailList) foreach (var item in demodel.DetailList)
...@@ -2397,10 +2423,6 @@ namespace Mall.Module.Product ...@@ -2397,10 +2423,6 @@ namespace Mall.Module.Product
} }
} }
#region 运费 #region 运费
decimal Express = 0; decimal Express = 0;
string FreeShippingDescription = ""; string FreeShippingDescription = "";
...@@ -2691,13 +2713,17 @@ namespace Mall.Module.Product ...@@ -2691,13 +2713,17 @@ namespace Mall.Module.Product
tempLogo = new MarketingLogoItem(); tempLogo = new MarketingLogoItem();
} }
} }
//进阶小课堂扩展字段
var eduData = goodsRepository.ParsingEduJsonRepository(gmodel.EduJsonData);
goods_list.Add(new goods_list.Add(new
{ {
id = gmodel.Id, id = gmodel.Id,
name = gmodel.Name, name = gmodel.Name,
categoryIdList = item.CategoryIdList, categoryIdList = item.CategoryIdList,
specificationNameList = item.SpecificationNameList, specificationNameList = item.SpecificationNameList,
GoodsRelevanceList = goodsRelevanceList?.Where(qitem => qitem.GoodsId == gmodel.Id)?.ToList(),
num = item.Number, num = item.Number,
EduData = eduData,
forehead_integral = gmodel.PointsDeduction, forehead_integral = gmodel.PointsDeduction,
forehead_integral_type = gmodel.PointsDeductionType, forehead_integral_type = gmodel.PointsDeductionType,
accumulative = gmodel.IsMultipleDeduction,//累计多件抵扣 accumulative = gmodel.IsMultipleDeduction,//累计多件抵扣
...@@ -2730,9 +2756,6 @@ namespace Mall.Module.Product ...@@ -2730,9 +2756,6 @@ namespace Mall.Module.Product
integral_price = demodel.Use_Integral == 1 ? item.IntegralMoney : 0,//积分抵扣金额 integral_price = demodel.Use_Integral == 1 ? item.IntegralMoney : 0,//积分抵扣金额
use_integral = demodel.Use_Integral == 1 ? item.IntegralNumber : 0, use_integral = demodel.Use_Integral == 1 ? item.IntegralNumber : 0,
couponMoney, couponMoney,
//discount= [],
//extra= [],
//goods_warehouse_id = 19813,
name = gmodel.Name, name = gmodel.Name,
cover_pic = item.CoverImage, cover_pic = item.CoverImage,
detail = gmodel.GoodsDetails, detail = gmodel.GoodsDetails,
...@@ -2756,14 +2779,11 @@ namespace Mall.Module.Product ...@@ -2756,14 +2779,11 @@ namespace Mall.Module.Product
member_discount = ((item.Unit_Price ?? 0) * (item.Number ?? 0)) - (item.MemberPrice * (item.Number ?? 0)), member_discount = ((item.Unit_Price ?? 0) * (item.Number ?? 0)) - (item.MemberPrice * (item.Number ?? 0)),
cover_pic = item.CoverImage, cover_pic = item.CoverImage,
is_level_alone = gmodel.SeparateSetMember,//是否单独设置会员价 is_level_alone = gmodel.SeparateSetMember,//是否单独设置会员价
//custom_currency= [],
is_level = gmodel.EnjoyMember,//是否销售会员价格 is_level = gmodel.EnjoyMember,//是否销售会员价格
//goods_warehouse_id = 19813,
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),
}); });
} }
} }
...@@ -2806,7 +2826,6 @@ namespace Mall.Module.Product ...@@ -2806,7 +2826,6 @@ namespace Mall.Module.Product
pinkageList = PinkageList, pinkageList = PinkageList,
express_price = TotalExpress, express_price = TotalExpress,
remark = "", remark = "",
//order_form_data= [],
total_goods_price = TotalGoodsSellMoney, total_goods_price = TotalGoodsSellMoney,
total_goods_original_price = TotalGoodsOriginalMoney, total_goods_original_price = TotalGoodsOriginalMoney,
member_discount, member_discount,
...@@ -2832,15 +2851,12 @@ namespace Mall.Module.Product ...@@ -2832,15 +2851,12 @@ namespace Mall.Module.Product
use_deposit_id = TotalDepositMoney > 0 ? demodel.Use_Deposit_Id : 0 use_deposit_id = TotalDepositMoney > 0 ? demodel.Use_Deposit_Id : 0
}, },
delivery = Delivery, delivery = Delivery,
//store= null,
store_select_enable = true, store_select_enable = true,
total_price = TotalGoodsMoney, total_price = TotalGoodsMoney,
is_deduction_commission = IsDeductionCommission, is_deduction_commission = IsDeductionCommission,
deduction_commission = TotalDeductionCommission deduction_commission = TotalDeductionCommission
}); });
//minModel
List<string> template_message_list = new List<string>(); List<string> template_message_list = new List<string>();
if (minModel != null) if (minModel != null)
...@@ -2881,11 +2897,7 @@ namespace Mall.Module.Product ...@@ -2881,11 +2897,7 @@ namespace Mall.Module.Product
lonlat = defModel?.Lonlat lonlat = defModel?.Lonlat
}, },
address_enable, address_enable,
//has_ziti= false, template_message_list
//custom_currency_all= [],
//allZiti= false,
//hasCity= false,
template_message_list //new List<string>() { "WPELErDfYO3JnizA5Zikta6Y8qrBBAgecuj2aLoucuY", "pCmTJwvTqNpyRREo7vvqIYBcrATNWoitfbLS61fLhzU", "i6QPsaOHgfNwlIRMwmvFGSCqX28g0cRa8XaLZ5_gpgc" }
}; };
#endregion #endregion
return ApiResult.Success("", Robj); return ApiResult.Success("", Robj);
...@@ -3131,6 +3143,8 @@ namespace Mall.Module.Product ...@@ -3131,6 +3143,8 @@ namespace Mall.Module.Product
string GoodsIds = ""; string GoodsIds = "";
int TotalIntegralNumber = 0;//总使用积分 int TotalIntegralNumber = 0;//总使用积分
decimal TotalIntegralMoney = 0;//总使用积分抵扣金额 decimal TotalIntegralMoney = 0;//总使用积分抵扣金额
decimal totalRelevancePrice = 0;//总绑定物品金额
List<RB_Goods_CouponModel> GoodsCouponList = new List<RB_Goods_CouponModel>();//商品优惠卷 价格(每个商品优惠的价格) List<RB_Goods_CouponModel> GoodsCouponList = new List<RB_Goods_CouponModel>();//商品优惠卷 价格(每个商品优惠的价格)
decimal CouponsMoney = 0;//优惠卷验证 decimal CouponsMoney = 0;//优惠卷验证
#region 优惠卷初始化 #region 优惠卷初始化
...@@ -3197,6 +3211,16 @@ namespace Mall.Module.Product ...@@ -3197,6 +3211,16 @@ namespace Mall.Module.Product
int DefFreightId = 0;//默认运费id int DefFreightId = 0;//默认运费id
GoodsIds = string.Join(",", demodel.DetailList.Select(x => x.GoodsId)); GoodsIds = string.Join(",", demodel.DetailList.Select(x => x.GoodsId));
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 goodsRelevanceList = goods_RelevanceRepository.GetGoodsRelevanceListRepository(new RB_Goods_Relevance_Extend()
{
TenantId = demodel.TenantId,
MallBaseId = demodel.MallBaseId,
QGoodsIds = GoodsIds
});
//总绑定物品金额
totalRelevancePrice = goodsRelevanceList?.Sum(qitem => qitem.RelevancePrice) ?? 0;
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 });
var speciPList = goods_SpecificationPriceRepository.GetList(new RB_Goods_SpecificationPrice_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }); var speciPList = goods_SpecificationPriceRepository.GetList(new RB_Goods_SpecificationPrice_Extend() { GoodsIds = GoodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
...@@ -4282,8 +4306,9 @@ namespace Mall.Module.Product ...@@ -4282,8 +4306,9 @@ namespace Mall.Module.Product
{ {
return ApiResult.Failed("储值卡抵扣金额有误"); return ApiResult.Failed("储值卡抵扣金额有误");
} }
//验证总额
if (demodel.Income != (TotalMoney + TotalExpress - DeductionCommission - TotalDepositMoney)) //验证总额 (2022-10-11 HK新增绑定物品金额)
if (demodel.Income != (TotalMoney + TotalExpress - DeductionCommission - TotalDepositMoney+ totalRelevancePrice))
{ {
return ApiResult.Failed("订单合计金额不正确"); return ApiResult.Failed("订单合计金额不正确");
} }
......
...@@ -690,6 +690,7 @@ WHERE {where} group by g.Id order by g.CreateDate desc"; ...@@ -690,6 +690,7 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
jsonItem.ClassPersion = jObj.GetInt("ClassPersion"); jsonItem.ClassPersion = jObj.GetInt("ClassPersion");
jsonItem.TeacherInfo = jObj.GetStringValue("TeacherInfo"); jsonItem.TeacherInfo = jObj.GetStringValue("TeacherInfo");
jsonItem.EndOrderTime = jObj.GetStringValue("EndOrderTime"); jsonItem.EndOrderTime = jObj.GetStringValue("EndOrderTime");
jsonItem.BookPrice = jObj.GetDecimal("BookPrice");
} }
} }
catch catch
......
...@@ -36,7 +36,14 @@ WHERE 1=1 ...@@ -36,7 +36,14 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Goods_Relevance_Extend.GoodsId), query.GoodsId); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Goods_Relevance_Extend.GoodsId), query.GoodsId);
} }
if (!string.IsNullOrEmpty(query.QRelevanceIds))
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Goods_Relevance_Extend.RelevanceId), query.QRelevanceIds);
}
if (!string.IsNullOrEmpty(query.QGoodsIds))
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Goods_Relevance_Extend.GoodsId), query.QGoodsIds);
}
return Get<RB_Goods_Relevance_Extend>(builder.ToString()).ToList(); return Get<RB_Goods_Relevance_Extend>(builder.ToString()).ToList();
} }
} }
......
...@@ -48,9 +48,11 @@ namespace Mall.Repository.Product ...@@ -48,9 +48,11 @@ namespace Mall.Repository.Product
where += $@" and g.{nameof(RB_Goods_Extend.GoodsClassify)}={dmodel.GoodsClassify}"; where += $@" and g.{nameof(RB_Goods_Extend.GoodsClassify)}={dmodel.GoodsClassify}";
} }
string sql = $@"select sc.*,g.Name as GoodsName,g.GoodsStatus,g.CarouselImage,g.SellingPrice as Price,g.IsCustomSpecification,g.DefaultSpecificationName, string sql = $@"
g.EnjoyMember,g.SeparateSetMember,g.InventoryNum,g.FullNumPinkage,g.FullMoneyPinkage,g.MarketingLogo,g.CourseScore,g.GoodsClassify from RB_Goods_ShoppingCart sc select sc.*,g.Name as GoodsName,g.GoodsStatus,g.CarouselImage,g.SellingPrice as Price,g.IsCustomSpecification,g.DefaultSpecificationName
inner join RB_Goods g on sc.GoodsId=g.Id ,g.EnjoyMember,g.SeparateSetMember,g.InventoryNum,g.FullNumPinkage,g.FullMoneyPinkage,g.MarketingLogo,g.CourseScore,g.GoodsClassify
,g.EduJsonData
from RB_Goods_ShoppingCart sc inner join RB_Goods g on sc.GoodsId=g.Id
where {where} order by g.GoodsStatus asc,sc.CreateDate desc"; where {where} order by g.GoodsStatus asc,sc.CreateDate desc";
return GetPage<RB_Goods_ShoppingCart_Extend>(pageIndex, pageSize, out rowCount, sql).ToList(); return GetPage<RB_Goods_ShoppingCart_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
} }
......
...@@ -1873,9 +1873,9 @@ namespace Mall.WebApi.Controllers ...@@ -1873,9 +1873,9 @@ namespace Mall.WebApi.Controllers
lastItem.id = tempGood.Id; lastItem.id = tempGood.Id;
lastItem.name = tempGood.Name; lastItem.name = tempGood.Name;
lastItem.subname = tempGood?.SubName ?? ""; lastItem.subname = tempGood?.SubName ?? "";
lastItem.price = Math.Round((tempGood?.SellingPrice ?? 0), 2); lastItem.price = Math.Round((tempGood?.SellingPrice ?? 0), 2)+(eduJson?.BookPrice ?? 0);
lastItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : ""; lastItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : "";
lastItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2); lastItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2) + (eduJson?.BookPrice ?? 0);
lastItem.courseScore = (tempGood.CourseScore ?? 0); lastItem.courseScore = (tempGood.CourseScore ?? 0);
//HK 2022-10-10新增字段 //HK 2022-10-10新增字段
lastItem.eduteachericon = eduJson?.TeacherIcon ?? ""; lastItem.eduteachericon = eduJson?.TeacherIcon ?? "";
...@@ -1909,11 +1909,11 @@ namespace Mall.WebApi.Controllers ...@@ -1909,11 +1909,11 @@ namespace Mall.WebApi.Controllers
childItem.goodsList.Add(new GoodsDetailsItem2() childItem.goodsList.Add(new GoodsDetailsItem2()
{ {
id = gItem.Id, id = gItem.Id,
price = Math.Round((gItem?.SellingPrice ?? 0), 2), price = Math.Round((gItem?.SellingPrice ?? 0), 2) + (eduJson?.BookPrice ?? 0),
name = gItem.Name, name = gItem.Name,
subname=gItem.SubName, subname=gItem.SubName,
picUrl = Common.Config.GetFileUrl(gItem.CoverImage), picUrl = Common.Config.GetFileUrl(gItem.CoverImage),
OriginalPrice = Math.Round((gItem?.OriginalPrice ?? 0), 2), OriginalPrice = Math.Round((gItem?.OriginalPrice ?? 0), 2) + (eduJson?.BookPrice ?? 0),
courseScore = gItem.CourseScore ?? 0, courseScore = gItem.CourseScore ?? 0,
eduteachericon=eduJson?.TeacherIcon??"", eduteachericon=eduJson?.TeacherIcon??"",
eduteachername=eduJson?.TeacherName??"", eduteachername=eduJson?.TeacherName??"",
...@@ -2041,11 +2041,11 @@ namespace Mall.WebApi.Controllers ...@@ -2041,11 +2041,11 @@ namespace Mall.WebApi.Controllers
goodsData.list.Add(new GoodsDetailsItem2() goodsData.list.Add(new GoodsDetailsItem2()
{ {
id = gItem.Id, id = gItem.Id,
price = Math.Round((gItem?.SellingPrice ?? 0), 2), price = Math.Round((gItem?.SellingPrice ?? 0), 2) + (eduJson?.BookPrice ?? 0),
name = gItem.Name, name = gItem.Name,
subname=gItem.SubName, subname=gItem.SubName,
picUrl = Common.Config.GetFileUrl(gItem.CoverImage), picUrl = Common.Config.GetFileUrl(gItem.CoverImage),
OriginalPrice = Math.Round((gItem?.OriginalPrice ?? 0), 2), OriginalPrice = Math.Round((gItem?.OriginalPrice ?? 0), 2)+(eduJson?.BookPrice ?? 0),
courseScore = gItem.CourseScore ?? 0, courseScore = gItem.CourseScore ?? 0,
eduteachericon=eduJson?.TeacherIcon??"", eduteachericon=eduJson?.TeacherIcon??"",
eduteachername=eduJson?.TeacherName??"", eduteachername=eduJson?.TeacherName??"",
...@@ -2172,9 +2172,9 @@ namespace Mall.WebApi.Controllers ...@@ -2172,9 +2172,9 @@ namespace Mall.WebApi.Controllers
childItem.id = tempGood.Id; childItem.id = tempGood.Id;
childItem.name = tempGood?.Name ?? ""; childItem.name = tempGood?.Name ?? "";
childItem.subname = tempGood?.SubName ?? ""; childItem.subname = tempGood?.SubName ?? "";
childItem.price = Math.Round((tempGood?.SellingPrice ?? 0), 2); childItem.price = Math.Round((tempGood?.SellingPrice ?? 0), 2) + (eduJson?.BookPrice ?? 0);
childItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : ""; childItem.picUrl = tempGood?.CoverImage != null ? Common.Config.GetFileUrl(tempGood.CoverImage) : "";
childItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2); childItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2) + (eduJson?.BookPrice ?? 0);
childItem.courseScore = (tempGood.CourseScore ?? 0); childItem.courseScore = (tempGood.CourseScore ?? 0);
childItem.eduteachericon = eduJson?.TeacherIcon ?? ""; childItem.eduteachericon = eduJson?.TeacherIcon ?? "";
childItem.eduteachername = eduJson?.TeacherName ?? ""; childItem.eduteachername = eduJson?.TeacherName ?? "";
......
...@@ -420,6 +420,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -420,6 +420,8 @@ namespace Mall.WebApi.Controllers.MallBase
tempLogo = new MarketingLogoItem(); tempLogo = new MarketingLogoItem();
} }
} }
//进阶小课堂扩展字段
var jsonItem = productModule.ParsingEduJsonModule(model.EduJsonData);
RList.Add(new RList.Add(new
{ {
...@@ -435,6 +437,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -435,6 +437,7 @@ namespace Mall.WebApi.Controllers.MallBase
is_negotiable = model.IsGoodsNegotiable, is_negotiable = model.IsGoodsNegotiable,
is_level = model.EnjoyMember, is_level = model.EnjoyMember,
level_price = memberprice, level_price = memberprice,
edudata= jsonItem,
price = (model.SellingPrice ?? 0).ToString("#0.00"), price = (model.SellingPrice ?? 0).ToString("#0.00"),
price_content = "¥" + (model.SellingPrice ?? 0).ToString("#0.00"), price_content = "¥" + (model.SellingPrice ?? 0).ToString("#0.00"),
is_sales = model.GoodsStatus, is_sales = model.GoodsStatus,
......
...@@ -87,10 +87,14 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -87,10 +87,14 @@ namespace Mall.WebApi.Controllers.MallBase
FreeShippingFullNumPinkage = x.FreeShippingModel.FullNumPinkage ?? 0, FreeShippingFullNumPinkage = x.FreeShippingModel.FullNumPinkage ?? 0,
x.FreeShippingModel.FreeShippingUrl, x.FreeShippingModel.FreeShippingUrl,
x.MarketingLogo, x.MarketingLogo,
x.CourseScore x.CourseScore,
x.GoodsRelevanceList,
x.EduData,
}); });
List<object> robj = new List<object>() { List<object> robj = new List<object>()
new { {
new
{
MallId =MallModel?.MallBaseId??0, MallId =MallModel?.MallBaseId??0,
MallName =MallModel?.MallName??"", MallName =MallModel?.MallName??"",
GoodsList=listobj GoodsList=listobj
......
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