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
ddcd10d9
Commit
ddcd10d9
authored
Jul 02, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
3c829cee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
5 deletions
+60
-5
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+4
-0
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+44
-2
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+5
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+7
-3
No files found.
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
ddcd10d9
...
...
@@ -35,6 +35,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
int
?
ShoppingAddressId
{
get
;
set
;
}
/// <summary>
/// 是否排除取消订单
/// </summary>
public
int
?
IsNotSelectCancel
{
get
;
set
;
}
/// <summary>
/// 商品id
/// </summary>
public
int
?
GoodsId
{
get
;
set
;
}
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
ddcd10d9
...
...
@@ -63,10 +63,52 @@ namespace Mall.Repository.Product
if
(
dmodel
.
IsProxy
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
IsProxy
)}
=
{
dmodel
.
IsProxy
}
"
;
}
string
orderBy
=
" g.CreateDate desc"
;
if
(
dmodel
.
OrderBy
==
1
)
{
//id升序
orderBy
=
" g.Id asc"
;
}
else
if
(
dmodel
.
OrderBy
==
2
)
{
//id降序
orderBy
=
" g.Id desc"
;
}
else
if
(
dmodel
.
OrderBy
==
3
)
{
//排序升序
orderBy
=
" g.Sort asc"
;
}
else
if
(
dmodel
.
OrderBy
==
4
)
{
//排序降序
orderBy
=
" g.Sort desc"
;
}
else
if
(
dmodel
.
OrderBy
==
5
)
{
//售价升序
orderBy
=
" g.SellingPrice asc"
;
}
else
if
(
dmodel
.
OrderBy
==
6
)
{
//售价降序
orderBy
=
" g.SellingPrice desc"
;
}
else
if
(
dmodel
.
OrderBy
==
7
)
{
//库存升序
orderBy
=
" g.InventoryNum asc"
;
}
else
if
(
dmodel
.
OrderBy
==
8
)
{
//库存降序
orderBy
=
" g.InventoryNum desc"
;
}
string
sql
=
$@"select g.* from RB_Goods g
inner join rb_goods_category c on g.Id=c.GoodsId
where
{
where
}
group by g.Id order by
g.CreateDate desc
"
;
where
{
where
}
group by g.Id order by
{
orderBy
}
"
;
return
GetPage
<
RB_Goods_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
}
...
...
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
ddcd10d9
...
...
@@ -63,6 +63,11 @@ namespace Mall.Repository.Product
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
=
{(
int
)
dmodel
.
OrderStatus
}
"
;
}
if
(
dmodel
.
IsNotSelectCancel
==
1
)
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
<>
{(
int
)
OrderStatusEnum
.
Cancel
}
"
;
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
Recycled
)}
=2"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderStatusIds
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
in(
{
dmodel
.
OrderStatusIds
}
)"
;
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
ddcd10d9
...
...
@@ -167,6 +167,10 @@ namespace Mall.WebApi.Controllers.MallBase
{
demodel
.
TenantId
=
Convert
.
ToInt32
(
parms
.
uid
);
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
if
(!(
demodel
.
OrderStatus
>
0
))
{
demodel
.
IsNotSelectCancel
=
1
;
}
var
list
=
orderModule
.
GetGoodsOrderPageList
(
1
,
10000
,
out
long
count
,
demodel
);
#
region
组装数据
int
Num
=
0
;
...
...
@@ -212,11 +216,11 @@ namespace Mall.WebApi.Controllers.MallBase
case
12
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
.
DistrictAddress
??
""
)
+
" "
+
(
item
.
ShoppingAddress
??
""
))
{
});
break
;
case
13
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
.
Prefer
Price
??
0
).
ToString
())
{
});
break
;
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
2
.
Original_
Price
??
0
).
ToString
())
{
});
break
;
case
14
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
.
Incom
e
??
0
).
ToString
())
{
});
break
;
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
2
.
Final_Pric
e
??
0
).
ToString
())
{
});
break
;
case
15
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
.
FreightMoney
??
0
).
ToString
())
{
});
break
;
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
(
item
2
.
FreightMoney
??
0
).
ToString
())
{
});
break
;
case
16
:
datarow
.
ExcelRows
.
Add
(
new
ExcelColumn
(
value
:
item
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
))
{
});
break
;
case
17
:
...
...
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