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
d9db5492
Commit
d9db5492
authored
Jun 19, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
66777caf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
198 additions
and
0 deletions
+198
-0
RB_Member_Balance_Extend.cs
Mall.Model/Entity/User/RB_Member_Balance_Extend.cs
+30
-0
RB_Member_Buy.cs
Mall.Model/Entity/User/RB_Member_Buy.cs
+107
-0
RB_Member_BuyRepository.cs
Mall.Repository/User/RB_Member_BuyRepository.cs
+61
-0
No files found.
Mall.Model/Entity/User/RB_Member_Balance_Extend.cs
0 → 100644
View file @
d9db5492
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.User
;
using
Mall.Common.Enum.User
;
namespace
Mall.Model.Extend.User
{
/// <summary>
/// 会员购买表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Member_Buy_Extend
:
RB_Member_Buy
{
/// <summary>
/// 用户名称
/// </summary>
public
string
UserName
{
get
;
set
;
}
/// <summary>
/// 开始时间
/// </summary>
public
string
StartTime
{
get
;
set
;
}
/// <summary>
/// 结束时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
}
}
Mall.Model/Entity/User/RB_Member_Buy.cs
0 → 100644
View file @
d9db5492
using
Mall.Common.AOP
;
using
Mall.Common.Enum.MarketingCenter
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 会员购买表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Member_Buy
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 单号
/// </summary>
public
string
OrderNo
{
get
;
set
;
}
/// <summary>
/// 用户id
/// </summary>
public
int
?
UserId
{
get
;
set
;
}
/// <summary>
/// 会员等级
/// </summary>
public
int
?
GradeId
{
get
;
set
;
}
/// <summary>
/// 等级名称
/// </summary>
public
string
GradeName
{
get
;
set
;
}
/// <summary>
/// 支付金额
/// </summary>
public
decimal
?
Money
{
get
;
set
;
}
/// <summary>
/// 支付时间
/// </summary>
public
DateTime
?
PayTime
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
Status
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
}
}
Mall.Repository/User/RB_Member_BuyRepository.cs
0 → 100644
View file @
d9db5492
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.User
;
using
System.Linq
;
namespace
Mall.Repository.User
{
/// <summary>
/// 用户会员购买仓储层
/// </summary>
public
class
RB_Member_BuyRepository
:
RepositoryBase
<
RB_Member_Buy
>
{
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Member_Buy_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Member_Buy_Extend
dmodel
)
{
string
where
=
" 1=1 "
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and b.
{
nameof
(
RB_Member_Buy_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and b.
{
nameof
(
RB_Member_Buy_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and b.
{
nameof
(
RB_Member_Buy_Extend
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and b.
{
nameof
(
RB_Member_Buy_Extend
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserName
))
{
where
+=
$@" and u.
{
nameof
(
RB_Member_User
.
Name
)}
like '%
{
dmodel
.
UserName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StartTime
))
{
where
+=
$@" and b.
{
nameof
(
RB_Member_Buy_Extend
.
PayTime
)}
>= '
{
dmodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
EndTime
))
{
where
+=
$@" and b.
{
nameof
(
RB_Member_Buy_Extend
.
PayTime
)}
<= '
{
dmodel
.
EndTime
}
23:59:59'"
;
}
string
sql
=
$@"select b.*,u.Name as UserName from RB_Member_Buy b
inner join rb_member_user u on b.UserId= u.Id
where
{
where
}
order by b.Id desc"
;
return
GetPage
<
RB_Member_Buy_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
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