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
c1bda959
Commit
c1bda959
authored
Aug 14, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
bc3030eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
2 deletions
+39
-2
RB_SmallShops_CommissionRepository.cs
....Repository/Product/RB_SmallShops_CommissionRepository.cs
+39
-2
No files found.
Mall.Repository/Product/RB_SmallShops_CommissionRepository.cs
View file @
c1bda959
...
@@ -15,9 +15,46 @@ namespace Mall.Repository.Product
...
@@ -15,9 +15,46 @@ namespace Mall.Repository.Product
public
class
RB_SmallShops_CommissionRepository
:
BaseRepository
<
RB_SmallShops_Commission
>
public
class
RB_SmallShops_CommissionRepository
:
BaseRepository
<
RB_SmallShops_Commission
>
{
{
/// <summary>
/// 获取用户返佣
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_SmallShops_Commission_Extend
>
GetListGroupByUser
(
RB_SmallShops_Commission_Extend
dmodel
)
{
string
where
=
$" 1=1 and oa.ReOrderId is null"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_SmallShops_Commission
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_SmallShops_Commission
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
OrderId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_SmallShops_Commission
.
OrderId
)}
=
{
dmodel
.
OrderId
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_SmallShops_Commission
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(
dmodel
.
OrderDetailId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_SmallShops_Commission
.
OrderDetailId
)}
=
{
dmodel
.
OrderDetailId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderIds
))
{
where
+=
$@" and oc.
{
nameof
(
RB_SmallShops_Commission
.
OrderId
)}
in(
{
dmodel
.
OrderIds
}
)"
;
}
string
sql
=
$@"SELECT oc.OrderId,oc.UserId,oc.Type,oc.CommissionState,SUM(oc.Commission) as Commission FROM rb_smallshops_commission oc
left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and oa.Type=1 and oa.Status=0 and oa.ReOrderStatus in (2,3,4,5)
where
{
where
}
group by oc.OrderId,oc.UserId,oc.Type "
;
return
Get
<
RB_SmallShops_Commission_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// <summary>
/// 获取用户返佣
/// 获取用户返佣
...
...
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