Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
Details
Activity
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
pseer
gxpt_ht
Commits
8d57a696
Commit
8d57a696
authored
Mar 12, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单管理显示
parent
f3b16631
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
33 deletions
+49
-33
TableDataInfoVo.java
...common/src/main/java/share/common/vo/TableDataInfoVo.java
+18
-21
SOrderVo.java
...system/src/main/java/share/system/domain/vo/SOrderVo.java
+12
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+19
-11
No files found.
share-common/src/main/java/share/common/vo/TableDataInfoVo.java
View file @
8d57a696
...
@@ -18,17 +18,13 @@ public class TableDataInfoVo extends TableDataInfo {
...
@@ -18,17 +18,13 @@ public class TableDataInfoVo extends TableDataInfo {
/**
/**
* 优惠卷售卖总金额
* 优惠卷售卖总金额
*/
*/
private
BigDecimal
coupon
Amount
;
private
BigDecimal
totalSales
Amount
;
/**
//申请退款总金额
* 申请退款总金额
private
BigDecimal
totalRefundAmount
;
*/
private
BigDecimal
refundAmount
;
/**
//实际退款总金额
* 实际退款总金额
private
BigDecimal
totalRealRefundAmount
;
*/
private
BigDecimal
realRefundAmount
;
public
BigDecimal
getTotalAmount
()
{
public
BigDecimal
getTotalAmount
()
{
return
totalAmount
;
return
totalAmount
;
...
@@ -46,27 +42,28 @@ public class TableDataInfoVo extends TableDataInfo {
...
@@ -46,27 +42,28 @@ public class TableDataInfoVo extends TableDataInfo {
this
.
amount
=
amount
;
this
.
amount
=
amount
;
}
}
public
BigDecimal
get
Coupon
Amount
()
{
public
BigDecimal
get
TotalSales
Amount
()
{
return
coupon
Amount
;
return
totalSales
Amount
;
}
}
public
void
set
CouponAmount
(
BigDecimal
coupon
Amount
)
{
public
void
set
TotalSalesAmount
(
BigDecimal
totalSales
Amount
)
{
this
.
couponAmount
=
coupon
Amount
;
this
.
totalSalesAmount
=
totalSales
Amount
;
}
}
public
BigDecimal
getRefundAmount
()
{
public
BigDecimal
get
Total
RefundAmount
()
{
return
r
efundAmount
;
return
totalR
efundAmount
;
}
}
public
void
set
RefundAmount
(
BigDecimal
r
efundAmount
)
{
public
void
set
TotalRefundAmount
(
BigDecimal
totalR
efundAmount
)
{
this
.
refundAmount
=
r
efundAmount
;
this
.
totalRefundAmount
=
totalR
efundAmount
;
}
}
public
BigDecimal
getRealRefundAmount
()
{
public
BigDecimal
get
Total
RealRefundAmount
()
{
return
r
ealRefundAmount
;
return
totalR
ealRefundAmount
;
}
}
public
void
set
RealRefundAmount
(
BigDecimal
r
ealRefundAmount
)
{
public
void
set
TotalRealRefundAmount
(
BigDecimal
totalR
ealRefundAmount
)
{
this
.
realRefundAmount
=
r
ealRefundAmount
;
this
.
totalRealRefundAmount
=
totalR
ealRefundAmount
;
}
}
}
}
share-system/src/main/java/share/system/domain/vo/SOrderVo.java
View file @
8d57a696
...
@@ -9,7 +9,6 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -9,7 +9,6 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
share.common.annotation.Excel
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -214,4 +213,16 @@ public class SOrderVo
...
@@ -214,4 +213,16 @@ public class SOrderVo
@ApiModelProperty
(
name
=
"套餐名称"
)
@ApiModelProperty
(
name
=
"套餐名称"
)
private
String
packName
;
private
String
packName
;
@ApiModelProperty
(
name
=
"优惠券id"
)
private
String
couponSkuId
;
@ApiModelProperty
(
name
=
"优惠卷购买金额"
)
private
BigDecimal
couponPayPrice
;
@ApiModelProperty
(
name
=
"第三方平台类型(1:自营,2:美团,3: 抖音)"
)
private
Integer
platformType
;
}
}
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
8d57a696
...
@@ -121,6 +121,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -121,6 +121,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Autowired
@Autowired
private
RedisUtil
redisUtils
;
private
RedisUtil
redisUtils
;
@Autowired
private
ISCouponService
sCouponService
;
private
final
static
Long
FIVE
=
5
l
;
private
final
static
Long
FIVE
=
5
l
;
...
@@ -308,30 +311,35 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -308,30 +311,35 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Override
@Override
public
TableDataInfoVo
pageList
(
SOrder
sOrder
)
{
public
TableDataInfoVo
pageList
(
SOrder
sOrder
)
{
List
<
SOrder
>
sOrders
=
selectSOrderList
(
sOrder
);
List
<
SOrder
>
sOrders
=
selectSOrderList
(
sOrder
);
List
<
SOrderVo
>
sOrderVos
=
convertDosToVos
(
sOrders
);
List
<
SOrderVo
>
sOrderVos
=
convertDosToVos
(
sOrders
);
BigDecimal
totalAmount
=
new
BigDecimal
(
"0.00"
);
BigDecimal
totalAmount
=
new
BigDecimal
(
"0.00"
);
BigDecimal
amount
=
new
BigDecimal
(
"0.00"
);
BigDecimal
amount
=
new
BigDecimal
(
"0.00"
);
//优惠卷售卖总金额
//优惠卷售卖总金额
BigDecimal
couponAmount
=
new
BigDecimal
(
"0.00"
)
;
final
BigDecimal
[]
totalSalesAmount
=
{
new
BigDecimal
(
"0.00"
)}
;
//申请退款总金额
//申请退款总金额
BigDecimal
r
efundAmount
=
new
BigDecimal
(
"0.00"
);
BigDecimal
totalR
efundAmount
=
new
BigDecimal
(
"0.00"
);
//实际退款总金额
//实际退款总金额
BigDecimal
r
ealRefundAmount
=
new
BigDecimal
(
"0.00"
);
BigDecimal
totalR
ealRefundAmount
=
new
BigDecimal
(
"0.00"
);
List
<
SConsumerCoupon
>
sConsumerCoupons
=
consumerCouponService
.
queryList
();
List
<
SConsumerCoupon
>
sConsumerCoupons
=
consumerCouponService
.
queryList
();
if
(
CollectionUtils
.
isNotEmpty
(
sOrderVos
))
{
if
(
CollectionUtils
.
isNotEmpty
(
sOrderVos
))
{
for
(
SOrderVo
item
:
sOrderVos
)
{
for
(
SOrderVo
item
:
sOrderVos
)
{
totalAmount
=
totalAmount
.
add
(
item
.
getTotalPrice
());
totalAmount
=
totalAmount
.
add
(
item
.
getTotalPrice
());
amount
=
amount
.
add
(
item
.
getPayPrice
());
amount
=
amount
.
add
(
item
.
getPayPrice
());
sConsumerCoupons
.
stream
().
filter
(
sConsumerCoupon
->
sConsumerCoupon
.
getId
().
equals
(
item
.
getCouponId
())).
findFirst
().
ifPresent
(
sConsumerCoupon
->
{
sConsumerCoupons
.
stream
().
filter
(
sConsumerCoupon
->
sConsumerCoupon
.
getId
().
equals
(
item
.
getCouponId
())).
findFirst
().
ifPresent
(
sConsumerCoupon
->
{
couponAmount
.
add
(
ObjectUtil
.
isEmpty
(
sConsumerCoupon
.
getCouponPayPrice
())
?
new
BigDecimal
(
"0.00"
)
:
sConsumerCoupon
.
getCouponPayPrice
());
item
.
setCouponPayPrice
(
sConsumerCoupon
.
getCouponPayPrice
());
item
.
setPlatformType
(
sConsumerCoupon
.
getPlatformType
());
if
(
sConsumerCoupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
MEITUAN
.
getCode
()))
{
item
.
setCouponSkuId
(
String
.
valueOf
(
sConsumerCoupon
.
getDealgroupId
()));
}
else
if
(
sConsumerCoupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
TIKTOK
.
getCode
()))
{
item
.
setCouponSkuId
(
String
.
valueOf
(
sConsumerCoupon
.
getTiktokSkuId
()));
}
totalSalesAmount
[
0
]
=
totalSalesAmount
[
0
].
add
(
ObjectUtil
.
isEmpty
(
sConsumerCoupon
.
getCouponPayPrice
())
?
new
BigDecimal
(
"0.00"
)
:
sConsumerCoupon
.
getCouponPayPrice
());
});
});
if
(
item
.
getPayStatus
().
equals
(
YesNoEnum
.
yes
.
getIndex
())
&&
item
.
getRefundStatus
().
equals
(
RefundStatusEnum
.
REFUNDED
.
getCode
()))
{
if
(
item
.
getPayStatus
().
equals
(
YesNoEnum
.
yes
.
getIndex
())
&&
item
.
getRefundStatus
().
equals
(
RefundStatusEnum
.
REFUNDED
.
getCode
()))
{
r
efundAmount
.
add
(
ObjectUtil
.
isEmpty
(
item
.
getPayPrice
())
?
new
BigDecimal
(
"0.00"
)
:
item
.
getPayPrice
());
totalRefundAmount
=
totalR
efundAmount
.
add
(
ObjectUtil
.
isEmpty
(
item
.
getPayPrice
())
?
new
BigDecimal
(
"0.00"
)
:
item
.
getPayPrice
());
r
ealRefundAmount
.
add
(
ObjectUtil
.
isEmpty
(
item
.
getRefundPrice
())
?
new
BigDecimal
(
"0.00"
)
:
item
.
getRefundPrice
());
totalRealRefundAmount
=
totalR
ealRefundAmount
.
add
(
ObjectUtil
.
isEmpty
(
item
.
getRefundPrice
())
?
new
BigDecimal
(
"0.00"
)
:
item
.
getRefundPrice
());
}
}
}
}
}
}
sOrderVos
.
sort
(
Comparator
.
comparing
(
SOrderVo:
:
getCreateTime
).
reversed
());
sOrderVos
.
sort
(
Comparator
.
comparing
(
SOrderVo:
:
getCreateTime
).
reversed
());
...
@@ -348,9 +356,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -348,9 +356,9 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
tableDataInfo
.
setMsg
(
"查询成功"
);
tableDataInfo
.
setMsg
(
"查询成功"
);
tableDataInfo
.
setTotalAmount
(
totalAmount
);
tableDataInfo
.
setTotalAmount
(
totalAmount
);
tableDataInfo
.
setAmount
(
amount
);
tableDataInfo
.
setAmount
(
amount
);
tableDataInfo
.
set
CouponAmount
(
couponAmount
);
tableDataInfo
.
set
TotalSalesAmount
(
totalSalesAmount
[
0
]
);
tableDataInfo
.
set
RefundAmount
(
r
efundAmount
);
tableDataInfo
.
set
TotalRefundAmount
(
totalR
efundAmount
);
tableDataInfo
.
set
RealRefundAmount
(
r
ealRefundAmount
);
tableDataInfo
.
set
TotalRealRefundAmount
(
totalR
ealRefundAmount
);
return
tableDataInfo
;
return
tableDataInfo
;
}
}
...
...
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