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
17ae9c92
Commit
17ae9c92
authored
Aug 21, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8b1e407e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
5 deletions
+31
-5
ShareModule.cs
Mall.Module.MarketingCenter/ShareModule.cs
+3
-2
RB_Share_FriendRepository.cs
Mall.Repository/MarketingCenter/RB_Share_FriendRepository.cs
+6
-1
ShareController.cs
Mall.WebApi/Controllers/MarketingCenter/ShareController.cs
+22
-2
No files found.
Mall.Module.MarketingCenter/ShareModule.cs
View file @
17ae9c92
...
...
@@ -96,8 +96,9 @@ namespace Mall.Module.MarketingCenter
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowsCount">总条数</param>
/// <param name="query">查询条件</param>
/// <param name="IsUse">true-只查询启用的</param>
/// <returns></returns>
public
List
<
RB_Share_Friend_Extend
>
GetShareFriendPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Share_Friend_Extend
query
)
public
List
<
RB_Share_Friend_Extend
>
GetShareFriendPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Share_Friend_Extend
query
,
bool
IsUse
=
false
)
{
var
cateAllList
=
share_CategoryRepository
.
GetShareCategoryListRepository
(
new
RB_Share_Category_Extend
()
{
...
...
@@ -110,7 +111,7 @@ namespace Mall.Module.MarketingCenter
query
.
CateId
=
0
;
query
.
CateIds
=
string
.
Join
(
","
,
cateList
.
Select
(
qitem
=>
qitem
.
Id
));
}
var
list
=
share_FriendRepository
.
GetShareFriendPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
share_FriendRepository
.
GetShareFriendPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
,
IsUse
:
IsUse
);
foreach
(
var
item
in
list
)
{
item
.
CateList
=
GetFatherList
(
cateAllList
,
item
.
CateId
).
OrderBy
(
qitem
=>
qitem
.
Level
).
ToList
();
...
...
Mall.Repository/MarketingCenter/RB_Share_FriendRepository.cs
View file @
17ae9c92
...
...
@@ -20,8 +20,9 @@ namespace Mall.Repository.MarketingCenter
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowsCount">总条数</param>
/// <param name="query">查询条件</param>
/// <param name="IsUse">true-只查询启用的</param>
/// <returns></returns>
public
List
<
RB_Share_Friend_Extend
>
GetShareFriendPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Share_Friend_Extend
query
)
public
List
<
RB_Share_Friend_Extend
>
GetShareFriendPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Share_Friend_Extend
query
,
bool
IsUse
=
false
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
...
...
@@ -29,6 +30,10 @@ SELECT A.*,B.Name AS GoodsName
FROM rb_share_friend AS A LEFT JOIN rb_goods AS B ON A.GoodsId=B.Id
WHERE 1=1 AND A.Status=0
"
);
if
(
IsUse
)
{
builder
.
AppendFormat
(
" AND A.{0}=1 "
,
nameof
(
RB_Share_Friend_Extend
.
IsUse
));
}
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
...
...
Mall.WebApi/Controllers/MarketingCenter/ShareController.cs
View file @
17ae9c92
...
...
@@ -7,6 +7,7 @@ using Mall.Common.Plugin;
using
Mall.Model.Extend.MarketingCenter
;
using
Mall.Module.MarketingCenter
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Authorization
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
...
...
@@ -47,10 +48,11 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// 获取分享分类列表
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
public
ApiResult
GetShareCategoryList
()
{
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Share_Category_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
TenantId
=
UserInfo
.
TenantId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
var
list
=
shareModule
.
GetShareCategoryListModule
(
query
);
return
ApiResult
.
Success
(
""
,
list
);
...
...
@@ -111,6 +113,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// 获取分享详情分页列表
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
public
ApiResult
GetShareFriendPageList
()
{
var
parms
=
RequestParm
;
...
...
@@ -124,6 +127,24 @@ namespace Mall.WebApi.Controllers.MarketingCenter
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 小程序获取分享分页列表
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
public
ApiResult
AppGetShareFriendPage
()
{
var
parms
=
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Share_Friend_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
TenantId
=
parms
.
TenantId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
shareModule
.
GetShareFriendPageListModule
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
query
,
IsUse
:
true
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
;
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 获取分享详情列表
/// </summary>
...
...
@@ -235,6 +256,5 @@ namespace Mall.WebApi.Controllers.MarketingCenter
bool
flag
=
shareModule
.
SetShareFriendMaterialInfoModule
(
Id
,
MaterialInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
}
\ No newline at end of file
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