Commit 0cfb82ec authored by 黄奎's avatar 黄奎

页面修改

parent 8c4220a9
......@@ -2469,7 +2469,15 @@ namespace Mall.Model.Extend.MarketingCenter
/// </summary>
public int listStyle { get; set; }
/// <summary>
/// 类型(1-载体,2-品牌)
/// </summary>
public int goodType { get; set; }
/// <summary>
/// 添加方式【0-自动添加,1-手动添加】
/// </summary>
public int addGoodsType { get; set; }
/// <summary>
/// 背景颜色
......
......@@ -15,11 +15,6 @@ namespace Mall.Model.Extend.TradePavilion
public List<string> BannerList { get; set; }
/// <summary>
/// 商铺性质
/// </summary>
//public string ProjectName { get { return Common.Plugin.EnumHelper.GetEnumName(this.ProjectType); } }
public string ProjectName { get; set; }
......@@ -57,5 +52,15 @@ namespace Mall.Model.Extend.TradePavilion
/// 认证用户头像
/// </summary>
public string UserIcon { get; set; }
/// <summary>
/// 排序(1-默认,2主键倒序)
/// </summary>
public int QOrderBy { get; set; }
/// <summary>
/// 取几天数据
/// </summary>
public int QTop { get; set; }
}
}
......@@ -19,7 +19,7 @@ namespace Mall.Model.Extend.TradePavilion
public List<string> BannerList { get; set; }
/// <summary>
/// 排序
/// 排序(1-创建时间倒序,2-开业时间倒序)
/// </summary>
public int OrderBy { get; set; }
......@@ -61,5 +61,10 @@ namespace Mall.Model.Extend.TradePavilion
/// 认证用户头像
/// </summary>
public string UserIcon { get; set; }
/// <summary>
/// 查询多少条数据
/// </summary>
public int QTop { get; set; }
}
}
......@@ -937,6 +937,33 @@ namespace Mall.Module.MarketingCenter
//导航-页面
case "nav-page": item.data = JsonHelper.DeserializeObject<navPageItem>(item.data.ToString()); break;
//首店-自定义列表
case "tradePavilionCustom":
educationCustomItem tradePavilionCustomModel = new educationCustomItem();
try
{
var tradeData = JsonHelper.DeserializeObject<educationCustomItem>(item.data.ToString());
if (tradeData != null)
{
tradePavilionCustomModel.goodsLength = tradeData?.goodsLength ?? 1;
tradePavilionCustomModel.addGoodsType = tradeData?.addGoodsType ?? 1;
tradePavilionCustomModel.goodType = tradeData?.goodType ?? 1;
tradePavilionCustomModel.listStyle = tradeData?.listStyle ?? 1;
tradePavilionCustomModel.backgroundColor = tradeData?.backgroundColor ?? "";
tradePavilionCustomModel.PaddingTop = tradeData?.PaddingTop ?? "0";
tradePavilionCustomModel.PaddingBottom = tradeData?.PaddingBottom ?? "0";
tradePavilionCustomModel.PaddingLeft = tradeData?.PaddingLeft ?? "0";
tradePavilionCustomModel.PaddingRight = tradeData?.PaddingRight ?? "0";
tradePavilionCustomModel.SearchFilletPX = tradeData?.SearchFilletPX ?? 0;
tradePavilionCustomModel.list = new List<CustomDetailsItem2>();
tradePavilionCustomModel.list = tradeData.list;
}
}
catch
{
}
item.data = tradePavilionCustomModel;
break;
}
}
......
......@@ -10,6 +10,9 @@ using Mall.Common.Plugin;
namespace Mall.Module.TradePavilion
{
/// <summary>
/// 载体处理类
/// </summary>
public class CarrierModule
{
/// <summary>
......
......@@ -62,7 +62,6 @@ namespace Mall.Module.TradePavilion
list.Add(new WhereHelper(nameof(RB_Custom_Form_Extend.Id), model.Id, OperatorEnum.NotEqual));
}
return custom_FormRepository.Exists(list);
}
/// <summary>
......
......@@ -289,6 +289,16 @@ WHERE 1=1
{
builder.AppendFormat(" AND a.{0}={1} ", nameof(RB_Brand_Extend.ProjectType), (int)query.ProjectType);
}
}
if (query.QOrderBy == 2)
{
builder.AppendFormat(" ORDER BY a.{0} DESC ", nameof(RB_Brand_Extend.ID));
}
if (query.QTop > 0)
{
builder.AppendFormat(" LIMIT {0} ", query.QTop);
}
return Get<RB_Brand_Extend>(builder.ToString(), parameters).ToList();
}
......
......@@ -163,6 +163,11 @@ namespace Mall.Repository.TradePavilion
{
builder.Append($" order by {nameof(RB_Carrier_Extend.OpenTime)} desc");
}
if (query.QTop > 0)
{
builder.Append($" LIMIT {query.QTop} ");
}
}
return Get<RB_Carrier_Extend>(builder.ToString()).ToList();
}
......
......@@ -5,11 +5,13 @@ using Mall.Model.Extend.BaseSetUp;
using Mall.Model.Extend.MarketingCenter;
using Mall.Model.Extend.Miai;
using Mall.Model.Extend.Product;
using Mall.Model.Extend.TradePavilion;
using Mall.Model.Extend.User;
using Mall.Module.BaseSetUp;
using Mall.Module.MarketingCenter;
using Mall.Module.Product;
using Mall.Module.Reserve;
using Mall.Module.TradePavilion;
using Mall.Module.User;
using Mall.Repository.Miai;
using Mall.Repository.Product;
......@@ -101,7 +103,12 @@ namespace Mall.WebApi.Controllers
private static Module.Miai.MiaiModule miaiModule = new Module.Miai.MiaiModule();
private static Module.TradePavilion.CommerceActivityModule commerceActivityModule = new Module.TradePavilion.CommerceActivityModule();
private static CommerceActivityModule commerceActivityModule = new CommerceActivityModule();
/// <summary>
/// 载体处理类对象
/// </summary>
private static CarrierModule carrierModule = new CarrierModule();
......@@ -1922,6 +1929,74 @@ namespace Mall.WebApi.Controllers
data = blindDatePPPlusData
};
break;
//首店-自定义列表插件
case "tradePavilionCustom":
var tradeData = subItem.data as educationCustomItem;
if (tradeData != null)
{
//自动添加
if (tradeData.addGoodsType == 0)
{
tradeData.list = new List<CustomDetailsItem2>();
//载体
if (tradeData.goodType == 1)
{
var carrierList = carrierModule.GetCarrierList(new RB_Carrier_Extend()
{
TenantId = TenantId,
OrderBy = 1,
QTop = tradeData.goodsLength
});
foreach (var cItem in carrierList)
{
var dModel = new CustomDetailsItem2()
{
id = cItem.ID,
name = cItem.CarrierName,
picUrl = cItem.Logo,
lableName = cItem.CarrierPlan,
lableNameList = new List<string>(),
linkUrl = string.Format("/pages/kotra/carrier/detail?id={0}&&type={1}", cItem.ID)
};
tradeData.list.Add(dModel);
}
}
//品牌
else if (tradeData.goodType == 2)
{
var brandList = carrierModule.GetBrandList_V2(new RB_Brand_Extend()
{
TenantId = TenantId,
QOrderBy = 2,
QTop = tradeData.goodsLength
});
foreach (var cItem in brandList)
{
var dModel = new CustomDetailsItem2()
{
id = cItem.ID,
name = cItem.BrandName,
picUrl = cItem.Logo,
lableName = cItem.BrandType,
lableNameList = new List<string>(),
linkUrl = string.Format("/pages/kotra/brand/detail?id={0}",cItem.ID),
};
tradeData.list.Add(dModel);
}
}
}
//手动添加
else
{
}
}
obj = new
{
id = subItem.Id,
data = tradeData
};
break;
}
return obj;
}
......
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