Commit 8f82e169 authored by 吴春's avatar 吴春

Merge branch 'sdzq-ld' of http://gitlab.oytour.com/Kui2/mall.oytour.com into sdzq

parents 847c043d 6fe7ae3a
......@@ -40,5 +40,10 @@ namespace Mall.Common.Enum.MallBase
/// </summary>
[EnumField("diy页面")]
DiyPage = 5,
/// <summary>
/// 司导订单页面
/// </summary>
[EnumField("司导订单")]
SDPage = 7,
}
}
......@@ -333,6 +333,15 @@ namespace Mall.Model.Entity.User
set;
}
/// <summary>
/// 是否显示司导订单栏(0-显示,1-不显示)
/// </summary>
public int? IsShowSDNav
{
get;
set;
}
/// <summary>
/// 是否显示账户栏(0-显示,1-不显示)
/// </summary>
......
......@@ -31,7 +31,7 @@ namespace Mall.Model.Entity.User
}
/// <summary>
/// 页面类型(1-基础页面,2-营销页面,3-订单页面,4-插件页面,5-diy页面
/// 页面类型(1-基础页面,2-营销页面,3-订单页面,4-插件页面,5-diy页面,7-司导订单
/// </summary>
public int? MenuType
{
......
......@@ -86,6 +86,11 @@ namespace Mall.Model.Extend.User
/// </summary>
public List<RB_MiniProgram_UserCenterMenu_Extend> OrderMenuList { get; set; }
/// <summary>
/// 小程序用户中心【司导订单】菜单列表
/// </summary>
public List<RB_MiniProgram_UserCenterMenu_Extend> SDOrderMenuList { get; set; }
/// <summary>
/// 小程序用户中心【账户】菜单列表
/// </summary>
......
......@@ -368,6 +368,13 @@ namespace Mall.Module.Product
string ids = string.Join(",", list.Select(x => x.Id));
var clist = goods_CategoryRepository.GetList(new RB_Goods_Category_Extend() { GoodsIds = ids, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
var olist = goods_OrderRepository.GetGoodsOrderNum(ids);
//区域
var AreaList = new List<RB_Goods_Area_Extend>();
if (list.Where(x => x.IsAreaBuy == 1).Any())
{
string goodssid = string.Join(",", list.Where(x => x.IsAreaBuy == 1).Select(x => x.Id));
AreaList = goods_AreaRepository.GetList(new RB_Goods_Area_Extend() { GoodsIds = goodssid, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
}
#region 查询司导信息
string siteIds = string.Join(",", list.Select(x => x.SiteId));
var sitelist = SiteRepository.GetGuideCarSiteList(new RB_GuideCar_Site_Extend() { SiteIds = siteIds });
......@@ -407,6 +414,12 @@ namespace Mall.Module.Product
item.GuideName = guidelist.Where(x => x.ID == item.GuideId).FirstOrDefault()?.Name ?? "";
item.CarName = carlist.Where(x => x.ID == item.CarId).FirstOrDefault()?.Name ?? "";
item.CarColorName = carcolorlist.Where(x => x.ID == item.CarColorId).FirstOrDefault()?.ColorName ?? "";
item.AreaList = new List<RB_Goods_Area_Extend>();
if (item.IsAreaBuy == 1)
{
item.AreaList = AreaList.Where(x => x.GoodsId == item.Id).ToList();
}
}
}
return list;
......
......@@ -474,6 +474,7 @@ namespace Mall.Module.User
{
extModel.FavoriteFootMenuList = menuList?.Where(qitem => qitem.MenuType == 1)?.ToList();
extModel.OrderMenuList = menuList?.Where(qitem => qitem.MenuType == 3)?.ToList();
extModel.SDOrderMenuList = menuList?.Where(qitem => qitem.MenuType == 7)?.ToList();
extModel.AccountMenuList = menuList?.Where(qitem => qitem.MenuType == 2)?.ToList();
extModel.SelfMenuList = menuList?.Where(qitem => qitem.MenuType == 4).OrderBy(qitem => qitem.PageSort)?.ToList();
}
......@@ -730,6 +731,7 @@ namespace Mall.Module.User
{ nameof(RB_MiniProgram_Extend.HeadStyleStr),extModel.HeadStyleStr},
{ nameof(RB_MiniProgram_Extend.IsShowFavorite),extModel.IsShowFavorite},
{ nameof(RB_MiniProgram_Extend.IsShowOrderNav),extModel.IsShowOrderNav},
{ nameof(RB_MiniProgram_Extend.IsShowSDNav),extModel.IsShowSDNav},
{ nameof(RB_MiniProgram_Extend.IsShowAccountNav),extModel.IsShowAccountNav},
{ nameof(RB_MiniProgram_Extend.IsShowMenuNav),extModel.IsShowMenuNav},
{ nameof(RB_MiniProgram_Extend.MenuNavTitle),extModel.MenuNavTitle},
......@@ -779,6 +781,28 @@ namespace Mall.Module.User
}
}
}
if (extModel.SDOrderMenuList != null && extModel.SDOrderMenuList.Count > 0)
{
foreach (var item in extModel.SDOrderMenuList)
{
item.MallBaseId = extModel.MallBaseId;
if (item.DetailId > 0)
{
Dictionary<string, object> detailesFileds = new Dictionary<string, object>()
{
{ nameof(RB_MiniProgram_UserCenterMenu_Extend.MenuType),item.MenuType},
{ nameof(RB_MiniProgram_UserCenterMenu_Extend.MenuName),item.MenuName},
{ nameof(RB_MiniProgram_UserCenterMenu_Extend.MenuIcon),item.MenuIcon},
{ nameof(RB_MiniProgram_UserCenterMenu_Extend.MenuUrl),item.MenuUrl},
};
flag = centerMenuRepository.Update(detailesFileds, new WhereHelper(nameof(RB_MiniProgram_UserCenterMenu_Extend.DetailId), item.DetailId));
}
else
{
flag = centerMenuRepository.Insert(item) > 0;
}
}
}
if (extModel.AccountMenuList != null && extModel.AccountMenuList.Count > 0)
{
foreach (var item in extModel.AccountMenuList)
......
......@@ -468,6 +468,8 @@ namespace Mall.WebApi.Controllers.MallBase
is_menu_status = (miniProgram.IsShowMenuNav == 0 ? 1 : 0),
//是否显示菜单栏
is_order_bar_status = (miniProgram.IsShowOrderNav == 0 ? 1 : 0),
//是否显示司导订单栏
is_sdorder_bar_status = (miniProgram.IsShowSDNav == 0 ? 1 : 0),
//是否显示收藏夹
is_foot_bar_status = (miniProgram.IsShowFavorite == 0 ? 1 : 0),
//菜单样式
......@@ -510,6 +512,15 @@ namespace Mall.WebApi.Controllers.MallBase
open_type = "navigate",
text = "",
}),
//订单菜单列表
sdorder_bar = miniProgram?.SDOrderMenuList?.Select(qitem => new
{
icon_url = qitem.MenuIcon,
name = qitem.MenuName,
link_url = qitem.MenuUrl.Trim(),
open_type = "navigate",
text = "",
}),
//收藏足迹
foot_bar = miniProgram?.FavoriteFootMenuList?.Select(qitem => new
{
......
......@@ -180,7 +180,7 @@ namespace Mall.WebApi.Controllers.MallBase
public ApiResult GetOrderListExportEnumList()
{
var list = EnumHelper.GetEnumList(typeof(OrderListExportEnum));
return ApiResult.Success("", list.Select(x => new
return ApiResult.Success("", list.OrderBy(x => x.Value).Select(x => new
{
Name = x.Key,
Id = Convert.ToInt32(x.Value)
......
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