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
8d52ca41
Commit
8d52ca41
authored
Feb 22, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a6b7713d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
4 deletions
+66
-4
RB_Commerce_Activity_Extend.cs
...Model/Extend/TradePavilion/RB_Commerce_Activity_Extend.cs
+5
-0
RB_Commerce_Consult_Extend.cs
....Model/Extend/TradePavilion/RB_Commerce_Consult_Extend.cs
+8
-1
CommerceActivityModule.cs
Mall.Module.TradePavilion/CommerceActivityModule.cs
+14
-2
RB_Commerce_ActivityRepository.cs
...epository/TradePavilion/RB_Commerce_ActivityRepository.cs
+2
-1
RB_Commerce_ConsultRepository.cs
...Repository/TradePavilion/RB_Commerce_ConsultRepository.cs
+12
-0
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+25
-0
No files found.
Mall.Model/Extend/TradePavilion/RB_Commerce_Activity_Extend.cs
View file @
8d52ca41
...
...
@@ -76,5 +76,10 @@ namespace Mall.Model.Extend.TradePavilion
return
str
;
}
}
/// <summary>
/// 报名人数
/// </summary>
public
int
JoinNum
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_Commerce_Consult_Extend.cs
View file @
8d52ca41
...
...
@@ -10,7 +10,14 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
public
class
RB_Commerce_Consult_Extend
:
RB_Commerce_Consult
{
/// <summary>
/// 活动编号【查询使用】
/// </summary>
public
string
QActivityIds
{
get
;
set
;
}
/// <summary>
/// 用户编号【查询使用】
/// </summary>
public
string
QUserIds
{
get
;
set
;
}
}
}
Mall.Module.TradePavilion/CommerceActivityModule.cs
View file @
8d52ca41
...
...
@@ -26,6 +26,11 @@ namespace Mall.Module.TradePavilion
/// </summary>
private
readonly
RB_Commerce_DetailsRepository
detailsRepository
=
new
RB_Commerce_DetailsRepository
();
/// <summary>
/// 活动报名仓储层对象
/// </summary>
private
readonly
RB_Commerce_ConsultRepository
commerce_ConsultRepository
=
new
RB_Commerce_ConsultRepository
();
#
region
商户活动管理
/// <summary>
...
...
@@ -35,10 +40,17 @@ namespace Mall.Module.TradePavilion
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <param name="isQuerySignup">是否查询报名名单</param>
/// <returns></returns>
public
List
<
RB_Commerce_Activity_Extend
>
GetCommerceActivityPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Commerce_Activity_Extend
query
)
public
List
<
RB_Commerce_Activity_Extend
>
GetCommerceActivityPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Commerce_Activity_Extend
query
,
bool
isQuerySignup
)
{
return
commerce_ActivityRepository
.
GetCommerceActivityPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
commerce_ActivityRepository
.
GetCommerceActivityPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
isQuerySignup
)
{
string
ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
Id
));
var
joinList
=
}
return
list
;
}
/// <summary>
...
...
Mall.Repository/TradePavilion/RB_Commerce_ActivityRepository.cs
View file @
8d52ca41
...
...
@@ -28,8 +28,9 @@ namespace Mall.Repository.TradePavilion
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.TypeName,'') AS ActivityTypeName
SELECT A.*,IFNULL(B.TypeName,'') AS ActivityTypeName
,IFNULL(C.JoinNum,0) AS JoinNum
FROM rb_commerce_activity AS A LEFT JOIN rb_commerce_activitytype AS B ON A.ActivityType=B.Id
LEFT JOIN (SELECT ActivityId,COUNT(1) AS JoinNum FROM rb_commerce_consult WHERE `Status`=0 GROUP BY ActivityId) AS C ON A.Id=C.ActivityId
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Commerce_Activity_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
...
...
Mall.Repository/TradePavilion/RB_Commerce_ConsultRepository.cs
View file @
8d52ca41
...
...
@@ -52,6 +52,18 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND {0} LIKE @Name "
,
nameof
(
RB_Commerce_Consult_Extend
.
LinkMan
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
LinkMan
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QActivityIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Commerce_Consult_Extend
.
ActivityId
),
query
.
QActivityIds
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QUserIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Commerce_Consult_Extend
.
UserId
),
query
.
QUserIds
);
}
if
(
query
.
UserId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Commerce_Consult_Extend
.
UserId
),
query
.
UserId
);
}
}
return
GetPage
<
RB_Commerce_Consult_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
8d52ca41
...
...
@@ -152,5 +152,30 @@ namespace Mall.WebApi.Controllers.TradePavilion
var
extModel
=
activityModule
.
GetCommerceActivityModule
(
Id
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 新增修改商会活动报名
/// </summary>
/// <returns></returns>
public
ApiResult
SetCommerceConsult
()
{
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
extModel
=
new
RB_Commerce_Consult_Extend
()
{
Id
=
jObj
.
GetInt
(
"Id"
),
ActivityId
=
jObj
.
GetInt
(
"ActivityId"
),
UserId
=
jObj
.
GetInt
(
"UserId"
),
LinkMan
=
jObj
.
GetStringValue
(
"LinkMan"
),
LinkTel
=
jObj
.
GetStringValue
(
"LinkTel"
),
};
extModel
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
var
userInfo
=
AppletUserInfo
;
extModel
.
UserId
=
userInfo
?.
UserId
??
0
;
extModel
.
CreateTime
=
DateTime
.
Now
;
var
flag
=
consultModule
.
SetCommerceConsultModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
}
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