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
9869329d
Commit
9869329d
authored
Apr 28, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8a8f9298
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
38 deletions
+27
-38
RB_Miniprogram_Bottomnav.cs
Mall.Model/Entity/User/RB_Miniprogram_Bottomnav.cs
+5
-0
RB_Miniprogram_Bottomnav_Extend.cs
Mall.Model/Extend/User/RB_Miniprogram_Bottomnav_Extend.cs
+4
-1
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+13
-3
RB_Miniprogram_BottomnavRepository.cs
Mall.Repository/User/RB_Miniprogram_BottomnavRepository.cs
+2
-31
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+3
-3
No files found.
Mall.Model/Entity/User/RB_Miniprogram_Bottomnav.cs
View file @
9869329d
...
...
@@ -101,5 +101,10 @@ namespace Mall.Model.Entity.User
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
TagSort
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Miniprogram_Bottomnav_Extend.cs
View file @
9869329d
...
...
@@ -12,6 +12,9 @@ namespace Mall.Model.Extend.User
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Miniprogram_Bottomnav_Extend
:
Model
.
Entity
.
User
.
RB_Miniprogram_Bottomnav
{
/// <summary>
/// 标签是否激活状态【前端使用】
/// </summary>
public
bool
IsActive
{
get
;
set
;
}
}
}
Mall.Module.User/MiniProgramModule.cs
View file @
9869329d
...
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using
System.Text
;
using
Mall.Model.Extend.User
;
using
Mall.Repository
;
using
System.Linq
;
namespace
Mall.Module.User
{
...
...
@@ -187,14 +188,23 @@ namespace Mall.Module.User
/// 根据编号获取小程序信息
/// </summary>
/// <param name="MallBaseId">小程序Id</param>
/// <param name="isGetNav">是否获取顶部底部配置+底部标签导航(0-不获取,1-获取)</param>
/// <returns></returns>
public
RB_MiniProgram_Extend
GetMiniProgramModule
(
object
MallBaseId
)
public
RB_MiniProgram_Extend
GetMiniProgramModule
(
object
MallBaseId
,
int
isGetNav
=
0
)
{
RB_MiniProgram_Extend
extModel
=
programRepository
.
GetEntity
<
RB_MiniProgram_Extend
>(
MallBaseId
);
if
(
extModel
==
null
)
{
extModel
=
new
RB_MiniProgram_Extend
();
}
if
(
isGetNav
==
1
)
{
extModel
.
BottomTagList
=
bottomnavRepository
.
GetListRepository
(
new
RB_Miniprogram_Bottomnav_Extend
()
{
MallBaseId
=
extModel
.
MallBaseId
});
if
(
extModel
.
BottomTagList
!=
null
&&
extModel
.
BottomTagList
.
Count
>
0
)
{
extModel
.
BottomTagList
.
FirstOrDefault
().
IsActive
=
true
;
}
}
return
extModel
;
}
...
...
@@ -248,7 +258,7 @@ namespace Mall.Module.User
{
{
nameof
(
RB_Miniprogram_Bottomnav_Extend
.
Status
),
1
},
};
flag
=
program
Repository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Bottomnav_Extend
.
TagId
),
TagId
));
flag
=
bottomnav
Repository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Bottomnav_Extend
.
TagId
),
TagId
));
return
flag
;
}
}
...
...
Mall.Repository/User/RB_Miniprogram_BottomnavRepository.cs
View file @
9869329d
...
...
@@ -19,7 +19,7 @@ namespace Mall.Repository.User
public
List
<
RB_Miniprogram_Bottomnav_Extend
>
GetListRepository
(
RB_Miniprogram_Bottomnav_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
" SELECT * FROM RB_Miniprogram_Bottomnav WHERE 1=1 "
);
builder
.
Append
(
" SELECT * FROM RB_Miniprogram_Bottomnav WHERE 1=1
AND Status=0
"
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
!=
null
&&
query
.
TenantId
>
0
)
...
...
@@ -31,37 +31,8 @@ namespace Mall.Repository.User
builder
.
AppendFormat
(
" AND MallBaseId={0} "
,
query
.
MallBaseId
);
}
}
builder
.
Append
(
" ORDER BY TagSort "
);
return
Get
<
RB_Miniprogram_Bottomnav_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取小程序分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Miniprogram_Bottomnav_Extend
>
GetPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Miniprogram_Bottomnav_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@"
SELECT A.*,B.Account,B.MobilePhone
FROM RB_Miniprogram_Bottomnav AS A LEFT JOIN RB_Tenant AS B ON A.TenantId=B.TenantId
WHERE 1=1 "
);
if
(
query
!=
null
)
{
if
(
query
.
Status
>=
0
)
{
builder
.
AppendFormat
(
" AND A.Status={0} "
,
query
.
Status
);
}
if
(
query
.
TenantId
!=
null
&&
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.TenantId={0} "
,
query
.
TenantId
);
}
}
return
GetPage
<
RB_Miniprogram_Bottomnav_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
}
}
Mall.WebApi/Controllers/User/TenantController.cs
View file @
9869329d
...
...
@@ -293,9 +293,8 @@ namespace Mall.WebApi.Controllers.User
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_MiniProgram_Extend
>(
RequestParm
.
msg
.
ToString
());
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
var
flag
=
programModule
.
SetMiniProgramMallTagModule
(
extModel
);
var
flag
=
programModule
.
SetMiniProgramMallTagModule
(
extModel
,
isUpdateBasic
:
true
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
...
...
@@ -318,7 +317,8 @@ namespace Mall.WebApi.Controllers.User
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
MallBaseId
=
parms
.
GetInt
(
"MallBaseId"
,
0
);
var
extModel
=
programModule
.
GetMiniProgramModule
(
MallBaseId
);
int
isGetNav
=
parms
.
GetInt
(
"isGetNav"
,
0
);
var
extModel
=
programModule
.
GetMiniProgramModule
(
MallBaseId
,
isGetNav
:
isGetNav
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
...
...
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