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

新增排序

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