Commit ead1308c authored by 吴春's avatar 吴春

解决冲突

parents 19c88040 fa3bc33e
...@@ -28,11 +28,6 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -28,11 +28,6 @@ namespace Mall.Model.Extend.TradePavilion
public string QBrandIds { get; set; } public string QBrandIds { get; set; }
public List<string> BannerList { get; set; } public List<string> BannerList { get; set; }
/// <summary>
/// 商铺性质
/// </summary>
//public string ProjectName { get { return Common.Plugin.EnumHelper.GetEnumName(this.ProjectType); } }
/// <summary> /// <summary>
...@@ -84,5 +79,13 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -84,5 +79,13 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary> /// </summary>
public List<RB_FirstShop_ListEnroll_Extend> ListEnroll { get; set; } public List<RB_FirstShop_ListEnroll_Extend> ListEnroll { get; set; }
/// 排序(1-默认,2主键倒序)
/// </summary>
public int QOrderBy { get; set; }
/// <summary>
/// 取几天数据
/// </summary>
public int QTop { get; set; }
} }
} }
...@@ -30,7 +30,7 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -30,7 +30,7 @@ namespace Mall.Model.Extend.TradePavilion
public List<string> BannerList { get; set; } public List<string> BannerList { get; set; }
/// <summary> /// <summary>
/// 排序 /// 排序(1-创建时间倒序,2-开业时间倒序)
/// </summary> /// </summary>
public int OrderBy { get; set; } public int OrderBy { get; set; }
...@@ -74,6 +74,10 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -74,6 +74,10 @@ namespace Mall.Model.Extend.TradePavilion
public string UserIcon { get; set; } public string UserIcon { get; set; }
/// <summary> /// <summary>
/// 查询多少条数据
/// </summary>
public int QTop { get; set; }
/// 载体ids /// 载体ids
/// </summary> /// </summary>
public string QCarrierIds { get; set; } public string QCarrierIds { get; set; }
......
...@@ -59,6 +59,16 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -59,6 +59,16 @@ namespace Mall.Model.Extend.TradePavilion
/// 是否必填 /// 是否必填
/// </summary> /// </summary>
public bool IsRequire { get; set; } public bool IsRequire { get; set; }
/// <summary>
/// 文本值
/// </summary>
public string TextValue { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
} }
/// <summary> /// <summary>
...@@ -85,6 +95,32 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -85,6 +95,32 @@ namespace Mall.Model.Extend.TradePavilion
/// 是否必填 /// 是否必填
/// </summary> /// </summary>
public bool IsRequire { get; set; } public bool IsRequire { get; set; }
/// <summary>
/// 选项列表
/// </summary>
public List<SelectOption> OptionList { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
/// <summary>
/// 选项列表
/// </summary>
public class SelectOption
{
/// <summary>
/// 编号
/// </summary>
public string Id { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
} }
/// <summary> /// <summary>
...@@ -106,6 +142,16 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -106,6 +142,16 @@ namespace Mall.Model.Extend.TradePavilion
/// 上传文件大小M /// 上传文件大小M
/// </summary> /// </summary>
public int FileSizeLimit { get; set; } public int FileSizeLimit { get; set; }
/// <summary>
/// 上传文件列表
/// </summary>
public List<string> FileList { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
} }
} }
...@@ -937,6 +937,33 @@ namespace Mall.Module.MarketingCenter ...@@ -937,6 +937,33 @@ namespace Mall.Module.MarketingCenter
//导航-页面 //导航-页面
case "nav-page": item.data = JsonHelper.DeserializeObject<navPageItem>(item.data.ToString()); break; 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; ...@@ -10,6 +10,9 @@ using Mall.Common.Plugin;
namespace Mall.Module.TradePavilion namespace Mall.Module.TradePavilion
{ {
/// <summary>
/// 载体处理类
/// </summary>
public class CarrierModule public class CarrierModule
{ {
/// <summary> /// <summary>
......
...@@ -62,7 +62,6 @@ namespace Mall.Module.TradePavilion ...@@ -62,7 +62,6 @@ namespace Mall.Module.TradePavilion
list.Add(new WhereHelper(nameof(RB_Custom_Form_Extend.Id), model.Id, OperatorEnum.NotEqual)); list.Add(new WhereHelper(nameof(RB_Custom_Form_Extend.Id), model.Id, OperatorEnum.NotEqual));
} }
return custom_FormRepository.Exists(list); return custom_FormRepository.Exists(list);
} }
/// <summary> /// <summary>
...@@ -105,7 +104,7 @@ namespace Mall.Module.TradePavilion ...@@ -105,7 +104,7 @@ namespace Mall.Module.TradePavilion
var extModel = custom_FormRepository.GetEntity<RB_Custom_Form_Extend>(Id); var extModel = custom_FormRepository.GetEntity<RB_Custom_Form_Extend>(Id);
if (extModel != null) if (extModel != null)
{ {
extModel.FormDataList = AnalyzeFormComponent(extModel.FormData); extModel.FormDataList = AnalyzeFormComponent(extModel.FormData, isGetAnswer: true);
} }
return extModel; return extModel;
} }
...@@ -114,13 +113,13 @@ namespace Mall.Module.TradePavilion ...@@ -114,13 +113,13 @@ namespace Mall.Module.TradePavilion
/// 解析表单组件 /// 解析表单组件
/// </summary> /// </summary>
/// <param name="formData"></param> /// <param name="formData"></param>
/// <param name="isGetAnswer"></param>
/// <returns></returns> /// <returns></returns>
public List<FormDataItem> AnalyzeFormComponent(string formData) public List<FormDataItem> AnalyzeFormComponent(string formData,bool isGetAnswer=false)
{ {
List<FormDataItem> dataList = new List<FormDataItem>(); List<FormDataItem> dataList = new List<FormDataItem>();
if (!string.IsNullOrEmpty(formData)) if (!string.IsNullOrEmpty(formData))
{ {
JArray jArray = JArray.Parse(formData); JArray jArray = JArray.Parse(formData);
if (jArray != null && jArray.Count > 0) if (jArray != null && jArray.Count > 0)
{ {
...@@ -145,6 +144,8 @@ namespace Mall.Module.TradePavilion ...@@ -145,6 +144,8 @@ namespace Mall.Module.TradePavilion
Name = singleObj.GetStringValue("Name"), Name = singleObj.GetStringValue("Name"),
WordsLength = singleObj.GetInt("WordsLength"), WordsLength = singleObj.GetInt("WordsLength"),
IsRequire = singleObj.GetBoolValue("IsRequire"), IsRequire = singleObj.GetBoolValue("IsRequire"),
Remark = singleObj.GetStringValue("Remark"),
TextValue = isGetAnswer ? singleObj.GetStringValue("TextValue") : "",
}; };
dataItem.CompData = txtItem; dataItem.CompData = txtItem;
break; break;
...@@ -156,6 +157,8 @@ namespace Mall.Module.TradePavilion ...@@ -156,6 +157,8 @@ namespace Mall.Module.TradePavilion
Name = multiObj.GetStringValue("Name"), Name = multiObj.GetStringValue("Name"),
WordsLength = multiObj.GetInt("WordsLength"), WordsLength = multiObj.GetInt("WordsLength"),
IsRequire = multiObj.GetBoolValue("IsRequire"), IsRequire = multiObj.GetBoolValue("IsRequire"),
Remark = multiObj.GetStringValue("Remark"),
TextValue = isGetAnswer ? multiObj.GetStringValue("TextValue") : "",
}; };
dataItem.CompData = multiItem; dataItem.CompData = multiItem;
break; break;
...@@ -167,8 +170,24 @@ namespace Mall.Module.TradePavilion ...@@ -167,8 +170,24 @@ namespace Mall.Module.TradePavilion
Name = dropdownObj.GetStringValue("Name"), Name = dropdownObj.GetStringValue("Name"),
IsMultiple = dropdownObj.GetBoolValue("IsMultiple"), IsMultiple = dropdownObj.GetBoolValue("IsMultiple"),
IsRequire = dropdownObj.GetBoolValue("IsRequire"), IsRequire = dropdownObj.GetBoolValue("IsRequire"),
OptionValue = "", OptionValue = isGetAnswer ? dropdownObj.GetStringValue("OptionValue") : "",
OptionList = new List<SelectOption>(),
Remark=dropdownObj.GetStringValue("Remark"),
}; };
var optionList = JArray.Parse(dropdownObj.GetStringValue("OptionList"));
if (optionList != null && optionList.Count > 0)
{
foreach (var oItem in optionList)
{
JObject optionObj = JObject.Parse(oItem.ToString());
SelectOption option = new SelectOption()
{
Id= optionObj.GetStringValue("Id"),
Name= optionObj.GetStringValue("Name"),
};
selectItem.OptionList.Add(option);
}
}
dataItem.CompData = selectItem; dataItem.CompData = selectItem;
break; break;
//图片上传组件 //图片上传组件
...@@ -179,7 +198,24 @@ namespace Mall.Module.TradePavilion ...@@ -179,7 +198,24 @@ namespace Mall.Module.TradePavilion
Name = imgObj.GetStringValue("Name"), Name = imgObj.GetStringValue("Name"),
FileCount = imgObj.GetInt("FileCount"), FileCount = imgObj.GetInt("FileCount"),
FileSizeLimit = imgObj.GetInt("FileSizeLimit"), FileSizeLimit = imgObj.GetInt("FileSizeLimit"),
Remark = imgObj.GetStringValue("Remark"),
FileList = new List<string>(),
}; };
if (!string.IsNullOrEmpty(imgObj.GetStringValue("FileList")))
{
try
{
imgItem.FileList = Common.Plugin.JsonHelper.DeserializeObject<List<string>>(imgObj.GetStringValue("FileList"));
}
catch
{
}
}
if (!isGetAnswer)
{
imgItem.FileList = new List<string>();
}
dataItem.CompData = imgItem; dataItem.CompData = imgItem;
break; break;
//视频上传组件 //视频上传组件
...@@ -190,7 +226,21 @@ namespace Mall.Module.TradePavilion ...@@ -190,7 +226,21 @@ namespace Mall.Module.TradePavilion
Name = videoObj.GetStringValue("Name"), Name = videoObj.GetStringValue("Name"),
FileCount = videoObj.GetInt("FileCount"), FileCount = videoObj.GetInt("FileCount"),
FileSizeLimit = videoObj.GetInt("FileSizeLimit"), FileSizeLimit = videoObj.GetInt("FileSizeLimit"),
Remark=videoObj.GetStringValue("Remark"),
FileList = new List<string>(),
}; };
try
{
videoItem.FileList = Common.Plugin.JsonHelper.DeserializeObject<List<string>>(videoObj.GetStringValue("FileList"));
}
catch
{
}
if (!isGetAnswer)
{
videoItem.FileList = new List<string>();
}
dataItem.CompData = videoItem; dataItem.CompData = videoItem;
break; break;
} }
......
...@@ -300,6 +300,16 @@ WHERE 1=1 ...@@ -300,6 +300,16 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND a.{0}={1} ", nameof(RB_Brand_Extend.ProjectType), (int)query.ProjectType); 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(); return Get<RB_Brand_Extend>(builder.ToString(), parameters).ToList();
} }
......
...@@ -174,6 +174,11 @@ namespace Mall.Repository.TradePavilion ...@@ -174,6 +174,11 @@ namespace Mall.Repository.TradePavilion
{ {
builder.Append($" order by {nameof(RB_Carrier_Extend.OpenTime)} desc"); 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(); return Get<RB_Carrier_Extend>(builder.ToString()).ToList();
} }
......
using Mall.Common.Enum.MallBase; using Mall.Common.Enum.MallBase;
using Mall.Common.Plugin;
using Mall.Model.Entity.BaseSetUp; using Mall.Model.Entity.BaseSetUp;
using Mall.Model.Entity.MarketingCenter; using Mall.Model.Entity.MarketingCenter;
using Mall.Model.Extend.BaseSetUp; using Mall.Model.Extend.BaseSetUp;
using Mall.Model.Extend.MarketingCenter; using Mall.Model.Extend.MarketingCenter;
using Mall.Model.Extend.Miai; using Mall.Model.Extend.Miai;
using Mall.Model.Extend.Product; using Mall.Model.Extend.Product;
using Mall.Model.Extend.TradePavilion;
using Mall.Model.Extend.User; using Mall.Model.Extend.User;
using Mall.Module.BaseSetUp; using Mall.Module.BaseSetUp;
using Mall.Module.MarketingCenter; using Mall.Module.MarketingCenter;
using Mall.Module.Product; using Mall.Module.Product;
using Mall.Module.Reserve; using Mall.Module.Reserve;
using Mall.Module.TradePavilion;
using Mall.Module.User; using Mall.Module.User;
using Mall.Repository.Miai; using Mall.Repository.Miai;
using Mall.Repository.Product; using Mall.Repository.Product;
...@@ -101,7 +104,12 @@ namespace Mall.WebApi.Controllers ...@@ -101,7 +104,12 @@ namespace Mall.WebApi.Controllers
private static Module.Miai.MiaiModule miaiModule = new Module.Miai.MiaiModule(); 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 +1930,74 @@ namespace Mall.WebApi.Controllers ...@@ -1922,6 +1930,74 @@ namespace Mall.WebApi.Controllers
data = blindDatePPPlusData data = blindDatePPPlusData
}; };
break; 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,cItem.ProjectType.GetEnumName())
};
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; 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