Commit 86e5dac1 authored by 黄奎's avatar 黄奎

属性接口调整

parent cba31319
using VT.FW.DB;
using Mall.Common.Enum.User;
using System;
using System.Collections.Generic;
using System.Text;
using System;
using VT.FW.DB;
namespace Mall.Model.Entity.Product
{
......@@ -59,6 +56,8 @@ namespace Mall.Model.Entity.Product
/// 默认0,1-是,是日期格式,方便后面转换成日期
/// </summary>
public int IsDateFormat { get; set; }
/// <summary>
/// Status
/// </summary>
......
......@@ -1956,7 +1956,6 @@ namespace Mall.Module.Product
#region 获取商品的自定义表单
if (gList != null && gList.Any())
{
string formsIds = string.Join(",", gList.Where(x => x.FormsId > 1).Select(x => x.FormsId));
if (!string.IsNullOrWhiteSpace(formsIds))
{
......
......@@ -2528,6 +2528,7 @@ namespace Mall.Module.Product
EduTeacherId = model?.EduTeacherId ?? 0,
attr_groups = model.SpecificationList.Select(x => new
{
isdateformat = x.IsDateFormat,
attr_group_id = x.Sort,
attr_group_name = x.Name,
//购买次数(进阶小课堂使用)
......@@ -2539,6 +2540,7 @@ namespace Mall.Module.Product
pic_url = z.ImagePath
})
}),
attr = priceList,
goodsRelevanceList = goodsRelevanceList?.Select(qitem => new
{
qitem.RelevanceId,
......@@ -2584,7 +2586,6 @@ namespace Mall.Module.Product
area_type=x.AreaType
}) } },
form_id = model.FormsId,
//form_data_json= new { formData = !string.IsNullOrWhiteSpace(customFormModel.FormData)?JsonConvert.DeserializeObject<List<Model.Extend.TradePavilion.FormDataItem>>(customFormModel.FormData):new List<Model.Extend.TradePavilion.FormDataItem>(), formType=customFormModel.FormType },
sales = (model.SalesNum ?? 0) + payment_num,//已售出数量 + 订单商品数量//
name = model.Name,
subname = model?.SubName ?? "",
......@@ -2596,7 +2597,7 @@ namespace Mall.Module.Product
video_url = model?.VideoAddress ?? "",
level_show = (userModel?.MemberGrade ?? 0) > 0 ? 1 : 2,//是否显示会员价
is_sales = model.GoodsStatus == 1 && model.InventoryNum > 0 ? 1 : 2,//是否可购买
attr = priceList,
//goods_num = model.InventoryNum,
goods_no = model.GoodsNumbers,
goods_weight = model.GoodsWeight,
......
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