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
deb4ee2c
Commit
deb4ee2c
authored
Apr 11, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
9a65b332
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
9 deletions
+34
-9
FormTypeEnum.cs
Mall.Common/Enum/MarketingCenter/FormTypeEnum.cs
+16
-0
Rb_Survey.cs
Mall.Model/Entity/MarketingCenter/Rb_Survey.cs
+1
-0
SurveyController.cs
Mall.WebApi/Controllers/MarketingCenter/SurveyController.cs
+17
-9
No files found.
Mall.Common/Enum/MarketingCenter/FormTypeEnum.cs
View file @
deb4ee2c
...
...
@@ -12,10 +12,26 @@ namespace Mall.Common.Enum.MarketingCenter
/// </summary>
[
EnumField
(
"用户信息"
)]
Base
=
1
,
/// <summary>
/// 问卷信息
/// </summary>
[
EnumField
(
"问卷信息"
)]
Survey
=
2
,
[
EnumField
(
"课程安排与设计"
)]
CourseArrangement
=
3
,
[
EnumField
(
"教师授课情形"
)]
TeachersSituation
=
4
,
[
EnumField
(
"助教老师"
)]
TeachingAssistant
=
5
,
[
EnumField
(
"学习环境"
)]
LearningEnvironment
=
6
,
[
EnumField
(
"意见及建议"
)]
Opinionandsuggestion
=
7
}
}
Mall.Model/Entity/MarketingCenter/Rb_Survey.cs
View file @
deb4ee2c
...
...
@@ -25,6 +25,7 @@ namespace Mall.Model.Entity.MarketingCenter
/// 活动id
/// </summary>
public
int
ActivitySurveyId
{
get
;
set
;
}
/// <summary>
///意见调查类型
/// </summary>
...
...
Mall.WebApi/Controllers/MarketingCenter/SurveyController.cs
View file @
deb4ee2c
...
...
@@ -35,6 +35,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
private
Module
.
User
.
UserModule
userModule
=
new
Module
.
User
.
UserModule
();
#
region
问卷活动调查
/// <summary>
/// 获取基础信息列表
/// </summary>
...
...
@@ -160,6 +161,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
}
#
endregion
#
region
问卷调查
/// <summary>
/// 获取基础信息列表
...
...
@@ -174,7 +176,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
demodel
.
TenantId
=
UserInfo
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
var
data
=
module
.
GetPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
var
list
=
data
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
SurveyType
,
x
.
IsRequired
,
x
.
FormType
,
x
.
Title
,
x
.
IsShow
,
x
.
Sort
,
SurveyTypeStr
=
EnumHelper
.
GetEnumName
(
x
.
SurveyType
),
FormTypeStr
=
EnumHelper
.
GetEnumName
(
x
.
FormType
)
}).
ToList
();
var
list
=
data
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
SurveyType
,
x
.
IsRequired
,
x
.
FormType
,
x
.
Title
,
x
.
IsShow
,
x
.
Sort
,
SurveyTypeStr
=
EnumHelper
.
GetEnumName
(
x
.
SurveyType
),
FormTypeStr
=
EnumHelper
.
GetEnumName
(
x
.
FormType
)
}).
ToList
();
pagelist
.
count
=
int
.
Parse
(
count
.
ToString
());
pagelist
.
pageData
=
list
;
return
ApiResult
.
Success
(
""
,
pagelist
);
...
...
@@ -306,7 +308,8 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// <param name="request"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetGuestSurveyDetails
()
{
var
parms
=
RequestParm
;
...
...
@@ -372,7 +375,17 @@ namespace Mall.WebApi.Controllers.MarketingCenter
userModel
.
Photo
,
CreateDateStr
=
model
.
CreateDate
.
HasValue
?
model
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
};
return
ApiResult
.
Success
(
"请求成功!"
,
new
{
surverList
=
surverList
.
Where
(
x
=>
x
.
FormType
==
FormTypeEnum
.
Survey
),
baseList
=
surverList
.
Where
(
x
=>
x
.
FormType
==
FormTypeEnum
.
Base
),
obj
});
return
ApiResult
.
Success
(
"请求成功!"
,
new
{
surverList
=
surverList
.
Where
(
x
=>
x
.
FormType
==
FormTypeEnum
.
Survey
),
baseList
=
surverList
.
Where
(
x
=>
x
.
FormType
==
FormTypeEnum
.
Base
),
courseArrangementList
=
surverList
.
Where
(
x
=>
x
.
FormType
==
FormTypeEnum
.
CourseArrangement
),
teachersSituationList
=
surverList
.
Where
(
x
=>
x
.
FormType
==
FormTypeEnum
.
TeachersSituation
),
teachingAssistantList
=
surverList
.
Where
(
x
=>
x
.
FormType
==
FormTypeEnum
.
TeachingAssistant
),
learningEnvironmentList
=
surverList
.
Where
(
x
=>
x
.
FormType
==
FormTypeEnum
.
LearningEnvironment
),
opinionandsuggestionList
=
surverList
.
Where
(
x
=>
x
.
FormType
==
FormTypeEnum
.
Opinionandsuggestion
),
obj
});
}
return
ApiResult
.
Failed
(
"未找到调查信息!"
);
}
...
...
@@ -393,16 +406,11 @@ namespace Mall.WebApi.Controllers.MarketingCenter
demodel
.
TenantId
=
UserInfo
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
var
data
=
module
.
GetResultPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
var
list
=
data
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
ActiveSurveyName
,
x
.
AliasName
,
CreateDateStr
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
x
.
Photo
}).
ToList
();
var
list
=
data
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
ActiveSurveyName
,
x
.
AliasName
,
CreateDateStr
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
x
.
Photo
}).
ToList
();
pagelist
.
count
=
int
.
Parse
(
count
.
ToString
());
pagelist
.
pageData
=
list
;
return
ApiResult
.
Success
(
""
,
pagelist
);
}
#
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