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
7a9ad4e5
Commit
7a9ad4e5
authored
Aug 14, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交订单
parent
02a723b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
2 deletions
+102
-2
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+102
-2
No files found.
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
7a9ad4e5
...
...
@@ -837,12 +837,12 @@ LEFT JOIN rb_member_user as c on b.UserId=c.Id
{
where
+=
$" AND DATE_FORMAT(a.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
,'%Y-%m-%d' )>= DATE_FORMAT('
{
dmodel
.
StartDate
}
','%Y-%m-%d' )"
;
// payMemerNumWhere += $" AND DATE_FORMAT({nameof(RB_Goods_Order.CreateDate)},'%Y-%m-%d' )>= DATE_FORMAT('{dmodel.StartDate}','%Y-%m-%d' )";
payMemerNumWhere
+=
$" AND DATE_FORMAT(
a.
{
nameof
(
RB_Goods_OrderAfterSale
.
CreateDate
)}
,'%Y-%m-%d' )>= DATE_FORMAT('
{
dmodel
.
StartDate
}
','%Y-%m-%d' )"
;
payMemerNumWhere
+=
$" AND DATE_FORMAT(
{
nameof
(
RB_Goods_OrderAfterSale
.
CreateDate
)}
,'%Y-%m-%d' )>= DATE_FORMAT('
{
dmodel
.
StartDate
}
','%Y-%m-%d' )"
;
}
if
(!
string
.
IsNullOrWhiteSpace
(
dmodel
.
EndDate
))
{
where
+=
$" AND DATE_FORMAT(a.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
,'%Y-%m-%d' )<= DATE_FORMAT('
{
dmodel
.
EndDate
}
','%Y-%m-%d' )"
;
payMemerNumWhere
+=
$" AND DATE_FORMAT(
a.
{
nameof
(
RB_Goods_OrderAfterSale
.
CreateDate
)}
,'%Y-%m-%d' )<= DATE_FORMAT('
{
dmodel
.
EndDate
}
','%Y-%m-%d' )"
;
payMemerNumWhere
+=
$" AND DATE_FORMAT(
{
nameof
(
RB_Goods_OrderAfterSale
.
CreateDate
)}
,'%Y-%m-%d' )<= DATE_FORMAT('
{
dmodel
.
EndDate
}
','%Y-%m-%d' )"
;
// payMemerNumWhere += $" AND DATE_FORMAT({nameof(RB_Goods_Order.CreateDate)},'%Y-%m-%d' )<= DATE_FORMAT('{dmodel.EndDate}','%Y-%m-%d' )";
}
...
...
@@ -1322,5 +1322,105 @@ GROUP BY od.GoodsId,o.OrderId
return
Get
<
RB_Goods_Order_Extend
>(
sql
).
ToList
();
}
#
endregion
#
region
店铺订单
/// <summary>
/// 分销订单
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Order_Extend
>
GetSmallShopOrdersPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Order_Extend
dmodel
)
{
string
where
=
$" 1=1 and o.
{
nameof
(
RB_Goods_Order
.
Status
)}
=0"
;
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
in(1,2,3,4,5,6)"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
OrderId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderId
)}
=
{
dmodel
.
OrderId
}
"
;
}
if
(
dmodel
.
OrderSource
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderSource
)}
=
{(
int
)
dmodel
.
OrderSource
}
"
;
}
if
(
dmodel
.
OrderType
>
0
)
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
OrderType
)}
=
{
dmodel
.
OrderType
}
"
;
}
if
(
dmodel
.
DeliveryMethod
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
DeliveryMethod
)}
=
{(
int
)
dmodel
.
DeliveryMethod
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StartTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
>='
{
dmodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
EndTime
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
CreateDate
)}
<='
{
dmodel
.
EndTime
}
23:59:59'"
;
}
if
(
dmodel
.
OrderStatus
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
=
{(
int
)
dmodel
.
OrderStatus
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderNo
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderNo
)}
like '%
{
dmodel
.
OrderNo
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
MerchantsNo
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
MerchantsNo
)}
like '%
{
dmodel
.
MerchantsNo
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserName
))
{
where
+=
$@" and u.
{
nameof
(
RB_Member_User
.
Name
)}
like '%
{
dmodel
.
UserName
}
%'"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
UserId
)}
=
{(
int
)
dmodel
.
UserId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsName
))
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
GoodsName
)}
like '%
{
dmodel
.
GoodsName
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Consignee
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
Consignee
)}
like '%
{
dmodel
.
Consignee
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Mobile
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
Mobile
)}
like '%
{
dmodel
.
Mobile
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
ProductCode
))
{
where
+=
$@" and od.
{
nameof
(
RB_Goods_OrderDetail
.
ProductCode
)}
like '%
{
dmodel
.
ProductCode
}
%'"
;
}
if
(
dmodel
.
Recycled
>
0
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
Recycled
)}
=
{(
int
)
dmodel
.
Recycled
}
"
;
}
if
(
dmodel
.
DistributionUserId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderCommission
.
UserId
)}
=
{
dmodel
.
DistributionUserId
}
"
;
}
string
sql
=
$@"SELECT o.*,u.Name as UserName FROM rb_goods_order o
INNER JOIN rb_goods_orderdetail od on o.OrderId=od.OrderId
INNER JOIN rb_member_user u on o.UserId=u.Id
LEFT JOIN rb_smallshops_commission oc on o.OrderId = oc.OrderId
where
{
where
}
group by o.OrderId order by o.CreateDate desc"
;
return
GetPage
<
RB_Goods_Order_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
#
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