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
ba5aa3de
Commit
ba5aa3de
authored
Apr 11, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
deb4ee2c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
52 deletions
+42
-52
Rb_GuestSurvey.cs
Mall.Model/Entity/MarketingCenter/Rb_GuestSurvey.cs
+9
-20
SurveyModule.cs
Mall.Module.MarketingCenter/SurveyModule.cs
+4
-4
Rb_GuestSurveyRepository.cs
Mall.Repository/MarketingCenter/Rb_GuestSurveyRepository.cs
+5
-1
AppletEducationController.cs
...WebApi/Controllers/Education/AppletEducationController.cs
+20
-24
SurveyController.cs
Mall.WebApi/Controllers/MarketingCenter/SurveyController.cs
+4
-3
No files found.
Mall.Model/Entity/MarketingCenter/Rb_GuestSurvey.cs
View file @
ba5aa3de
...
...
@@ -18,9 +18,6 @@ namespace Mall.Model.Entity.MarketingCenter
/// </summary>
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 会员id
/// </summary>
...
...
@@ -32,23 +29,14 @@ namespace Mall.Model.Entity.MarketingCenter
public
int
ActivitySurveyId
{
get
;
set
;
}
/// <summary>
///
///
小程序编号
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
///
///
商户编号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 创建时间
...
...
@@ -60,8 +48,9 @@ namespace Mall.Model.Entity.MarketingCenter
/// </summary>
public
DateStateEnum
State
{
get
;
set
;
}
/// <summary>
/// 用户类型(1-小程序用户,2-教育学员)
/// </summary>
public
int
UserType
{
get
;
set
;
}
}
}
Mall.Module.MarketingCenter/SurveyModule.cs
View file @
ba5aa3de
...
...
@@ -424,7 +424,7 @@ namespace Mall.Module.MarketingCenter
public
int
SetGuestSurvey
(
Rb_GuestSurvey_Extend
model
)
{
var
trans
=
guestSurveyRepository
.
DbTransaction
;
int
surveyId
=
0
;
int
surveyId
;
try
{
...
...
@@ -460,7 +460,7 @@ namespace Mall.Module.MarketingCenter
public
bool
SetBbatchGuestSurvey
(
List
<
Rb_GuestSurvey_Extend
>
list
)
{
var
trans
=
guestSurveyRepository
.
DbTransaction
;
int
surveyId
=
0
;
int
surveyId
;
try
{
foreach
(
var
itemModel
in
list
)
...
...
@@ -496,9 +496,9 @@ namespace Mall.Module.MarketingCenter
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
Rb_GuestSurvey_Extend
>
GetGuestSurveyList
(
Rb_GuestSurvey_Extend
where
)
public
List
<
Rb_GuestSurvey_Extend
>
GetGuestSurveyList
Module
(
Rb_GuestSurvey_Extend
where
)
{
return
guestSurveyRepository
.
Get
List
(
where
);
return
guestSurveyRepository
.
Get
GuestSurveyListRepository
(
where
);
}
...
...
Mall.Repository/MarketingCenter/Rb_GuestSurveyRepository.cs
View file @
ba5aa3de
...
...
@@ -20,7 +20,7 @@ namespace Mall.Repository.MarketingCenter
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
Rb_GuestSurvey_Extend
>
Get
List
(
Rb_GuestSurvey_Extend
where
)
public
List
<
Rb_GuestSurvey_Extend
>
Get
GuestSurveyListRepository
(
Rb_GuestSurvey_Extend
where
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$@"SELECT * from Rb_GuestSurvey where state=0"
);
...
...
@@ -42,6 +42,10 @@ namespace Mall.Repository.MarketingCenter
{
sb
.
AppendFormat
(
" and ActivitySurveyId={0}"
,
where
.
ActivitySurveyId
);
}
if
(
where
.
UserType
>
0
)
{
sb
.
AppendFormat
(
" and UserType={0}"
,
where
.
UserType
);
}
}
return
Get
<
Rb_GuestSurvey_Extend
>(
sb
.
ToString
()).
ToList
();
}
...
...
Mall.WebApi/Controllers/Education/AppletEducationController.cs
View file @
ba5aa3de
...
...
@@ -1140,15 +1140,18 @@ namespace Mall.WebApi.Controllers.Education
[
HttpPost
]
public
ApiResult
SetGuestSurvey
()
{
var
req
=
RequestParm
;
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
())
;
var
userInfo
=
AppletUserInfo
;
List
<
Rb_Survey_Extend
>
modelSurvey
=
JsonConvert
.
DeserializeObject
<
List
<
Rb_Survey_Extend
>>(
req
.
msg
.
ToString
());
List
<
Rb_Survey_Extend
>
modelSurvey
=
JsonConvert
.
DeserializeObject
<
List
<
Rb_Survey_Extend
>>(
RequestParm
.
msg
.
ToString
());
if
(
modelSurvey
==
null
||
!
modelSurvey
.
Any
())
{
return
ApiResult
.
Failed
(
"选项信息不能空"
);
}
Rb_GuestSurvey_Extend
model
=
new
Rb_GuestSurvey_Extend
();
Rb_GuestSurvey_Extend
model
=
new
Rb_GuestSurvey_Extend
()
{
UserType
=
jObj
.
GetInt
(
"UserType"
),
};
if
((
modelSurvey
.
FirstOrDefault
()?.
ActivitySurveyId
??
0
)
==
0
)
{
return
ApiResult
.
Failed
(
"请选择活动对应的问卷信息"
);
...
...
@@ -1161,7 +1164,13 @@ namespace Mall.WebApi.Controllers.Education
}
//先判断是否已添加
var
GuestSurvey
=
surveyModule
.
GetGuestSurveyList
(
new
Rb_GuestSurvey_Extend
{
ActivitySurveyId
=
modelSurvey
.
FirstOrDefault
()?.
ActivitySurveyId
??
0
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
var
GuestSurvey
=
surveyModule
.
GetGuestSurveyListModule
(
new
Rb_GuestSurvey_Extend
{
ActivitySurveyId
=
modelSurvey
.
FirstOrDefault
()?.
ActivitySurveyId
??
0
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
,
UserType
=
model
.
UserType
,
});
if
(
activeSurueyModel
.
StartDate
.
HasValue
&&
activeSurueyModel
.
EndDate
.
HasValue
)
{
...
...
@@ -1174,10 +1183,7 @@ namespace Mall.WebApi.Controllers.Education
return
ApiResult
.
Failed
(
"问卷调查活动已结束"
);
}
}
//if (activeSurueyModel.SurveyNum != -1 && activeSurueyModel.SurveyNum <= GuestSurvey.Count())
//{
// return ApiResult.Failed(activeSurueyModel.SurveyNum + "份问卷调查已填写完");
//}
if
(
GuestSurvey
.
Where
(
x
=>
x
.
UserId
==
userInfo
.
UserId
).
Count
()
>
0
)
{
return
ApiResult
.
Failed
(
"请勿重复参与问卷调查"
);
...
...
@@ -1250,19 +1256,10 @@ namespace Mall.WebApi.Controllers.Education
}
model
.
SurveyOptionsList
.
Add
(
modelSurveyOptions
);
}
int
flag
=
surveyModule
.
SetGuestSurvey
(
model
);
if
(
flag
>
0
)
{
return
ApiResult
.
Success
();
}
else
return
ApiResult
.
Failed
(
"问卷调查提交失败"
);
return
flag
>
0
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
"问卷调查提交失败"
);
}
/// <summary>
/// 获取会员调查问题列表
/// </summary>
...
...
@@ -1280,7 +1277,7 @@ namespace Mall.WebApi.Controllers.Education
return
ApiResult
.
Failed
(
"问卷调查活动不存在"
);
}
//先判断是否已添加
var
GuestSurvey
=
surveyModule
.
GetGuestSurveyList
(
new
Rb_GuestSurvey_Extend
{
ActivitySurveyId
=
model
.
ActivitySurveyId
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
var
GuestSurvey
=
surveyModule
.
GetGuestSurveyList
Module
(
new
Rb_GuestSurvey_Extend
{
ActivitySurveyId
=
model
.
ActivitySurveyId
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
int
isEnd
=
0
;
if
(
activeSurueyModel
.
StartDate
.
HasValue
&&
activeSurueyModel
.
EndDate
.
HasValue
)
...
...
@@ -1974,15 +1971,13 @@ namespace Mall.WebApi.Controllers.Education
}
}
/// <summary>
/// 取消报名
/// </summary>
/// <returns></returns>
public
ApiResult
CancelCommerceConsult
()
{
bool
flag
=
false
;
bool
flag
;
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
ActivityId
=
jObj
.
GetInt
(
"ActivityId"
);
var
Id
=
jObj
.
GetInt
(
"Id"
);
...
...
@@ -2381,7 +2376,8 @@ namespace Mall.WebApi.Controllers.Education
{
return
ApiResult
.
Failed
(
"未查询到您正在学习的课程,无法绑定信息"
);
}
if
(
courseId
==
1
)
{
if
(
courseId
==
1
)
{
StuIsEmp
=
1
;
//内部人员
}
}
...
...
@@ -2764,7 +2760,7 @@ namespace Mall.WebApi.Controllers.Education
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
CancelCommerceConsultJXH
()
{
bool
flag
=
false
;
bool
flag
;
JObject
jObj
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
ActivityId
=
jObj
.
GetInt
(
"ActivityId"
);
var
Id
=
jObj
.
GetInt
(
"Id"
);
...
...
Mall.WebApi/Controllers/MarketingCenter/SurveyController.cs
View file @
ba5aa3de
...
...
@@ -28,11 +28,12 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// <summary>
/// 处理类对象
/// </summary>
private
SurveyModule
module
=
new
SurveyModule
();
private
readonly
SurveyModule
module
=
new
SurveyModule
();
/// <summary>
/// 处理类对象
/// </summary>
private
Module
.
User
.
UserModule
userModule
=
new
Module
.
User
.
UserModule
();
private
readonly
Module
.
User
.
UserModule
userModule
=
new
Module
.
User
.
UserModule
();
#
region
问卷活动调查
...
...
@@ -229,7 +230,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
model
.
SurveyOptionsList
=
module
.
GetSurveyOptionsList
(
new
Rb_SurveyOptions_Extend
{
SurveyID
=
model
.
ID
});
bool
result
=
module
.
DelSurvey
(
model
);
return
ApiResult
.
Success
(
"删除成功
"
);
return
result
?
ApiResult
.
Success
(
"删除成功!"
)
:
ApiResult
.
Failed
(
"删除失败!
"
);
}
return
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