Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
976a8c36
Commit
976a8c36
authored
Jun 02, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
bb3d7da0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
5 deletions
+70
-5
RB_MiniProgram_UserCenterMenu_Extend.cs
...Model/Extend/User/RB_MiniProgram_UserCenterMenu_Extend.cs
+4
-1
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+22
-1
RB_MiniProgram_UserCenterMenuRepository.cs
...epository/User/RB_MiniProgram_UserCenterMenuRepository.cs
+31
-1
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+13
-2
No files found.
Mall.Model/Extend/User/RB_MiniProgram_UserCenterMenu_Extend.cs
View file @
976a8c36
...
...
@@ -12,6 +12,9 @@ namespace Mall.Model.Extend.User
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_MiniProgram_UserCenterMenu_Extend
:
Model
.
Entity
.
User
.
RB_MiniProgram_UserCenterMenu
{
/// <summary>
/// 用户中心菜单编号
/// </summary>
public
string
DetailIds
{
get
;
set
;
}
}
}
Mall.Module.User/MiniProgramModule.cs
View file @
976a8c36
...
...
@@ -449,7 +449,7 @@ namespace Mall.Module.User
}
if
(
isGetUserCenterMenu
)
{
var
menuList
=
centerMenuRepository
.
GetListExtRepository
(
new
RB_MiniProgram_UserCenterMenu_Extend
()
{
MallBaseId
=
extModel
.
MallBaseId
});
var
menuList
=
GetMiniProgramUserCenterMenuListModule
(
new
RB_MiniProgram_UserCenterMenu_Extend
()
{
MallBaseId
=
extModel
.
MallBaseId
});
if
(
menuList
!=
null
&&
menuList
.
Count
>
0
)
{
extModel
.
FavoriteFootMenuList
=
menuList
?.
Where
(
qitem
=>
qitem
.
MenuType
==
1
)?.
ToList
();
...
...
@@ -472,6 +472,27 @@ namespace Mall.Module.User
return
extModel
;
}
/// <summary>
/// 根据查询条件获取小程序用户中心菜单列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_MiniProgram_UserCenterMenu_Extend
>
GetMiniProgramUserCenterMenuListModule
(
RB_MiniProgram_UserCenterMenu_Extend
query
)
{
return
centerMenuRepository
.
GetMiniProgramUserCenterMenuListRepository
(
query
);
}
/// <summary>
/// 删除小程序用户中心菜单
/// </summary>
/// <param name="DetailIds">详情编号</param>
/// <param name="MallBaseId">商城编号</param>
/// <returns></returns>
public
bool
DeleteMiniProgramUserCenterMenuModule
(
string
DetailIds
=
""
,
int
MallBaseId
=
0
)
{
return
centerMenuRepository
.
DeleteMiniProgramUserCenterMenuRepository
(
DetailIds
:
DetailIds
,
MallBaseId
:
MallBaseId
);
}
/// <summary>
/// 更新小程序状态
/// </summary>
...
...
Mall.Repository/User/RB_MiniProgram_UserCenterMenuRepository.cs
View file @
976a8c36
...
...
@@ -17,7 +17,7 @@ namespace Mall.Repository.User
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_MiniProgram_UserCenterMenu_Extend
>
Get
ListEx
tRepository
(
RB_MiniProgram_UserCenterMenu_Extend
query
)
public
List
<
RB_MiniProgram_UserCenterMenu_Extend
>
Get
MiniProgramUserCenterMenuLis
tRepository
(
RB_MiniProgram_UserCenterMenu_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
" SELECT * FROM RB_MiniProgram_UserCenterMenu WHERE 1=1 "
);
...
...
@@ -27,8 +27,38 @@ namespace Mall.Repository.User
{
builder
.
AppendFormat
(
" AND MallBaseId={0} "
,
query
.
MallBaseId
);
}
if
(
query
.
DetailIds
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
query
.
DetailIds
))
{
builder
.
AppendFormat
(
" AND DetailId IN({0}) "
,
query
.
DetailIds
);
}
}
return
Get
<
RB_MiniProgram_UserCenterMenu_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 删除小程序用户中心菜单
/// </summary>
/// <param name="DetailIds">详情编号</param>
/// <param name="MallBaseId">商城编号</param>
/// <returns></returns>
public
bool
DeleteMiniProgramUserCenterMenuRepository
(
string
DetailIds
=
""
,
int
MallBaseId
=
0
)
{
bool
flag
=
true
;
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
"DELETE FROM RB_MiniProgram_UserCenterMenu WHERE 1=1 "
);
if
(!
string
.
IsNullOrEmpty
(
DetailIds
)
||
MallBaseId
>
0
)
{
if
(!
string
.
IsNullOrEmpty
(
DetailIds
))
{
builder
.
AppendFormat
(
" AND DetailId IN({0}) "
,
DetailIds
);
}
if
(
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND MallBaseId IN({0}) "
,
MallBaseId
);
}
flag
=
base
.
Execute
(
builder
.
ToString
())
>
0
;
}
return
flag
;
}
}
}
Mall.WebApi/Controllers/User/TenantController.cs
View file @
976a8c36
...
...
@@ -1168,8 +1168,19 @@ namespace Mall.WebApi.Controllers.User
public
ApiResult
RemoveMiniUserCenterMenu
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
DetailId
=
parms
.
GetInt
(
"DetailId"
,
0
);
var
flag
=
programModule
.
RemoveMiniUserCenterMenuModule
(
DetailId
);
var
DetailId
=
parms
.
GetStringValue
(
"DetailId"
);
var
flag
=
programModule
.
DeleteMiniProgramUserCenterMenuModule
(
DetailIds
:
DetailId
,
MallBaseId
:
0
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 根据商城Id删除用户中心菜单【恢复默认使用】
/// </summary>
/// <returns></returns>
public
ApiResult
RemoveMiniUserCenterMenuByMallId
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
flag
=
programModule
.
DeleteMiniProgramUserCenterMenuModule
(
DetailIds
:
""
,
MallBaseId
:
RequestParm
.
MallBaseId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment