Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
3c9cb86b
Commit
3c9cb86b
authored
Oct 27, 2021
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单 详情 列表新增字段 couponInfos 用于一单多券需求
Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent
6f25594b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletions
+21
-1
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+11
-0
order-application-service/src/main/java/cn/freemud/entities/vo/QueryOrderResponseVo.java
+10
-1
No files found.
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
3c9cb86b
...
...
@@ -1454,7 +1454,9 @@ public class OrderAdapter {
//积分抵扣金额
Long
customerScoreAmount
=
0L
;
String
customerScorePrompt
=
null
;
List
<
CouponInfoVo
>
couponInfos
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
ordersBean
.
getAccountList
()))
{
// fisherman 组装一单多券 使用的券信息
for
(
AccountBeanV1
accountBean
:
ordersBean
.
getAccountList
())
{
if
(
accountBean
.
getPrice
()
<
0
&&
!
OldOrderAccountType
.
MONTH_CARD_TOTAL_DISCOUNT
.
getCode
().
equals
(
accountBean
.
getType
()))
{
discountTotalAmount
=
discountTotalAmount
+
(
0
-
accountBean
.
getPrice
());
...
...
@@ -1485,6 +1487,7 @@ public class OrderAdapter {
couponInfoVo
.
setCouponCode
(
accountBean
.
getAccountId
());
couponInfoVo
.
setCouponName
(
accountBean
.
getName
());
couponInfoVo
.
setCouponAmount
(
accountBean
.
getPrice
()
<
0
?
0
-
accountBean
.
getPrice
()
:
accountBean
.
getPrice
());
// fisherman 后续已维护到 couponinfos ,请停止维护 该字段
responseVo
.
setCouponInfo
(
couponInfoVo
);
couponAmount
=
accountBean
.
getPrice
()
<
0
?
0
-
accountBean
.
getPrice
()
:
accountBean
.
getPrice
();
}
...
...
@@ -1501,8 +1504,16 @@ public class OrderAdapter {
if
(
OldOrderAccountType
.
FREIGHT_COUPON
.
getCode
().
equals
(
accountBean
.
getType
()))
{
responseVo
.
setFreightCouponName
(
accountBean
.
getName
());
}
if
(
OrderAccountType
.
verificationCoupon
.
contains
(
accountBean
.
getType
()))
{
CouponInfoVo
couponInfoVo
=
new
CouponInfoVo
();
couponInfoVo
.
setCouponCode
(
accountBean
.
getAccountId
());
couponInfoVo
.
setCouponName
(
accountBean
.
getName
());
couponInfoVo
.
setCouponAmount
(
Math
.
abs
(
accountBean
.
getPrice
()));
couponInfos
.
add
(
couponInfoVo
);
}
}
}
responseVo
.
setCouponInfos
(
couponInfos
);
responseVo
.
setDeliveryAmount
(
deliveryAmount
);
responseVo
.
setOriginalDeliveryAmount
(
originalDeliveryAmount
);
responseVo
.
setPackageAmount
(
packageAmount
);
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/QueryOrderResponseVo.java
View file @
3c9cb86b
...
...
@@ -16,7 +16,6 @@ import cn.freemud.entities.dto.PromotionMessageDto;
import
cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseDto
;
import
cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseDtoNew
;
import
cn.freemud.entities.dto.promotion.QueryHistoryGroupVO
;
import
cn.freemud.entities.dto.promotion.QuerySpellGroupVo
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.freemud.application.sdk.api.ordercenter.response.orderInfo.AfterSalesOrderResp
;
...
...
@@ -357,6 +356,8 @@ public class QueryOrderResponseVo {
/**
* 优惠券信息
* 后续优惠券信息 以维护到 couponInfos 请停止使用该字段 20211026
* 记得和前端对接下 小程序版本 是否支持 couponInfos
*/
private
CouponInfoVo
couponInfo
;
...
...
@@ -665,4 +666,12 @@ public class QueryOrderResponseVo {
//是否已开票,true已开票,默认false未开票
private
Boolean
needInvoice
;
/**
* 可使用多张优惠券, 使用该字段展示所有使用的优惠券信息
* 包括 :
* cn.freemud.enums.OrderAccountType#verificationCoupon
* 后续 需要移除 该类里面的 couponinfo字段, 20211026
*/
private
List
<
CouponInfoVo
>
couponInfos
=
new
ArrayList
<>();
}
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