Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
cb328043
Commit
cb328043
authored
Sep 23, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改优惠券返回bug
parent
7a993b17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
29 deletions
+52
-29
BaseOrder.java
...c/main/java/com/xxfc/platform/order/entity/BaseOrder.java
+27
-27
OrderCancelBiz.java
...ava/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
+25
-2
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/BaseOrder.java
View file @
cb328043
...
@@ -252,31 +252,31 @@ public class BaseOrder implements Serializable {
...
@@ -252,31 +252,31 @@ public class BaseOrder implements Serializable {
@Column
(
name
=
"member_level"
)
@Column
(
name
=
"member_level"
)
private
Integer
memberLevel
;
private
Integer
memberLevel
;
//
/**
/**
//
* 违约金
* 违约金
//
*/
*/
//
@ApiModelProperty(value = "违约金")
@ApiModelProperty
(
value
=
"违约金"
)
//
@Column(name = "violate_amount")
@Column
(
name
=
"violate_amount"
)
//
BigDecimal ViolateAmount;
BigDecimal
ViolateAmount
;
//
//
/**
/**
//
* 赔偿金
* 赔偿金
//
*/
*/
//
@ApiModelProperty(value = "赔偿金")
@ApiModelProperty
(
value
=
"赔偿金"
)
//
@Column(name = "damages_amount")
@Column
(
name
=
"damages_amount"
)
//
BigDecimal damagesAmount;
BigDecimal
damagesAmount
;
//
//
/**
/**
//
* 额外费用
* 额外费用
//
*/
*/
//
@ApiModelProperty(value = "额外费用")
@ApiModelProperty
(
value
=
"额外费用"
)
//
@Column(name = "extra_amount")
@Column
(
name
=
"extra_amount"
)
//
BigDecimal extraAmount;
BigDecimal
extraAmount
;
//
//
/**
/**
//
* 返还的优惠券
* 返还的优惠券
//
*/
*/
//
@ApiModelProperty(value = "返回的优惠券")
@ApiModelProperty
(
value
=
"返回的优惠券"
)
//
@Column(name = "back_coupon")
@Column
(
name
=
"back_coupon"
)
//
String backCoupon;
String
backCoupon
;
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
View file @
cb328043
package
com
.
xxfc
.
platform
.
order
.
biz
.
inner
;
package
com
.
xxfc
.
platform
.
order
.
biz
.
inner
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
...
@@ -191,6 +193,10 @@ public class OrderCancelBiz {
...
@@ -191,6 +193,10 @@ public class OrderCancelBiz {
}
}
}
}
//设置订单数据
baseOrder
.
setViolateAmount
(
csv
.
getViolateAmount
());
baseOrder
.
setExtraAmount
(
inProgressVO
.
getExtraAmount
());
csv
.
initParamJson
();
csv
.
initParamJson
();
//orderTemplateBiz.handleCostDetailExtend(csv);
//orderTemplateBiz.handleCostDetailExtend(csv);
orvd
.
handelCostDetailExtend
(
csv
);
orvd
.
handelCostDetailExtend
(
csv
);
...
@@ -208,6 +214,11 @@ public class OrderCancelBiz {
...
@@ -208,6 +214,11 @@ public class OrderCancelBiz {
//退款流程
//退款流程
orderAccountBiz
.
rentRefundProcessCancel
(
baseOrder
,
orderItem
.
getRealAmount
(),
timeLag
,
APP_ORDER
+
"_"
+
RENT_REFUND
,
orvd
.
getDeposit
(),
freeDayAmount
,
oad
,
topAmount
);
orderAccountBiz
.
rentRefundProcessCancel
(
baseOrder
,
orderItem
.
getRealAmount
(),
timeLag
,
APP_ORDER
+
"_"
+
RENT_REFUND
,
orvd
.
getDeposit
(),
freeDayAmount
,
oad
,
topAmount
);
//设置订单数据
//baseOrder.setDamagesAmount(csv.getDamagesAmount());
//baseOrder.setExtraAmount(inProgressVO.getExtraAmount());
baseOrder
.
setBackCoupon
(
baseOrder
.
getCouponTickerNos
());
//如果有扣款项,则生成额外的费用明细
//如果有扣款项,则生成额外的费用明细
if
(
oad
.
getDeductions
().
size
()
>
0
)
{
if
(
oad
.
getDeductions
().
size
()
>
0
)
{
for
(
OrderAccountDeduction
deduction
:
oad
.
getDeductions
())
{
for
(
OrderAccountDeduction
deduction
:
oad
.
getDeductions
())
{
...
@@ -217,10 +228,14 @@ public class OrderCancelBiz {
...
@@ -217,10 +228,14 @@ public class OrderCancelBiz {
setViolateDesc
(
deduction
.
getName
());
setViolateDesc
(
deduction
.
getName
());
}};
}};
//设置订单数据
baseOrder
.
setViolateAmount
(
cnsv
.
getViolateAmount
());
cnsv
.
initParamJson
();
cnsv
.
initParamJson
();
//orderTemplateBiz.handleCostDetailExtend(cnsv);
//orderTemplateBiz.handleCostDetailExtend(cnsv);
orvd
.
handelCostDetailExtend
(
cnsv
);
orvd
.
handelCostDetailExtend
(
cnsv
);
orderRentVehicleBiz
.
updateSelectiveByIdRe
(
orvd
);
orderRentVehicleBiz
.
updateSelectiveByIdRe
(
orvd
);
break
;
}
}
}
}
}
}
...
@@ -273,7 +288,9 @@ public class OrderCancelBiz {
...
@@ -273,7 +288,9 @@ public class OrderCancelBiz {
setViolateDesc
(
deduction
.
getName
());
setViolateDesc
(
deduction
.
getName
());
}};
}};
cnsv
.
initParamJson
();
//设置订单数据
baseOrder
.
setViolateAmount
(
cnsv
.
getViolateAmount
());
//orderTemplateBiz.handleCostDetailExtend(cnsv);
//orderTemplateBiz.handleCostDetailExtend(cnsv);
otd
.
handelCostDetailExtend
(
cnsv
);
otd
.
handelCostDetailExtend
(
cnsv
);
orderTourDetailBiz
.
updateSelectiveByIdRe
(
otd
);
orderTourDetailBiz
.
updateSelectiveByIdRe
(
otd
);
...
@@ -322,12 +339,18 @@ public class OrderCancelBiz {
...
@@ -322,12 +339,18 @@ public class OrderCancelBiz {
//返还优惠券
//返还优惠券
if
(
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
()))
{
if
(
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
()))
{
List
<
String
>
backCoupons
=
(
null
!=
inProgressVO
)?
inProgressVO
.
getBackCoupons
():
Convert
.
convert
(
List
.
class
,
baseOrder
.
getCouponTickerNos
().
split
(
","
));
List
<
String
>
backCoupons
=
(
null
==
inProgressVO
)?
Convert
.
convert
(
List
.
class
,
baseOrder
.
getCouponTickerNos
().
split
(
","
)):
inProgressVO
.
getBackCoupons
();
//设置订单参数
baseOrder
.
setBackCoupon
(
ArrayUtil
.
join
(
backCoupons
,
","
));
for
(
String
backCoupon
:
backCoupons
)
{
for
(
String
backCoupon
:
backCoupons
)
{
activityFeign
.
cancelUse
(
backCoupon
);
activityFeign
.
cancelUse
(
backCoupon
);
}
}
}
}
//更新baseOrder
BeanUtil
.
copyProperties
(
baseOrderBiz
.
updateSelectiveByIdReT
(
baseOrder
),
baseOrder
);
//发送队列消息
//发送队列消息
baseOrderBiz
.
sendOrderMq
(
orvd
,
otd
,
omd
,
baseOrder
,
OrderMQDTO
.
ORDER_CANCEL
);
baseOrderBiz
.
sendOrderMq
(
orvd
,
otd
,
omd
,
baseOrder
,
OrderMQDTO
.
ORDER_CANCEL
);
}
else
{
}
else
{
...
...
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