Commit d278f89f authored by 黄奎's avatar 黄奎

页面修改

parent e0efde1a
......@@ -95,5 +95,10 @@ namespace Mall.Model.Entity.Product
get;
set;
}
/// <summary>
/// 关联讲义编号
/// </summary>
public int RelationId { get; set; }
}
}
......@@ -477,5 +477,10 @@ namespace Mall.Model.Extend.Product
/// 截止报名日期
/// </summary>
public string EndOrderTime { get; set; }
/// <summary>
/// 讲义价格
/// </summary>
public decimal BookPrice { get; set; }
}
}
......@@ -10,5 +10,14 @@ namespace Mall.Model.Extend.Product
/// </summary>
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
/// </summary>
public string GoodsName { get; set; }
/// <summary>
/// 教育商品扩展属性
/// </summary>
public string EduJsonData { get; set; }
/// <summary>
/// 课程评分
/// </summary>
......@@ -88,6 +93,11 @@ namespace Mall.Model.Extend.Product
/// </summary>
public RB_FreeShipping_Extend FreeShippingModel { get; set; }
/// <summary>
/// 绑定物品列表
/// </summary>
public List<RB_Goods_Relevance_Extend> GoodsRelevanceList { get; set; }
/// <summary>
/// 单品满件包邮
/// </summary>
......@@ -109,5 +119,10 @@ namespace Mall.Model.Extend.Product
/// 营销标识
/// </summary>
public string MarketingLogo { get; set; }
/// <summary>
/// 教育产品信息
/// </summary>
public GoodsJsonItem EduData { get; set;}
}
}
This diff is collapsed.
......@@ -690,6 +690,7 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
jsonItem.ClassPersion = jObj.GetInt("ClassPersion");
jsonItem.TeacherInfo = jObj.GetStringValue("TeacherInfo");
jsonItem.EndOrderTime = jObj.GetStringValue("EndOrderTime");
jsonItem.BookPrice = jObj.GetDecimal("BookPrice");
}
}
catch
......
......@@ -36,7 +36,14 @@ WHERE 1=1
{
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();
}
}
......
......@@ -48,9 +48,11 @@ namespace Mall.Repository.Product
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,
g.EnjoyMember,g.SeparateSetMember,g.InventoryNum,g.FullNumPinkage,g.FullMoneyPinkage,g.MarketingLogo,g.CourseScore,g.GoodsClassify from RB_Goods_ShoppingCart sc
inner join RB_Goods g on sc.GoodsId=g.Id
string sql = $@"
select sc.*,g.Name as GoodsName,g.GoodsStatus,g.CarouselImage,g.SellingPrice as Price,g.IsCustomSpecification,g.DefaultSpecificationName
,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";
return GetPage<RB_Goods_ShoppingCart_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
}
......
......@@ -1873,9 +1873,9 @@ namespace Mall.WebApi.Controllers
lastItem.id = tempGood.Id;
lastItem.name = tempGood.Name;
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.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2);
lastItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2) + (eduJson?.BookPrice ?? 0);
lastItem.courseScore = (tempGood.CourseScore ?? 0);
//HK 2022-10-10新增字段
lastItem.eduteachericon = eduJson?.TeacherIcon ?? "";
......@@ -1909,11 +1909,11 @@ namespace Mall.WebApi.Controllers
childItem.goodsList.Add(new GoodsDetailsItem2()
{
id = gItem.Id,
price = Math.Round((gItem?.SellingPrice ?? 0), 2),
price = Math.Round((gItem?.SellingPrice ?? 0), 2) + (eduJson?.BookPrice ?? 0),
name = gItem.Name,
subname=gItem.SubName,
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,
eduteachericon=eduJson?.TeacherIcon??"",
eduteachername=eduJson?.TeacherName??"",
......@@ -2041,11 +2041,11 @@ namespace Mall.WebApi.Controllers
goodsData.list.Add(new GoodsDetailsItem2()
{
id = gItem.Id,
price = Math.Round((gItem?.SellingPrice ?? 0), 2),
price = Math.Round((gItem?.SellingPrice ?? 0), 2) + (eduJson?.BookPrice ?? 0),
name = gItem.Name,
subname=gItem.SubName,
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,
eduteachericon=eduJson?.TeacherIcon??"",
eduteachername=eduJson?.TeacherName??"",
......@@ -2172,9 +2172,9 @@ namespace Mall.WebApi.Controllers
childItem.id = tempGood.Id;
childItem.name = tempGood?.Name ?? "";
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.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2);
childItem.OriginalPrice = Math.Round((tempGood?.OriginalPrice ?? 0), 2) + (eduJson?.BookPrice ?? 0);
childItem.courseScore = (tempGood.CourseScore ?? 0);
childItem.eduteachericon = eduJson?.TeacherIcon ?? "";
childItem.eduteachername = eduJson?.TeacherName ?? "";
......
......@@ -420,6 +420,8 @@ namespace Mall.WebApi.Controllers.MallBase
tempLogo = new MarketingLogoItem();
}
}
//进阶小课堂扩展字段
var jsonItem = productModule.ParsingEduJsonModule(model.EduJsonData);
RList.Add(new
{
......@@ -435,6 +437,7 @@ namespace Mall.WebApi.Controllers.MallBase
is_negotiable = model.IsGoodsNegotiable,
is_level = model.EnjoyMember,
level_price = memberprice,
edudata= jsonItem,
price = (model.SellingPrice ?? 0).ToString("#0.00"),
price_content = "¥" + (model.SellingPrice ?? 0).ToString("#0.00"),
is_sales = model.GoodsStatus,
......
......@@ -87,10 +87,14 @@ namespace Mall.WebApi.Controllers.MallBase
FreeShippingFullNumPinkage = x.FreeShippingModel.FullNumPinkage ?? 0,
x.FreeShippingModel.FreeShippingUrl,
x.MarketingLogo,
x.CourseScore
x.CourseScore,
x.GoodsRelevanceList,
x.EduData,
});
List<object> robj = new List<object>() {
new {
List<object> robj = new List<object>()
{
new
{
MallId =MallModel?.MallBaseId??0,
MallName =MallModel?.MallName??"",
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