Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
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
黄奎
Education
Commits
92d76f7d
Commit
92d76f7d
authored
Apr 11, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修
parent
dda6440e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
177 additions
and
0 deletions
+177
-0
RB_ActivitySurvey.cs
Edu.Model/Entity/Mall/RB_ActivitySurvey.cs
+96
-0
ActivitySurveyModule.cs
Edu.Module.Goods/ActivitySurveyModule.cs
+30
-0
RB_ActivitySurveyRepository.cs
Edu.Repository/Mall/RB_ActivitySurveyRepository.cs
+51
-0
No files found.
Edu.Model/Entity/Mall/RB_ActivitySurvey.cs
0 → 100644
View file @
92d76f7d
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Mall
{
/// <summary>
/// 问卷调查实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"MallConnection"
)]
public
class
RB_ActivitySurvey
{
/// <summary>
/// 编号
/// </summary>
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 标题
/// </summary>
public
string
Title
{
get
;
set
;
}
/// <summary>
/// 活动开始时间
/// </summary>
public
DateTime
?
StartDate
{
get
;
set
;
}
/// <summary>
/// 活动结束时间
/// </summary>
public
DateTime
?
EndDate
{
get
;
set
;
}
/// <summary>
/// 份数
/// </summary>
public
int
SurveyNum
{
get
;
set
;
}
/// <summary>
/// 活动说明
/// </summary>
public
string
Description
{
get
;
set
;
}
/// <summary>
/// 奖品地址
/// </summary>
public
string
PrizeAddress
{
get
;
set
;
}
/// <summary>
/// 奖品类型
/// </summary>
public
int
PrizeType
{
get
;
set
;
}
/// <summary>
/// 删除
/// </summary>
public
int
State
{
get
;
set
;
}
/// <summary>
/// 小程序编号
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 商户编号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// </summary>
public
DateTime
?
UpdateDate
{
get
;
set
;
}
}
}
Edu.Module.Goods/ActivitySurveyModule.cs
0 → 100644
View file @
92d76f7d
using
Edu.Model.Entity.Mall
;
using
Edu.Repository.Mall
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Module.Goods
{
/// <summary>
/// 问卷调查处理类
/// </summary>
public
class
ActivitySurveyModule
{
/// <summary>
/// 意见调查表仓储层对象
/// </summary>
private
readonly
RB_ActivitySurveyRepository
activitySurveyRepository
=
new
RB_ActivitySurveyRepository
();
/// <summary>
/// 获取问卷调查列表
/// </summary>
/// <param name="where"></param>
/// <param name="StuId"></param>
/// <returns></returns>
public
List
<
RB_ActivitySurvey
>
GetActivitySurveyListModule
(
RB_ActivitySurvey
where
,
string
StuId
)
{
return
activitySurveyRepository
.
GetActivitySurveyListRepository
(
where
,
StuId
);
}
}
}
Edu.Repository/Mall/RB_ActivitySurveyRepository.cs
0 → 100644
View file @
92d76f7d
using
Edu.Model.Entity.Mall
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Mall
{
/// <summary>
/// 问卷调查仓储层
/// </summary>
public
class
RB_ActivitySurveyRepository
:
BaseRepository
<
RB_ActivitySurvey
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_ActivitySurvey
);
}
}
/// <summary>
/// 获取问卷调查列表
/// </summary>
/// <param name="where"></param>
/// <param name="StuId"></param>
/// <returns></returns>
public
List
<
RB_ActivitySurvey
>
GetActivitySurveyListRepository
(
RB_ActivitySurvey
where
,
string
StuId
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
AppendFormat
(
$@"
SELECT A.*
FROM RB_ActivitySurvey AS A
WHERE A.State=0 "
);
sb
.
AppendFormat
(
" AND A.StartDate<'{0}' AND A.EndDate>'{0}' "
,
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
));
if
(!
string
.
IsNullOrEmpty
(
StuId
))
{
sb
.
AppendFormat
(
" AND NOT EXISTS(SELECT 1 FROM rb_guestsurvey WHERE UserType=2 AND ActivitySurveyId=A.ID AND UserId={0}) "
,
StuId
);
}
if
(
where
!=
null
)
{
if
(
where
.
TenantId
>
0
)
{
sb
.
AppendFormat
(
" AND A.TenantId={0}"
,
where
.
TenantId
);
}
if
(
where
.
MallBaseId
>
0
)
{
sb
.
AppendFormat
(
" AND A.MallBaseId={0}"
,
where
.
MallBaseId
);
}
}
return
Get
<
RB_ActivitySurvey
>(
sb
.
ToString
()).
ToList
();
}
}
}
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