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
0e405378
Commit
0e405378
authored
Feb 22, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
0c4ae316
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
17 deletions
+77
-17
CommerceConsultModule.cs
Mall.Module.TradePavilion/CommerceConsultModule.cs
+2
-2
CommerceNewsModule.cs
Mall.Module.TradePavilion/CommerceNewsModule.cs
+11
-0
RB_Commerce_NewsRepository.cs
Mall.Repository/TradePavilion/RB_Commerce_NewsRepository.cs
+45
-0
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+16
-9
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+3
-6
No files found.
Mall.Module.TradePavilion/CommerceConsultModule.cs
View file @
0e405378
...
...
@@ -25,9 +25,9 @@ namespace Mall.Module.TradePavilion
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Commerce_Consult_Extend
>
GetCommerceConsult
PageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Commerce_Consult_Extend
query
)
public
List
<
RB_Commerce_Consult_Extend
>
GetCommerceConsult
ListModule
(
RB_Commerce_Consult_Extend
query
)
{
return
consultRepository
.
GetCommerceConsult
PageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
return
consultRepository
.
GetCommerceConsult
ListRepository
(
query
);
}
/// <summary>
...
...
Mall.Module.TradePavilion/CommerceNewsModule.cs
View file @
0e405378
...
...
@@ -30,6 +30,17 @@ namespace Mall.Module.TradePavilion
return
commerce_NewsRepository
.
GetCommerceNewsPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 获取新闻分页列表
/// </summary>
/// <param name="Top"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Commerce_News_Extend
>
GetCommerceNewsTopListModule
(
int
Top
,
RB_Commerce_News_Extend
query
)
{
return
commerce_NewsRepository
.
GetCommerceNewsTopListRepository
(
Top
,
query
);
}
/// <summary>
/// 新增修改新闻
/// </summary>
...
...
Mall.Repository/TradePavilion/RB_Commerce_NewsRepository.cs
View file @
0e405378
...
...
@@ -55,5 +55,50 @@ WHERE 1=1
}
return
GetPage
<
RB_Commerce_News_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 获取新闻分页列表
/// </summary>
/// <param name="Top"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Commerce_News_Extend
>
GetCommerceNewsTopListRepository
(
int
Top
,
RB_Commerce_News_Extend
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*
FROM rb_commerce_news AS A
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Commerce_News_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
==
null
)
{
return
new
List
<
RB_Commerce_News_Extend
>();
}
else
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Commerce_News_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Commerce_News_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Title
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_Commerce_News_Extend
.
Title
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Title
.
Trim
()
+
"%"
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Commerce_News_Extend
.
PublishTime
));
if
(
Top
>
0
)
{
builder
.
AppendFormat
(
" LIMIT {0} "
,
Top
);
}
return
Get
<
RB_Commerce_News_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
0e405378
...
...
@@ -109,13 +109,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
public
ApiResult
GetCommerceActivityTypeList
()
{
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Commerce_ActivityType_Extend
()
{
TypeName
=
jObj
.
GetStringValue
(
"TypeName"
)
};
var
query
=
new
RB_Commerce_ActivityType_Extend
();
var
userInfo
=
AppletUserInfo
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
TenantId
=
userInfo
?.
TenantId
??
0
;
var
list
=
activityModule
.
GetCommerceActivityTypeListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
.
Select
(
qitem
=>
new
{
qitem
.
Id
,
qitem
.
CoverImage
,
qitem
.
TypeName
}));
}
...
...
@@ -132,8 +129,9 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
ActivityType
=
jObj
.
GetInt
(
"ActivityType"
)
};
var
userInfo
=
AppletUserInfo
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
TenantId
=
userInfo
?.
TenantId
??
0
;
var
list
=
activityModule
.
GetCommerceActivityPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
;
...
...
@@ -168,14 +166,23 @@ namespace Mall.WebApi.Controllers.TradePavilion
LinkMan
=
jObj
.
GetStringValue
(
"LinkMan"
),
LinkTel
=
jObj
.
GetStringValue
(
"LinkTel"
),
};
var
userInfo
=
AppletUserInfo
;
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
var
userInfo
=
AppletUserInfo
;
extModel
.
TenantId
=
userInfo
?.
TenantId
??
0
;
extModel
.
UserId
=
userInfo
?.
UserId
??
0
;
extModel
.
CreateTime
=
DateTime
.
Now
;
var
flag
=
consultModule
.
SetCommerceConsultModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取新闻前几条
/// </summary>
/// <returns></returns>
public
ApiResult
GetNewsTop
()
{
return
null
;
}
}
}
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
0e405378
...
...
@@ -334,7 +334,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
activityModule
.
GetCommerceActivityPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
var
list
=
activityModule
.
GetCommerceActivityPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
,
isQuerySignup
:
true
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
...
...
@@ -499,7 +499,6 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
public
ApiResult
GetCommerceConsultPage
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
query
=
new
RB_Commerce_Consult_Extend
()
{
...
...
@@ -507,10 +506,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
var
list
=
consultModule
.
GetCommerceConsultPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
);
pageModel
.
count
=
Convert
.
ToInt32
(
rowsCount
);
pageModel
.
pageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
var
list
=
consultModule
.
GetCommerceConsultListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
...
...
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