Commit 97a54957 authored by 黄奎's avatar 黄奎

新增排序

parent 3d1909ce
......@@ -65,5 +65,10 @@ namespace Mall.Model.Entity.User
get;
set;
}
/// <summary>
/// 排序
/// </summary>
public int PageSort { get; set; }
}
}
......@@ -364,8 +364,10 @@ namespace Mall.Module.User
if (extModel.BottomTagList != null && extModel.BottomTagList.Count > 0)
{
int tagSort = 1;
foreach (var item in extModel.BottomTagList)
{
item.TagSort = tagSort;
if (item.TagId > 0)
{
Dictionary<string, object> tagfileds = new Dictionary<string, object>()
......@@ -376,6 +378,7 @@ namespace Mall.Module.User
{ nameof(RB_Miniprogram_Bottomnav_Extend.DefaultColor),item.DefaultColor},
{ nameof(RB_Miniprogram_Bottomnav_Extend.CheckedColor),item.CheckedColor},
{ nameof(RB_Miniprogram_Bottomnav_Extend.TagLink),item.TagLink},
{ nameof(RB_Miniprogram_Bottomnav_Extend.TagSort),item.TagSort},
};
flag = bottomnavRepository.Update(tagfileds, new WhereHelper(nameof(RB_Miniprogram_Bottomnav_Extend.TagId), item.TagId));
}
......@@ -386,6 +389,7 @@ namespace Mall.Module.User
item.Status = 0;
flag = bottomnavRepository.Insert(item) > 0;
}
tagSort++;
}
}
}
......@@ -450,7 +454,7 @@ namespace Mall.Module.User
extModel.FavoriteFootMenuList = menuList?.Where(qitem => qitem.MenuType == 1)?.ToList();
extModel.OrderMenuList = menuList?.Where(qitem => qitem.MenuType == 3)?.ToList();
extModel.AccountMenuList = menuList?.Where(qitem => qitem.MenuType == 2)?.ToList();
extModel.SelfMenuList = menuList?.Where(qitem => qitem.MenuType == 4)?.ToList();
extModel.SelfMenuList = menuList?.Where(qitem => qitem.MenuType == 4).OrderBy(qitem=>qitem.PageSort)?.ToList();
}
}
if (isGetHomeData)
......@@ -717,8 +721,10 @@ namespace Mall.Module.User
}
if (extModel.SelfMenuList != null && extModel.SelfMenuList.Count > 0)
{
int pageSort = 1;
foreach (var item in extModel.SelfMenuList)
{
item.PageSort = pageSort;
item.MallBaseId = extModel.MallBaseId;
if (item.DetailId > 0)
{
......@@ -728,6 +734,7 @@ namespace Mall.Module.User
{ nameof(RB_MiniProgram_UserCenterMenu_Extend.MenuName),item.MenuName},
{ nameof(RB_MiniProgram_UserCenterMenu_Extend.MenuIcon),item.MenuIcon},
{ nameof(RB_MiniProgram_UserCenterMenu_Extend.MenuUrl),item.MenuUrl},
{ nameof(RB_MiniProgram_UserCenterMenu_Extend.PageSort),item.PageSort},
};
flag = centerMenuRepository.Update(detailesFileds, new WhereHelper(nameof(RB_MiniProgram_UserCenterMenu_Extend.DetailId), item.DetailId));
}
......@@ -735,6 +742,7 @@ namespace Mall.Module.User
{
flag = centerMenuRepository.Insert(item) > 0;
}
pageSort++;
}
}
flag = programRepository.Update(fileds, new WhereHelper(nameof(RB_MiniProgram_Extend.MallBaseId), extModel.MallBaseId));
......
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