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
a317b618
Commit
a317b618
authored
May 18, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
售后订单
parent
69019936
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1642 additions
and
55 deletions
+1642
-55
AfterSaleSelectStatusEnum.cs
Mall.Common/Enum/Goods/AfterSaleSelectStatusEnum.cs
+36
-0
OrderAfterSaleExportEnum.cs
Mall.Common/Enum/Goods/OrderAfterSaleExportEnum.cs
+106
-0
OrderAfterSaleStatusEnum.cs
Mall.Common/Enum/Goods/OrderAfterSaleStatusEnum.cs
+46
-0
RB_Goods_OrderAfterSale.cs
Mall.Model/Entity/Product/RB_Goods_OrderAfterSale.cs
+6
-1
RB_Goods_DistributionCommission_Extend.cs
.../Extend/Product/RB_Goods_DistributionCommission_Extend.cs
+8
-0
RB_Goods_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Extend.cs
+10
-0
RB_Goods_MemberPrice_Extend.cs
Mall.Model/Extend/Product/RB_Goods_MemberPrice_Extend.cs
+8
-0
RB_Goods_OrderAfterSale_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderAfterSale_Extend.cs
+29
-0
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+9
-0
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+4
-0
RB_Goods_SpecificationPrice_Extend.cs
...odel/Extend/Product/RB_Goods_SpecificationPrice_Extend.cs
+4
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+681
-5
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+86
-0
RB_Logistics_ExpressRepository.cs
Mall.Repository/BaseSetUp/RB_Logistics_ExpressRepository.cs
+4
-1
RB_Goods_OrderAfterSaleRepository.cs
Mall.Repository/Product/RB_Goods_OrderAfterSaleRepository.cs
+65
-4
RB_Goods_OrderExpressRepository.cs
Mall.Repository/Product/RB_Goods_OrderExpressRepository.cs
+3
-0
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+28
-0
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+170
-41
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+316
-1
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+23
-2
No files found.
Mall.Common/Enum/Goods/AfterSaleSelectStatusEnum.cs
0 → 100644
View file @
a317b618
using
Mall.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Mall.Common.Enum.Goods
{
/// <summary>
/// 订单售后查询状态枚举
/// </summary>
public
enum
AfterSaleSelectStatusEnum
{
/// <summary>
/// 待审核
/// </summary>
[
EnumField
(
"待审核"
)]
Auditing
=
1
,
/// <summary>
/// 待买家处理
/// </summary>
[
EnumField
(
"待买家处理"
)]
DeliveryToBuyer
=
2
,
/// <summary>
/// 待卖家处理
/// </summary>
[
EnumField
(
"待卖家处理"
)]
ReceivedBySeller
=
3
,
/// <summary>
/// 已完成
/// </summary>
[
EnumField
(
"已完成"
)]
RefundedBySeller
=
4
}
}
Mall.Common/Enum/Goods/OrderAfterSaleExportEnum.cs
0 → 100644
View file @
a317b618
using
Mall.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Mall.Common.Enum.Goods
{
/// <summary>
/// 订单售后列表导出选项枚举
/// </summary>
public
enum
OrderAfterSaleExportEnum
{
/// <summary>
/// 所属平台
/// </summary>
[
EnumField
(
"所属平台"
)]
SSPT
=
1
,
/// <summary>
/// 订单号
/// </summary>
[
EnumField
(
"订单号"
)]
DDH
=
2
,
/// <summary>
/// 下单用户
/// </summary>
[
EnumField
(
"下单用户"
)]
XDYH
=
4
,
/// <summary>
/// 商品名
/// </summary>
[
EnumField
(
"商品名"
)]
SPM
=
5
,
/// <summary>
/// 规格
/// </summary>
[
EnumField
(
"规格"
)]
GG
=
6
,
/// <summary>
/// 数量
/// </summary>
[
EnumField
(
"数量"
)]
SL
=
7
,
/// <summary>
/// 货号
/// </summary>
[
EnumField
(
"货号"
)]
HH
=
8
,
/// <summary>
/// 收件人
/// </summary>
[
EnumField
(
"收件人"
)]
SJR
=
10
,
/// <summary>
/// 收件人电话
/// </summary>
[
EnumField
(
"收件人电话"
)]
SJRDH
=
11
,
/// <summary>
/// 收件人地址
/// </summary>
[
EnumField
(
"收件人地址"
)]
SJRDZ
=
12
,
/// <summary>
/// 商家备注
/// </summary>
[
EnumField
(
"商家备注"
)]
ZJE
=
13
,
/// <summary>
/// 售后类型
/// </summary>
[
EnumField
(
"售后类型"
)]
SJFK
=
14
,
/// <summary>
/// 退款金额
/// </summary>
[
EnumField
(
"退款金额"
)]
YF
=
15
,
/// <summary>
/// 申请理由
/// </summary>
[
EnumField
(
"申请理由"
)]
XDSJ
=
16
,
/// <summary>
/// 申请售后时间
/// </summary>
[
EnumField
(
"申请售后时间"
)]
ZFFS
=
17
,
/// <summary>
/// 售后状态
/// </summary>
[
EnumField
(
"售后状态"
)]
DDZT
=
18
,
/// <summary>
/// 用户发货快递
/// </summary>
[
EnumField
(
"用户发货快递"
)]
FKZT
=
19
,
/// <summary>
/// 用户发货快递单号
/// </summary>
[
EnumField
(
"用户发货快递单号"
)]
FKSJ
=
20
}
}
Mall.Common/Enum/Goods/OrderAfterSaleStatusEnum.cs
0 → 100644
View file @
a317b618
using
Mall.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Mall.Common.Enum.Goods
{
/// <summary>
/// 订单售后状态枚举
/// </summary>
public
enum
OrderAfterSaleStatusEnum
{
/// <summary>
/// 待审核
/// </summary>
[
EnumField
(
"待审核"
)]
Auditing
=
1
,
/// <summary>
/// 待买家发货
/// </summary>
[
EnumField
(
"待买家发货"
)]
DeliveryToBuyer
=
2
,
/// <summary>
/// 待卖家收货
/// </summary>
[
EnumField
(
"待卖家收货"
)]
ReceivedBySeller
=
3
,
/// <summary>
/// 待卖家退款
/// </summary>
[
EnumField
(
"待卖家退款"
)]
RefundedBySeller
=
4
,
/// <summary>
/// 已完成
/// </summary>
[
EnumField
(
"已完成"
)]
Completed
=
5
,
/// <summary>
/// 已拒绝
/// </summary>
[
EnumField
(
"已拒绝"
)]
Rejected
=
6
}
}
Mall.Model/Entity/Product/RB_Goods_OrderAfterSale.cs
View file @
a317b618
using
Mall.Common.AOP
;
using
Mall.Common.Enum.Goods
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -101,7 +102,7 @@ namespace Mall.Model.Entity.Product
/// <summary>
/// 售后状态 1待审核 2待买家发货 3已发货待商家处理(待卖家收货) 4待卖家退款 5已完成 6已拒绝
/// </summary>
public
int
?
ReOrderStatus
public
OrderAfterSaleStatusEnum
?
ReOrderStatus
{
get
;
set
;
...
...
@@ -178,5 +179,9 @@ namespace Mall.Model.Entity.Product
get
;
set
;
}
/// <summary>
/// 商家备注
/// </summary>
public
string
ReRemark
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_DistributionCommission_Extend.cs
View file @
a317b618
...
...
@@ -17,5 +17,13 @@ namespace Mall.Model.Extend.Product
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 等级列表
/// </summary>
public
List
<
RB_Goods_DistributionCommission_Extend
>
GradeCommissionList
{
get
;
set
;
}
/// <summary>
/// 规格值列表
/// </summary>
public
object
AttrList
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Extend.cs
View file @
a317b618
...
...
@@ -109,10 +109,20 @@ namespace Mall.Model.Extend.Product
/// 分销佣金列表
/// </summary>
public
List
<
RB_Goods_DistributionCommission_Extend
>
DistributionCommissionList
{
get
;
set
;
}
/// <summary>
/// 分销佣金列表(2号)
/// </summary>
public
List
<
RB_Goods_DistributionCommission_Extend
>
DistributionCommissionTreeList
{
get
;
set
;
}
/// <summary>
/// 会员价格列表
/// </summary>
public
List
<
RB_Goods_MemberPrice_Extend
>
MemberPriceList
{
get
;
set
;
}
/// <summary>
/// 会员价格列表
/// </summary>
public
List
<
RB_Goods_MemberPrice_Extend
>
MemberPriceTreeList
{
get
;
set
;
}
/// <summary>
/// 是否收藏 true/false
...
...
Mall.Model/Extend/Product/RB_Goods_MemberPrice_Extend.cs
View file @
a317b618
...
...
@@ -17,5 +17,13 @@ namespace Mall.Model.Extend.Product
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 等级价格列表
/// </summary>
public
List
<
RB_Goods_MemberPrice_Extend
>
GradePriceList
{
get
;
set
;
}
/// <summary>
/// 规格值列表
/// </summary>
public
object
AttrList
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_OrderAfterSale_Extend.cs
View file @
a317b618
...
...
@@ -13,6 +13,10 @@ namespace Mall.Model.Extend.Product
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_OrderAfterSale_Extend
:
RB_Goods_OrderAfterSale
{
/// <summary>
/// 订单明细ids
/// </summary>
public
string
OrderDetailIds
{
get
;
set
;
}
/// <summary>
/// 订单号
/// </summary>
...
...
@@ -45,5 +49,30 @@ namespace Mall.Model.Extend.Product
/// 结束时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
/// <summary>
/// 订单
/// </summary>
public
RB_Goods_Order_Extend
OrderModel
{
get
;
set
;
}
/// <summary>
/// 订单明细
/// </summary>
public
RB_Goods_OrderDetail_Extend
OrderDetailModel
{
get
;
set
;
}
/// <summary>
/// 导出选项
/// </summary>
public
List
<
int
>
ExcelEnumIds
{
get
;
set
;
}
/// <summary>
/// 客人退货物流名称
/// </summary>
public
string
ReExpressName
{
get
;
set
;
}
/// <summary>
/// 查询状态
/// </summary>
public
int
SelectStatus
{
get
;
set
;
}
/// <summary>
/// 凭证列表
/// </summary>
public
List
<
string
>
VoucherList
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
a317b618
...
...
@@ -53,5 +53,14 @@ namespace Mall.Model.Extend.Product
/// 分销佣金类型 1百分比 2固定值
/// </summary>
public
int
?
SeparateDistributionMoneyType
{
get
;
set
;
}
/// <summary>
/// 规格列表
/// </summary>
public
List
<
string
>
SpecificationList
{
get
;
set
;
}
/// <summary>
/// 是否申请售后
/// </summary>
public
int
?
IsApplyForAfterSale
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
a317b618
...
...
@@ -13,6 +13,10 @@ namespace Mall.Model.Extend.Product
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Order_Extend
:
RB_Goods_Order
{
/// <summary>
/// 订单ids
/// </summary>
public
string
OrderIds
{
get
;
set
;
}
/// <summary>
/// 是否来自购物车 1是 2否
/// </summary>
...
...
Mall.Model/Extend/Product/RB_Goods_SpecificationPrice_Extend.cs
View file @
a317b618
...
...
@@ -17,5 +17,9 @@ namespace Mall.Model.Extend.Product
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 规格值列表
/// </summary>
public
object
AttrList
{
get
;
set
;
}
}
}
Mall.Module.Product/OrderModule.cs
View file @
a317b618
This diff is collapsed.
Click to expand it.
Mall.Module.Product/ProductModule.cs
View file @
a317b618
...
...
@@ -2555,18 +2555,104 @@ namespace Mall.Module.Product
}
}
model
.
SpecificationPriceList
=
goods_SpecificationPriceRepository
.
GetList
(
new
RB_Goods_SpecificationPrice_Extend
()
{
GoodsId
=
goodsId
,
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
});
foreach
(
var
item
in
model
.
SpecificationPriceList
)
{
if
(!
string
.
IsNullOrEmpty
(
item
.
SpecificationSort
))
{
var
ssarr
=
item
.
SpecificationSort
.
Split
(
':'
);
int
Sort
=
Convert
.
ToInt32
(
ssarr
[
0
]);
string
pic_url
=
model
.
SpecificationList
[
0
].
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Sort
).
FirstOrDefault
()?.
ImagePath
;
List
<
object
>
AttrList
=
new
List
<
object
>();
for
(
int
i
=
0
;
i
<
ssarr
.
Length
;
i
++)
{
var
smodel
=
model
.
SpecificationList
[
i
];
var
svmodel
=
smodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Convert
.
ToInt32
(
ssarr
[
i
])).
FirstOrDefault
();
AttrList
.
Add
(
new
{
SName
=
smodel
.
Name
,
SId
=
smodel
.
Id
,
SVId
=
svmodel
.
Sort
,
SVName
=
svmodel
.
Name
});
}
item
.
AttrList
=
AttrList
;
}
}
}
model
.
AreaList
=
new
List
<
RB_Goods_Area_Extend
>();
if
(
model
.
IsAreaBuy
==
1
)
{
model
.
AreaList
=
goods_AreaRepository
.
GetList
(
new
RB_Goods_Area_Extend
()
{
GoodsId
=
goodsId
,
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
});
}
model
.
DistributionCommissionList
=
new
List
<
RB_Goods_DistributionCommission_Extend
>();
model
.
DistributionCommissionTreeList
=
new
List
<
RB_Goods_DistributionCommission_Extend
>();
if
(
model
.
SeparateDistribution
==
1
)
{
model
.
DistributionCommissionList
=
goods_DistributionCommissionRepository
.
GetList
(
new
RB_Goods_DistributionCommission_Extend
()
{
GoodsId
=
goodsId
,
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
});
if
(
model
.
DistributionCommissionList
.
Any
())
{
var
KeyList
=
model
.
DistributionCommissionList
.
Select
(
x
=>
x
.
SpecificationSort
??
""
).
Distinct
().
ToList
();
foreach
(
var
qitem
in
KeyList
)
{
var
treemodel
=
model
.
DistributionCommissionList
.
Where
(
x
=>
(
x
.
SpecificationSort
??
""
)
==
qitem
).
FirstOrDefault
();
treemodel
.
GradeCommissionList
=
model
.
DistributionCommissionList
.
Where
(
x
=>
(
x
.
SpecificationSort
??
""
)
==
qitem
).
ToList
();
if
(
model
.
SeparateDistributionType
==
2
)
{
if
(!
string
.
IsNullOrEmpty
(
qitem
))
{
var
ssarr
=
qitem
.
Split
(
':'
);
int
Sort
=
Convert
.
ToInt32
(
ssarr
[
0
]);
string
pic_url
=
model
.
SpecificationList
[
0
].
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Sort
).
FirstOrDefault
()?.
ImagePath
;
List
<
object
>
AttrList
=
new
List
<
object
>();
for
(
int
i
=
0
;
i
<
ssarr
.
Length
;
i
++)
{
var
smodel
=
model
.
SpecificationList
[
i
];
var
svmodel
=
smodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Convert
.
ToInt32
(
ssarr
[
i
])).
FirstOrDefault
();
AttrList
.
Add
(
new
{
SName
=
smodel
.
Name
,
SId
=
smodel
.
Id
,
SVId
=
svmodel
.
Sort
,
SVName
=
svmodel
.
Name
});
}
treemodel
.
AttrList
=
AttrList
;
}
}
model
.
DistributionCommissionTreeList
.
Add
(
treemodel
);
}
}
}
model
.
MemberPriceList
=
new
List
<
RB_Goods_MemberPrice_Extend
>();
model
.
MemberPriceTreeList
=
new
List
<
RB_Goods_MemberPrice_Extend
>();
if
(
model
.
EnjoyMember
==
1
&&
model
.
SeparateSetMember
==
1
){
model
.
MemberPriceList
=
goods_MemberPriceRepository
.
GetList
(
new
RB_Goods_MemberPrice_Extend
()
{
GoodsId
=
goodsId
,
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
});
if
(
model
.
MemberPriceList
.
Any
())
{
var
KeyList
=
model
.
MemberPriceList
.
Select
(
x
=>
x
.
SpecificationSort
??
""
).
Distinct
().
ToList
();
foreach
(
var
qitem
in
KeyList
)
{
var
treemodel
=
model
.
MemberPriceList
.
Where
(
x
=>
(
x
.
SpecificationSort
??
""
)
==
qitem
).
FirstOrDefault
();
treemodel
.
GradePriceList
=
model
.
MemberPriceList
.
Where
(
x
=>
(
x
.
SpecificationSort
??
""
)
==
qitem
).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
qitem
))
{
var
ssarr
=
qitem
.
Split
(
':'
);
int
Sort
=
Convert
.
ToInt32
(
ssarr
[
0
]);
string
pic_url
=
model
.
SpecificationList
[
0
].
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Sort
).
FirstOrDefault
()?.
ImagePath
;
List
<
object
>
AttrList
=
new
List
<
object
>();
for
(
int
i
=
0
;
i
<
ssarr
.
Length
;
i
++)
{
var
smodel
=
model
.
SpecificationList
[
i
];
var
svmodel
=
smodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Convert
.
ToInt32
(
ssarr
[
i
])).
FirstOrDefault
();
AttrList
.
Add
(
new
{
SName
=
smodel
.
Name
,
SId
=
smodel
.
Id
,
SVId
=
svmodel
.
Sort
,
SVName
=
svmodel
.
Name
});
}
treemodel
.
AttrList
=
AttrList
;
}
model
.
MemberPriceTreeList
.
Add
(
treemodel
);
}
}
}
model
.
CarouselImageList
=
new
List
<
RB_ImageCommonModel
>();
if
(!
string
.
IsNullOrEmpty
(
model
.
CarouselImage
)
&&
model
.
CarouselImage
!=
"[]"
)
...
...
Mall.Repository/BaseSetUp/RB_Logistics_ExpressRepository.cs
View file @
a317b618
...
...
@@ -22,7 +22,7 @@ namespace Mall.Repository.BaseSetUp
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Logistics_Express
>
GetLogisticsExpressList
(
RB_Logistics_Express
query
)
public
List
<
RB_Logistics_Express
>
GetLogisticsExpressList
(
RB_Logistics_Express
query
,
string
ExpressIds
=
""
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE
{
nameof
(
RB_Logistics_Express
.
Status
)}
=0 "
);
...
...
@@ -44,6 +44,9 @@ namespace Mall.Repository.BaseSetUp
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Logistics_Express
.
Name
)}
like '%
{
query
.
Name
}
%'"
);
}
if
(!
string
.
IsNullOrEmpty
(
ExpressIds
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Logistics_Express
.
ID
)}
in(
{
ExpressIds
}
)"
);
}
}
return
Get
<
RB_Logistics_Express
>(
builder
.
ToString
()).
ToList
();
...
...
Mall.Repository/Product/RB_Goods_OrderAfterSaleRepository.cs
View file @
a317b618
...
...
@@ -23,7 +23,7 @@ namespace Mall.Repository.Product
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderAfterSale_Extend
>
GetERPPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_OrderAfterSale_Extend
dmodel
)
{
string
where
=
$" 1=1 and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
Status
)}
=0"
;
string
where
=
$"
where
1=1 and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
...
...
@@ -48,6 +48,9 @@ namespace Mall.Repository.Product
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderNo
))
{
where
+=
$" and o.
{
nameof
(
RB_Goods_Order
.
OrderNo
)}
like '%
{
dmodel
.
OrderNo
}
%'"
;
}
if
(
dmodel
.
OrderSource
>
0
)
{
where
+=
$" and o.
{
nameof
(
RB_Goods_Order
.
OrderSource
)}
=
{
dmodel
.
OrderSource
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Consignee
))
{
where
+=
$" and o.
{
nameof
(
RB_Goods_Order
.
Consignee
)}
like '%
{
dmodel
.
Consignee
}
%'"
;
...
...
@@ -65,12 +68,27 @@ namespace Mall.Repository.Product
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
EndTime
))
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
CreateDate
)}
<='
{
dmodel
.
EndTime
}
23:59:59'"
;
}
if
(
dmodel
.
SelectStatus
==
1
)
//待审核
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderStatus
)}
=1"
;
}
else
if
(
dmodel
.
SelectStatus
==
2
)
//待买家处理
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderStatus
)}
=2"
;
}
else
if
(
dmodel
.
SelectStatus
==
3
)
{
//待卖家处理
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderStatus
)}
in(3,4)"
;
}
else
if
(
dmodel
.
SelectStatus
==
4
)
//已完成
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderStatus
)}
in(5,6)"
;
}
string
sql
=
$@"SELECT oas.*,mu.Name as UserName FROM rb_goods_orderaftersale oas
INNER JOIN rb_goods_order o on oas.OrderId=o.OrderId
INNER JOIN rb_goods_orderdetail od on od.Id=oas.OrderDetialId
INNER JOIN rb_member_user mu on mu.Id=oas.UserId
{
where
}
order by Id desc"
;
{
where
}
order by
oas.ReOrder
Id desc"
;
return
GetPage
<
RB_Goods_OrderAfterSale_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
...
...
@@ -85,7 +103,7 @@ INNER JOIN rb_member_user mu on mu.Id=oas.UserId
/// <returns></returns>
public
List
<
RB_Goods_OrderAfterSale_Extend
>
GetAppletPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_OrderAfterSale_Extend
dmodel
)
{
string
where
=
$" 1=1 and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
Status
)}
=0"
;
string
where
=
$"
where
1=1 and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
...
...
@@ -103,14 +121,57 @@ INNER JOIN rb_member_user mu on mu.Id=oas.UserId
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
OrderId
)}
=
{
dmodel
.
OrderId
}
"
;
}
if
(
dmodel
.
ReOrderStatus
>
0
)
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderStatus
)}
=
{(
int
)
dmodel
.
ReOrderStatus
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
ReOrderNo
))
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderNo
)}
like '%
{
dmodel
.
ReOrderNo
}
%'"
;
}
string
sql
=
$@"SELECT oas.* FROM rb_goods_orderaftersale oas
{
where
}
order by Id desc"
;
string
sql
=
$@"SELECT oas.* FROM rb_goods_orderaftersale oas
{
where
}
order by
ReOrder
Id desc"
;
return
GetPage
<
RB_Goods_OrderAfterSale_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_OrderAfterSale_Extend
>
GetList
(
RB_Goods_OrderAfterSale_Extend
dmodel
)
{
string
where
=
$" where 1=1 and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(
dmodel
.
OrderId
>
0
)
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
OrderId
)}
=
{
dmodel
.
OrderId
}
"
;
}
if
(
dmodel
.
OrderDetialId
>
0
)
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
OrderDetialId
)}
=
{
dmodel
.
OrderDetialId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
ReOrderNo
))
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
ReOrderNo
)}
like '%
{
dmodel
.
ReOrderNo
}
%'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderDetailIds
))
{
where
+=
$" and oas.
{
nameof
(
RB_Goods_OrderAfterSale
.
OrderDetialId
)}
in(
{
dmodel
.
OrderDetailIds
}
)"
;
}
string
sql
=
$@"SELECT oas.* FROM rb_goods_orderaftersale oas
{
where
}
order by oas.ReOrderId desc"
;
return
Get
<
RB_Goods_OrderAfterSale_Extend
>(
sql
).
ToList
();
}
}
}
Mall.Repository/Product/RB_Goods_OrderExpressRepository.cs
View file @
a317b618
...
...
@@ -45,6 +45,9 @@ namespace Mall.Repository.Product
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderExpressIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderExpress
.
Id
)}
in(
{
dmodel
.
OrderExpressIds
}
)"
;
}
if
(
dmodel
.
AfterSaleOrderId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_OrderExpress
.
AfterSaleOrderId
)}
=
{
dmodel
.
AfterSaleOrderId
}
"
;
}
string
sql
=
$@"SELECT * FROM RB_Goods_OrderExpress where
{
where
}
order by Id asc"
;
return
Get
<
RB_Goods_OrderExpress_Extend
>(
sql
).
ToList
();
...
...
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
a317b618
...
...
@@ -111,6 +111,34 @@ where {where} group by o.OrderId order by o.CreateDate desc";
return
GetPage
<
RB_Goods_Order_Extend
>(
pageIndex
,
pageSize
,
out
count
,
sql
).
ToList
();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Order_Extend
>
GetOrderList
(
RB_Goods_Order_Extend
dmodel
)
{
string
where
=
$" 1=1 and o.
{
nameof
(
RB_Goods_Order
.
Status
)}
=0"
;
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
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderIds
))
{
where
+=
$@" and o.
{
nameof
(
RB_Goods_Order
.
OrderId
)}
in(
{
dmodel
.
OrderIds
}
)"
;
}
string
sql
=
$@"SELECT o.* FROM rb_goods_order o
where
{
where
}
group by o.OrderId asc"
;
return
Get
<
RB_Goods_Order_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 会员购买
/// </summary>
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
a317b618
...
...
@@ -189,7 +189,7 @@ namespace Mall.WebApi.Controllers.MallBase
y
.
OrderType
,
OrderTypeName
=
y
.
OrderType
.
GetEnumName
(),
y
.
GoodsName
,
y
.
Specification
,
SpecificationList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
y
.
Specification
)
,
y
.
ProductCode
,
y
.
Final_Price
,
y
.
Number
...
...
@@ -219,44 +219,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
return
orderModule
.
GetAppletMyOrderInfo
(
OrderId
,
userInfo
.
UserId
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
}
/// <summary>
/// 获取我的订单商品售后初始信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppletMyOrderAfterSaleInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderDetailId
=
parms
.
GetInt
(
"OrderDetailId"
,
0
);
if
(
OrderDetailId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
return
orderModule
.
GetAppletMyOrderAfterSaleInfo
(
OrderDetailId
,
userInfo
.
UserId
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
}
/// <summary>
/// 申请售后
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetAppletMyOrderAfterSale
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderDetailId
=
parms
.
GetInt
(
"OrderDetailId"
,
0
);
if
(
OrderDetailId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
return
ApiResult
.
Success
();
}
}
/// <summary>
/// 获取我的订单快递信息
...
...
@@ -383,9 +346,11 @@ namespace Mall.WebApi.Controllers.MallBase
if
((
item
.
Number
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
}
if
(
string
.
IsNullOrEmpty
(
item
.
Specification
))
{
return
ApiResult
.
ParamIsNull
(
"请传递规格名"
);
if
(
item
.
SpecificationList
==
null
||
!
item
.
SpecificationList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递规格名SpecificationList"
);
}
item
.
Specification
=
JsonConvert
.
SerializeObject
(
item
.
SpecificationList
);
}
demodel
.
BuyerMessage
??=
""
;
//买家留言
...
...
@@ -437,6 +402,170 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取我的订单商品售后申请页面 订单信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppletMyOrderAfterSaleInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderDetailId
=
parms
.
GetInt
(
"OrderDetailId"
,
0
);
if
(
OrderDetailId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
return
orderModule
.
GetAppletMyOrderAfterSaleInfo
(
OrderDetailId
,
userInfo
.
UserId
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
}
/// <summary>
/// 申请售后
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetAppletMyOrderAfterSale
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Goods_OrderAfterSale_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_OrderAfterSale_Extend
>(
req
.
msg
.
ToString
());
if
((
demodel
.
OrderDetialId
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递订单明细id"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Remark
))
{
return
ApiResult
.
ParamIsNull
(
"请输入退换货原因"
);
}
if
(
demodel
.
Type
==
1
)
{
if
((
demodel
.
Refund
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请输入退款金额"
);
}
}
if
((
demodel
.
ReNumber
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"数量不正确"
);
}
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
demodel
.
Status
=
0
;
demodel
.
ReOrderStatus
=
Common
.
Enum
.
Goods
.
OrderAfterSaleStatusEnum
.
Auditing
;
if
(
demodel
.
VoucherList
!=
null
&&
demodel
.
VoucherList
.
Any
()){
demodel
.
Voucher
=
JsonConvert
.
SerializeObject
(
demodel
.
VoucherList
);
}
bool
flag
=
orderModule
.
SetAppletMyOrderAfterSale
(
demodel
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取买家发货页面详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppletOrderBuyerToDeliverInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
ReOrderId
=
parms
.
GetInt
(
"ReOrderId"
,
0
);
if
(
ReOrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
return
orderModule
.
GetAppletOrderBuyerToDeliverInfo
(
ReOrderId
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
}
/// <summary>
/// 用户发货
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetAppletOrderSendGoods
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
ReOrderId
=
parms
.
GetInt
(
"ReOrderId"
,
0
);
int
ExpressId
=
parms
.
GetInt
(
"ExpressId"
,
0
);
string
ExpressNumber
=
parms
.
GetStringValue
(
"ExpressNumber"
);
if
(
ReOrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
if
(
ExpressId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请选择快递"
);
}
if
(
string
.
IsNullOrEmpty
(
ExpressNumber
))
{
return
ApiResult
.
ParamIsNull
(
"请输入快递单号"
);
}
bool
flag
=
orderModule
.
SetAppletOrderSendGoods
(
ReOrderId
,
ExpressId
,
ExpressNumber
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取售后订单详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppletOrderAfterSaleInfo
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
ReOrderId
=
parms
.
GetInt
(
"ReOrderId"
,
0
);
if
(
ReOrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
return
orderModule
.
GetAppletOrderAfterSaleInfo
(
ReOrderId
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
}
/// <summary>
/// 售后订单分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppletOrderAfterPageList
()
{
var
parms
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
RB_Goods_OrderAfterSale_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_OrderAfterSale_Extend
>(
parms
.
msg
.
ToString
());
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
var
list
=
orderModule
.
GetAppletOrderAfterPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
ReOrderId
,
x
.
ReOrderNo
,
OrderDetailModel
=
new
{
x
.
OrderDetailModel
.
Id
,
x
.
OrderDetailModel
.
GoodsName
,
x
.
OrderDetailModel
.
GoodsId
,
x
.
OrderDetailModel
.
CoverImagePath
,
SpecificationList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
x
.
OrderDetailModel
.
Specification
),
x
.
OrderDetailModel
.
Final_Price
},
x
.
Type
,
x
.
ReNumber
,
x
.
Remark
,
x
.
Income
,
x
.
Refund
,
x
.
RefundActual
,
x
.
ReOrderStatus
,
ReOrderStatusName
=
x
.
ReOrderStatus
.
GetEnumName
(),
x
.
TenantId
,
x
.
MallBaseId
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
a317b618
This diff is collapsed.
Click to expand it.
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
a317b618
...
...
@@ -1304,7 +1304,8 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
GoodsWeight
,
x
.
InventoryNum
,
x
.
SellingPrice
,
x
.
SpecificationSort
x
.
SpecificationSort
,
x
.
AttrList
}),
AreaList
=
model
.
AreaList
.
Select
(
x
=>
new
{
x
.
Id
,
...
...
@@ -1320,12 +1321,32 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
ThreeCommission
,
x
.
TwoCommission
}),
MemberPriceList
=
model
.
MemberPriceList
.
Select
(
x
=>
new
{
DistributionCommissionTreeList
=
model
.
DistributionCommissionTreeList
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
SpecificationSort
,
x
.
AttrList
,
GradeCommissionList
=
x
.
GradeCommissionList
.
Select
(
y
=>
new
{
y
.
DistributorGrade
,
y
.
OneCommission
,
y
.
ThreeCommission
,
y
.
TwoCommission
})
}),
MemberPriceList
=
model
.
MemberPriceList
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
MemberGrade
,
x
.
MemberPrice
,
x
.
SpecificationSort
}),
MemberPriceTreeList
=
model
.
MemberPriceTreeList
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
SpecificationSort
,
x
.
AttrList
,
GradePriceList
=
x
.
GradePriceList
.
Select
(
y
=>
new
{
y
.
MemberGrade
,
y
.
MemberPrice
})
}),
model
.
CarouselImageList
,
model
.
ServiceList
});
...
...
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