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
df8ba7f9
Commit
df8ba7f9
authored
Nov 03, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-chw' into dev-chw
parents
a36c4671
604807fb
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
435 additions
and
67 deletions
+435
-67
OrderGoodsDTO.java
.../com/github/wxiaoqi/security/admin/dto/OrderGoodsDTO.java
+1
-1
AppUserSellingWater.java
...ub/wxiaoqi/security/admin/entity/AppUserSellingWater.java
+1
-1
BaseOrderAcceptDetailed.java
...xiaoqi/security/admin/entity/BaseOrderAcceptDetailed.java
+6
-1
AppUserSellingWaterBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserSellingWaterBiz.java
+1
-1
BaseOrderAcceptDetailedBiz.java
...xiaoqi/security/admin/biz/BaseOrderAcceptDetailedBiz.java
+102
-56
WaterMQHandler.java
...github/wxiaoqi/security/admin/handler/WaterMQHandler.java
+3
-3
OrderFeign.java
...c/main/java/com/xxfc/platform/order/feign/OrderFeign.java
+6
-2
OrderDetailDTO.java
...java/com/xxfc/platform/order/pojo/dto/OrderDetailDTO.java
+105
-0
OrderDetailBiz.java
...main/java/com/xxfc/platform/order/biz/OrderDetailBiz.java
+159
-0
AppOrderDetailController.java
...om/xxfc/platform/order/rest/AppOrderDetailController.java
+30
-0
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+20
-0
AppVehicleController.java
.../com/xxfc/platform/vehicle/rest/AppVehicleController.java
+1
-2
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/OrderGoodsDTO.java
View file @
df8ba7f9
...
@@ -20,7 +20,7 @@ public class OrderGoodsDTO {
...
@@ -20,7 +20,7 @@ public class OrderGoodsDTO {
* 商品id
* 商品id
*/
*/
@ApiModelProperty
(
value
=
"商品id"
)
@ApiModelProperty
(
value
=
"商品id"
)
private
Integer
goodId
;
private
String
goodId
;
/**
/**
* 商品类型;1-租车;2-旅游;3-会员订单;4-营地
* 商品类型;1-租车;2-旅游;3-会员订单;4-营地
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/AppUserSellingWater.java
View file @
df8ba7f9
...
@@ -80,7 +80,7 @@ public class AppUserSellingWater implements Serializable {
...
@@ -80,7 +80,7 @@ public class AppUserSellingWater implements Serializable {
*/
*/
@Column
(
name
=
"good_id"
)
@Column
(
name
=
"good_id"
)
@ApiModelProperty
(
value
=
"商品id"
)
@ApiModelProperty
(
value
=
"商品id"
)
private
Integer
goodId
;
private
String
goodId
;
/**
/**
* 商品数量
* 商品数量
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/BaseOrderAcceptDetailed.java
View file @
df8ba7f9
...
@@ -53,10 +53,15 @@ public class BaseOrderAcceptDetailed implements Serializable {
...
@@ -53,10 +53,15 @@ public class BaseOrderAcceptDetailed implements Serializable {
@Column
(
name
=
"division_type"
)
@Column
(
name
=
"division_type"
)
@ApiModelProperty
(
value
=
"类型 1=>平台抽成;2-上级用户拥金;3-上级商家拥金;4-推荐入驻拥金"
)
@ApiModelProperty
(
value
=
"类型 1=>平台抽成;2-上级用户拥金;3-上级商家拥金;4-推荐入驻拥金
;5-商家订单;6-商家定损;7-商家违章
"
)
private
Integer
divisionType
;
private
Integer
divisionType
;
@Column
(
name
=
"entry_type"
)
@ApiModelProperty
(
value
=
"入账类型:1-线上;2-线下"
)
private
Integer
entryType
;
@Column
(
name
=
"division_amount"
)
@Column
(
name
=
"division_amount"
)
@ApiModelProperty
(
value
=
"分账金额"
)
@ApiModelProperty
(
value
=
"分账金额"
)
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserSellingWaterBiz.java
View file @
df8ba7f9
...
@@ -101,7 +101,7 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
...
@@ -101,7 +101,7 @@ public class AppUserSellingWaterBiz extends BaseBiz<AppUserSellingWaterMapper, A
String
orderNo
=
orderWaterDTO
.
getOrderNo
();
String
orderNo
=
orderWaterDTO
.
getOrderNo
();
//用户id
//用户id
Integer
userId
=
orderWaterDTO
.
getUserId
();
Integer
userId
=
orderWaterDTO
.
getUserId
();
Integer
goodId
=
0
;
String
goodId
=
null
;
Integer
orderType
=
0
;
Integer
orderType
=
0
;
String
title
=
null
;
String
title
=
null
;
String
img
=
null
;
String
img
=
null
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/BaseOrderAcceptDetailedBiz.java
View file @
df8ba7f9
...
@@ -8,8 +8,12 @@ import com.github.wxiaoqi.security.admin.vo.SellingWalletPagVo;
...
@@ -8,8 +8,12 @@ import com.github.wxiaoqi.security.admin.vo.SellingWalletPagVo;
import
com.github.wxiaoqi.security.admin.vo.SellingWalletVo
;
import
com.github.wxiaoqi.security.admin.vo.SellingWalletVo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.order.entity.OrderRentVehicleDetail
;
import
com.xxfc.platform.order.feign.OrderFeign
;
import
com.xxfc.platform.order.pojo.dto.OrderDetailDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.order.VMCalendarPriceCostDTO
;
import
com.xxfc.platform.vehicle.pojo.dto.order.VMCalendarPriceCostDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -46,12 +50,6 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
...
@@ -46,12 +50,6 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
@Autowired
@Autowired
AppUserDetailBiz
detailBiz
;
AppUserDetailBiz
detailBiz
;
@Autowired
private
AppUserLoginBiz
appUserLoginBiz
;
@Autowired
private
AppUserDetailBiz
appUserDetailBiz
;
@Autowired
@Autowired
MyWaterBiz
myWaterBiz
;
MyWaterBiz
myWaterBiz
;
...
@@ -64,6 +62,9 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
...
@@ -64,6 +62,9 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
@Autowired
@Autowired
AppUserSellingWaterBiz
sellingWaterBiz
;
AppUserSellingWaterBiz
sellingWaterBiz
;
@Autowired
OrderFeign
orderFeign
;
//计算用户拥金
//计算用户拥金
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
...
@@ -71,13 +72,25 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
...
@@ -71,13 +72,25 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
//订单状态
//订单状态
Integer
status
=
orderWaterDTO
.
getStatus
();
Integer
status
=
orderWaterDTO
.
getStatus
();
if
(
status
==
null
||
status
==
0
)
{
if
(
status
==
null
||
status
==
0
)
{
log
.
info
(
"
购买计算用户拥金----payO
rderWater----参数不能为空----status==="
+
status
);
log
.
info
(
"
分账----o
rderWater----参数不能为空----status==="
+
status
);
return
;
return
;
}
}
ObjectRestResponse
<
OrderDetailDTO
>
restResponse
=
orderFeign
.
getOrderDetail
(
orderWaterDTO
.
getOrderNo
(),
status
);
if
(
restResponse
.
getData
()
==
null
){
log
.
info
(
"分账----订单信息不存在----参数不能为空---"
);
return
;
}
OrderDetailDTO
orderDetailDTO
=
restResponse
.
getData
();
if
(
status
==
1
)
{
if
(
status
==
1
)
{
payOrderAccept
(
orderWaterDTO
);
payOrderAccept
(
orderWaterDTO
,
orderDetailDTO
);
}
else
if
(
status
==
2
)
{
}
else
if
(
status
==
2
)
{
finishOrderAccept
(
orderWaterDTO
);
BigDecimal
acceptAmount
=
orderDetailDTO
.
getAcceptAmount
();
log
.
info
(
"分账----acceptAmount===="
+
acceptAmount
);
if
(
acceptAmount
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
){
return
;
}
orderWaterDTO
.
setOrderAmount
(
acceptAmount
);
finishOrderAccept
(
orderWaterDTO
,
orderDetailDTO
);
sellingWaterBiz
.
updWalletByOrderId
(
orderWaterDTO
);
sellingWaterBiz
.
updWalletByOrderId
(
orderWaterDTO
);
}
else
{
}
else
{
refundOrderAccept
(
orderWaterDTO
);
refundOrderAccept
(
orderWaterDTO
);
...
@@ -86,20 +99,27 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
...
@@ -86,20 +99,27 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
}
}
//下单分账
//下单分账
public
void
payOrderAccept
(
OrderWaterDTO
orderWaterDTO
)
{
public
void
payOrderAccept
(
OrderWaterDTO
orderWaterDTO
,
OrderDetailDTO
orderDetailDTO
)
{
//订单id
//订单id
Integer
orderId
=
order
WaterDTO
.
getOrderId
()
==
null
?
0
:
orderWater
DTO
.
getOrderId
();
Integer
orderId
=
order
DetailDTO
.
getOrderId
()
==
null
?
0
:
orderDetail
DTO
.
getOrderId
();
//订单号
//订单号
String
orderNo
=
order
Water
DTO
.
getOrderNo
();
String
orderNo
=
order
Detail
DTO
.
getOrderNo
();
//用户id
//用户id
Integer
userId
=
orderWaterDTO
.
getUserId
()
==
null
?
0
:
orderWaterDTO
.
getUserId
();
Integer
userId
=
orderDetailDTO
.
getUserId
()
==
null
?
0
:
orderDetailDTO
.
getUserId
();
Integer
companyId
=
orderWaterDTO
.
getCompanyId
()
==
null
?
0
:
orderWaterDTO
.
getCompanyId
();
List
<
OrderGoodsDTO
>
goodsDTOList
=
orderWaterDTO
.
getGoodsDTOList
();
OrderRentVehicleDetail
rentVehicleDetail
=
orderDetailDTO
.
getRentVehicleDetail
();
Integer
companyId
=
rentVehicleDetail
.
getVehicleManageCompanyId
()
==
null
?
0
:
rentVehicleDetail
.
getVehicleManageCompanyId
();
log
.
info
(
"分账----payOrderAccept----userId===="
+
userId
+
"---orderId==="
+
orderId
+
"---orderNo==="
+
orderNo
+
"----companyId==="
+
companyId
);
log
.
info
(
"分账----payOrderAccept----userId===="
+
userId
+
"---orderId==="
+
orderId
+
"---orderNo==="
+
orderNo
+
"----companyId==="
+
companyId
);
if
(
orderId
==
0
||
userId
==
0
||
companyId
==
0
||
CollectionUtils
.
isEmpty
(
goodsDTOList
))
{
if
(
orderId
==
0
||
userId
==
0
||
companyId
==
0
)
{
throw
new
BaseException
(
"分账----payOrderAccept----参数不能为空----orderId==="
+
orderId
,
ResultCode
.
FAILED_CODE
);
throw
new
BaseException
(
"分账----payOrderAccept----参数不能为空----orderId==="
+
orderId
,
ResultCode
.
FAILED_CODE
);
}
}
BigDecimal
orderAmount
=
goodsDTOList
.
stream
().
map
(
OrderGoodsDTO:
:
getPrice
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
orderAmount
=
orderDetailDTO
.
getAcceptAmount
();
log
.
info
(
"分账----payOrderAccept--------userId==="
+
userId
+
"---orderAmount===="
+
orderAmount
);
log
.
info
(
"分账----payOrderAccept--------userId==="
+
userId
+
"---orderAmount===="
+
orderAmount
);
...
@@ -179,36 +199,44 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
...
@@ -179,36 +199,44 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
}
}
public
void
payOrderFAccept
(
OrderWaterDTO
orderWaterDTO
)
{
public
void
payOrderFAccept
(
OrderWaterDTO
orderWaterDTO
,
OrderDetailDTO
orderDetailDTO
)
{
Integer
orderId
=
orderWaterDTO
.
getOrderId
()
==
null
?
0
:
orderWaterDTO
.
getOrderId
();
Integer
orderId
=
orderWaterDTO
.
getOrderId
()
==
null
?
0
:
orderWaterDTO
.
getOrderId
();
List
<
OrderGoodsDTO
>
goodsDTOList
=
orderWaterDTO
.
getGoodsDTOList
();
if
(
orderDetailDTO
!=
null
){
if
(
goodsDTOList
.
size
()
>
0
){
Example
example
=
new
Example
(
BaseOrderAcceptDetailed
.
class
);
BigDecimal
goodsPries
=
goodsDTOList
.
stream
().
map
(
OrderGoodsDTO:
:
getPrice
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
example
.
createCriteria
().
andEqualTo
(
"orderId"
,
orderId
).
andEqualTo
(
"status"
,
1
);
BaseOrderAcceptDetailed
acceptDetailed
=
new
BaseOrderAcceptDetailed
();
example
.
setOrderByClause
(
"division_type desc "
);
acceptDetailed
.
setOrderId
(
orderId
);
List
<
BaseOrderAcceptDetailed
>
acceptDetaileds
=
selectByExample
(
example
);
acceptDetailed
.
setStatus
(
1
);
List
<
BaseOrderAcceptDetailed
>
acceptDetaileds
=
selectList
(
acceptDetailed
);
if
(
acceptDetaileds
.
size
()
>
0
){
if
(
acceptDetaileds
.
size
()
>
0
){
BigDecimal
orderAmount
=
acceptDetaileds
.
get
(
0
).
getOrderAmount
();
BigDecimal
orderAmount
=
orderDetailDTO
.
getAcceptAmount
();
if
(
orderAmount
.
compareTo
(
goodsPries
)
>
0
){
if
(
orderAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
orderAmount
=
orderAmount
.
subtract
(
goodsPries
);
BigDecimal
amount
=
orderAmount
;
BigDecimal
amount
=
BigDecimal
.
ZERO
;
//先计算分给店铺
BigDecimal
companyExtrac
=
acceptDetaileds
.
stream
().
filter
(
x
->
x
.
getDivisionType
()
==
5
).
map
(
BaseOrderAcceptDetailed:
:
getExtract
).
reduce
(
BigDecimal
.
ZERO
,
(
x
,
y
)
->
x
.
add
(
y
));
//店铺金额
BigDecimal
companyDivisionAmount
=
orderAmount
.
multiply
(
companyExtrac
).
divide
(
new
BigDecimal
(
100
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
//其他金额
BigDecimal
otherDivisionAmount
=
orderAmount
.
subtract
(
companyDivisionAmount
);
Integer
num
=
0
;
for
(
BaseOrderAcceptDetailed
acceptDetailed1:
acceptDetaileds
){
for
(
BaseOrderAcceptDetailed
acceptDetailed1:
acceptDetaileds
){
num
++;
Integer
zAcceptId
=
acceptDetailed1
.
getId
();
Integer
zAcceptId
=
acceptDetailed1
.
getId
();
acceptDetailed1
.
setType
(
2
);
acceptDetailed1
.
setType
(
2
);
acceptDetailed1
.
setId
(
null
);
acceptDetailed1
.
setId
(
null
);
acceptDetailed1
.
setOrderAmount
(
orderAmount
);
acceptDetailed1
.
setOrderAmount
(
orderAmount
);
if
(
acceptDetailed1
.
getDivisionType
()
==
5
){
if
(
num
.
equals
(
acceptDetaileds
.
size
())){
if
(
orderAmount
.
compareTo
(
amount
)
>
0
){
acceptDetailed1
.
setDivisionAmount
(
amount
);
BigDecimal
divisionAmount
=
orderAmount
.
subtract
(
amount
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
acceptDetailed1
.
setDivisionAmount
(
divisionAmount
);
insertSelective
(
acceptDetailed1
);
insertSelective
(
acceptDetailed1
);
}
}
else
{
}
else
{
BigDecimal
divisionAmount
=
orderAmount
.
multiply
(
acceptDetailed1
.
getExtract
()).
divide
(
new
BigDecimal
(
100
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
acceptDetailed1
.
getDivisionType
()
==
5
)
{
acceptDetailed1
.
setDivisionAmount
(
companyDivisionAmount
);
insertSelective
(
acceptDetailed1
);
}
else
if
(
acceptDetailed1
.
getDivisionType
()
==
2
||
acceptDetailed1
.
getDivisionType
()
==
3
||
acceptDetailed1
.
getDivisionType
()
==
4
)
{
if
(
otherDivisionAmount
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
if
(!
orderDetailDTO
.
getOrderStatus
().
equals
(
OrderDetailDTO
.
CANEL
))
{
BigDecimal
divisionAmount
=
otherDivisionAmount
.
multiply
(
acceptDetailed1
.
getExtract
()).
divide
(
new
BigDecimal
(
100
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
acceptDetailed1
.
setDivisionAmount
(
divisionAmount
);
acceptDetailed1
.
setDivisionAmount
(
divisionAmount
);
}
insertSelective
(
acceptDetailed1
);
insertSelective
(
acceptDetailed1
);
amount
=
amount
.
add
(
divisionAmount
);
orderWaterDTO
.
setAcceptId
(
acceptDetailed1
.
getId
());
orderWaterDTO
.
setAcceptId
(
acceptDetailed1
.
getId
());
orderWaterDTO
.
setZAcceptId
(
zAcceptId
);
orderWaterDTO
.
setZAcceptId
(
zAcceptId
);
orderWaterDTO
.
setOrderAmount
(
orderAmount
);
orderWaterDTO
.
setOrderAmount
(
orderAmount
);
...
@@ -216,17 +244,19 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
...
@@ -216,17 +244,19 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
}
}
}
}
}
}
amount
=
amount
.
subtract
(
acceptDetailed1
.
getDivisionAmount
());
}
}
othderAccept
(
orderDetailDTO
);
}
}
}
}
}
}
//订单完成计算用户拥金
//订单完成计算用户拥金
public
void
finishOrderAccept
(
OrderWaterDTO
orderWaterDTO
)
{
public
void
finishOrderAccept
(
OrderWaterDTO
orderWaterDTO
,
OrderDetailDTO
orderDetailDTO
)
{
//订单id
//订单id
Integer
orderId
=
orderWaterDTO
.
getOrderId
()
==
null
?
0
:
orderWaterDTO
.
getOrderId
();
Integer
orderId
=
orderWaterDTO
.
getOrderId
()
==
null
?
0
:
orderWaterDTO
.
getOrderId
();
log
.
info
(
"订单完成
计算用户拥金
----finishOrderWater----orderId===="
+
orderId
);
log
.
info
(
"订单完成
分账
----finishOrderWater----orderId===="
+
orderId
);
if
(
orderId
==
0
)
{
if
(
orderId
==
0
)
{
return
;
return
;
}
}
...
@@ -241,21 +271,16 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
...
@@ -241,21 +271,16 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
updateSelectiveById
(
acceptDetailed
);
updateSelectiveById
(
acceptDetailed
);
orderWaterDTO
.
setAcceptId
(
id
);
orderWaterDTO
.
setAcceptId
(
id
);
BigDecimal
commison
=
sellingWaterBiz
.
finishOrderWater
(
orderWaterDTO
);
BigDecimal
commison
=
sellingWaterBiz
.
finishOrderWater
(
orderWaterDTO
);
log
.
info
(
"分账----finishOrderAccept----id===="
+
id
+
"---commison=="
+
commison
+
"----divisionType==="
+
divisionType
);
log
.
info
(
"
订单完成
分账----finishOrderAccept----id===="
+
id
+
"---commison=="
+
commison
+
"----divisionType==="
+
divisionType
);
amount
=
amount
.
add
(
commison
);
amount
=
amount
.
add
(
commison
);
}
}
Integer
orderType
=
0
;
Integer
orderType
=
orderDetailDTO
.
getOrderType
()
==
null
?
0
:
orderDetailDTO
.
getOrderType
();
List
<
OrderGoodsDTO
>
goodsDTOList
=
orderWaterDTO
.
getGoodsDTOList
();
if
(
goodsDTOList
.
size
()
>
0
){
OrderGoodsDTO
orderGoodsDTO
=
goodsDTOList
.
get
(
0
);
orderType
=
orderGoodsDTO
.
getType
()
==
null
?
0
:
orderGoodsDTO
.
getType
();
}
BigDecimal
unbooked
=
amount
;
BigDecimal
unbooked
=
amount
;
log
.
info
(
"订单完成
计算用户拥金
----finishOrderWater----orderId===="
+
orderId
+
"---amount=="
+
amount
+
"---unbooked=="
+
unbooked
);
log
.
info
(
"订单完成
分账
----finishOrderWater----orderId===="
+
orderId
+
"---amount=="
+
amount
+
"---unbooked=="
+
unbooked
);
if
(
orderType
==
1
)
{
if
(
orderType
==
1
)
{
payOrderFAccept
(
orderWaterDTO
);
payOrderFAccept
(
orderWaterDTO
,
orderDetailDTO
);
}
}
log
.
info
(
"订单完成
计算用户拥金
----finishOrderWater--------orderId==="
+
orderId
+
"----amount===="
+
amount
+
"--orderType==="
+
orderType
);
log
.
info
(
"订单完成
分账
----finishOrderWater--------orderId==="
+
orderId
+
"----amount===="
+
amount
+
"--orderType==="
+
orderType
);
}
}
...
@@ -282,6 +307,8 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
...
@@ -282,6 +307,8 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
}
}
}
}
//获取拥金列表
//获取拥金列表
public
List
<
BaseOrderAcceptDetailed
>
getAcceptList
(
Integer
orderId
)
{
public
List
<
BaseOrderAcceptDetailed
>
getAcceptList
(
Integer
orderId
)
{
Example
example
=
new
Example
(
BaseOrderAcceptDetailed
.
class
);
Example
example
=
new
Example
(
BaseOrderAcceptDetailed
.
class
);
...
@@ -290,4 +317,23 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
...
@@ -290,4 +317,23 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
}
}
public
void
othderAccept
(
OrderDetailDTO
orderDetailDTO
){
BaseOrderAcceptDetailed
acceptDetailed
=
new
BaseOrderAcceptDetailed
();
acceptDetailed
.
setOrderNo
(
orderDetailDTO
.
getOrderNo
());
acceptDetailed
.
setDivisionType
(
5
);
acceptDetailed
=
selectOne
(
acceptDetailed
);
if
(
acceptDetailed
!=
null
){
if
(
orderDetailDTO
.
getOrderStatus
().
equals
(
OrderDetailDTO
.
DELAY
)){
acceptDetailed
.
setDivisionAmount
(
orderDetailDTO
.
getViolateAmount
());
acceptDetailed
.
setDivisionType
(
6
);
acceptDetailed
.
setId
(
null
);
acceptDetailed
.
setStatus
(
1
);
acceptDetailed
.
setStatusTime
(
System
.
currentTimeMillis
());
insertSelective
(
acceptDetailed
);
}
}
}
}
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/handler/WaterMQHandler.java
View file @
df8ba7f9
...
@@ -87,7 +87,7 @@ public class WaterMQHandler {
...
@@ -87,7 +87,7 @@ public class WaterMQHandler {
orderWaterDTO
.
setGoodsDTOList
(
orderWaterDTO
.
setGoodsDTOList
(
new
ArrayList
<
OrderGoodsDTO
>()
{{
new
ArrayList
<
OrderGoodsDTO
>()
{{
add
(
new
OrderGoodsDTO
()
{{
add
(
new
OrderGoodsDTO
()
{{
setGoodId
(
orderMQDTO
.
getOrderRentVehicleDetail
().
get
Model
Id
());
setGoodId
(
orderMQDTO
.
getOrderRentVehicleDetail
().
get
Vehicle
Id
());
setGoodNumber
(
1
);
setGoodNumber
(
1
);
setImg
(
orderMQDTO
.
getPicture
());
setImg
(
orderMQDTO
.
getPicture
());
setPrice
(
orderMQDTO
.
getItemByTypeEnum
(
ItemTypeEnum
.
VEHICLE_MODEL
).
getLastAmount
());
setPrice
(
orderMQDTO
.
getItemByTypeEnum
(
ItemTypeEnum
.
VEHICLE_MODEL
).
getLastAmount
());
...
@@ -103,7 +103,7 @@ public class WaterMQHandler {
...
@@ -103,7 +103,7 @@ public class WaterMQHandler {
orderWaterDTO
.
setGoodsDTOList
(
orderWaterDTO
.
setGoodsDTOList
(
new
ArrayList
<
OrderGoodsDTO
>()
{{
new
ArrayList
<
OrderGoodsDTO
>()
{{
add
(
new
OrderGoodsDTO
()
{{
add
(
new
OrderGoodsDTO
()
{{
setGoodId
(
orderMQDTO
.
getOrderTourDetail
().
getGoodId
());
setGoodId
(
orderMQDTO
.
getOrderTourDetail
().
getGoodId
()
+
""
);
setGoodNumber
(
1
);
setGoodNumber
(
1
);
setImg
(
orderMQDTO
.
getPicture
());
setImg
(
orderMQDTO
.
getPicture
());
setPrice
(
tourAdultItem
.
getRealAmount
().
add
(
null
==
tourChildItem
?
setPrice
(
tourAdultItem
.
getRealAmount
().
add
(
null
==
tourChildItem
?
...
@@ -118,7 +118,7 @@ public class WaterMQHandler {
...
@@ -118,7 +118,7 @@ public class WaterMQHandler {
orderWaterDTO
.
setGoodsDTOList
(
orderWaterDTO
.
setGoodsDTOList
(
new
ArrayList
<
OrderGoodsDTO
>()
{{
new
ArrayList
<
OrderGoodsDTO
>()
{{
add
(
new
OrderGoodsDTO
()
{{
add
(
new
OrderGoodsDTO
()
{{
setGoodId
(
orderMQDTO
.
getOrderMemberDetail
().
getMemberLevelId
());
setGoodId
(
orderMQDTO
.
getOrderMemberDetail
().
getMemberLevelId
()
+
""
);
setGoodNumber
(
1
);
setGoodNumber
(
1
);
setImg
(
orderMQDTO
.
getPicture
());
setImg
(
orderMQDTO
.
getPicture
());
setPrice
(
orderMQDTO
.
getItemByTypeEnum
(
ItemTypeEnum
.
MEMBER
).
getRealAmount
());
setPrice
(
orderMQDTO
.
getItemByTypeEnum
(
ItemTypeEnum
.
MEMBER
).
getRealAmount
());
...
...
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/feign/OrderFeign.java
View file @
df8ba7f9
package
com
.
xxfc
.
platform
.
order
.
feign
;
package
com
.
xxfc
.
platform
.
order
.
feign
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.order.entity.OrderInvoice
;
import
com.xxfc.platform.order.entity.OrderInvoice
;
import
com.xxfc.platform.order.pojo.dto.OrderDTO
;
import
com.xxfc.platform.order.pojo.dto.OrderDTO
;
import
com.xxfc.platform.order.pojo.dto.OrderDetailDTO
;
import
com.xxfc.platform.order.pojo.order.OrderPageVO
;
import
com.xxfc.platform.order.pojo.order.OrderPageVO
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -38,4 +38,8 @@ public interface OrderFeign {
...
@@ -38,4 +38,8 @@ public interface OrderFeign {
@GetMapping
(
value
=
"/specialRent/app/unauth/checkHasSpecialRentFegin"
)
@GetMapping
(
value
=
"/specialRent/app/unauth/checkHasSpecialRentFegin"
)
public
ObjectRestResponse
<
Boolean
>
checkHasSpecialRentFegin
(
String
vehicleId
);
public
ObjectRestResponse
<
Boolean
>
checkHasSpecialRentFegin
(
String
vehicleId
);
@RequestMapping
(
value
=
"chw/orderDetail/app/unauth/getOrderDetail"
,
method
=
RequestMethod
.
GET
)
ObjectRestResponse
<
OrderDetailDTO
>
getOrderDetail
(
@RequestParam
(
"orderNo"
)
String
orderNo
,
@RequestParam
(
"type"
)
Integer
type
);
}
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/dto/OrderDetailDTO.java
0 → 100644
View file @
df8ba7f9
package
com
.
xxfc
.
platform
.
order
.
pojo
.
dto
;
import
com.xxfc.platform.order.entity.OrderRentVehicleDetail
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
/**
* 门店收支明细DTO
* @author libin
* @version 1.0
* @description
* @data 2019/12/25 14:53
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
OrderDetailDTO
{
public
static
final
Integer
PAY
=
1
;
//支付
public
static
final
Integer
CANEL
=
2
;
//取消
public
static
final
Integer
ADVANCE
=
3
;
//提前还车
public
static
final
Integer
DELAY
=
4
;
//延迟还车
public
static
final
Integer
FINISH
=
5
;
//正常完成
@ApiModelProperty
(
"租车订单详情"
)
private
OrderRentVehicleDetail
rentVehicleDetail
;
@ApiModelProperty
(
"订单类型"
)
private
Integer
orderType
;
@ApiModelProperty
(
"订单号"
)
private
String
orderNo
;
@ApiModelProperty
(
"用户id"
)
private
Integer
userId
;
@ApiModelProperty
(
"订单id"
)
private
Integer
orderId
;
@ApiModelProperty
(
"订单状态"
)
private
Integer
orderStatus
=
PAY
;
@ApiModelProperty
(
"商品实付金额"
)
private
BigDecimal
goodsAmount
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"消费金额"
)
private
BigDecimal
orderAmount
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"不计免赔费"
)
private
BigDecimal
damageSafeAmount
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"其他费用-延迟用车不记免赔"
)
private
BigDecimal
damageSafeAmount2
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"定损费"
)
private
BigDecimal
lossSpecifiedAmount
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"违章费"
)
private
BigDecimal
breakRulesRegulation
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"违约金"
)
private
BigDecimal
violateAmount
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"更换还车公司费用"
)
private
BigDecimal
chageAmount
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"分账金额"
)
private
BigDecimal
acceptAmount
;
public
BigDecimal
getAcceptAmount
(){
return
goodsAmount
.
subtract
(
orderAmount
).
subtract
(
violateAmount
);
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderDetailBiz.java
0 → 100644
View file @
df8ba7f9
package
com
.
xxfc
.
platform
.
order
.
biz
;
import
com.alibaba.fastjson.JSON
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;;
import
com.xxfc.platform.order.contant.enumerate.DeductionTypeEnum
;
import
com.xxfc.platform.order.contant.enumerate.OrderStatusEnum
;
import
com.xxfc.platform.order.entity.*
;
import
com.xxfc.platform.order.pojo.account.OrderAccountDeduction
;
import
com.xxfc.platform.order.pojo.account.OrderAccountDetail
;
import
com.xxfc.platform.order.pojo.dto.OrderDetailDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
@Service
@Slf4j
public
class
OrderDetailBiz
{
@Autowired
BaseOrderBiz
orderBiz
;
@Autowired
OrderRentVehicleBiz
orderRentVehicleBiz
;
@Autowired
OrderItemBiz
orderItemBiz
;
@Autowired
CompanyWalletBiz
companyWalletBiz
;
@Autowired
OrderAccountBiz
orderAccountBiz
;
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
//type1-支付;2-退款;3-完成
public
OrderDetailDTO
getOrderDetail
(
String
orderNo
,
Integer
type
){
if
(
StringUtils
.
isBlank
(
orderNo
)){
throw
new
BaseException
(
"订单号不存在"
,
ResultCode
.
FAILED_CODE
);
}
log
.
info
(
"---orderNo==="
+
orderNo
);
//获取订单相关信息
BaseOrder
baseOrder
=
new
BaseOrder
();
baseOrder
.
setNo
(
orderNo
);
baseOrder
=
orderBiz
.
selectOne
(
baseOrder
);
if
(
baseOrder
==
null
||(
type
==
1
&&
!
baseOrder
.
getStatus
()
.
equals
(
OrderStatusEnum
.
ORDER_TOSTART
.
getCode
()))
||(
(
type
==
2
||
type
==
3
)
&&
!
baseOrder
.
getStatus
().
equals
(
OrderStatusEnum
.
ORDER_FINISH
.
getCode
()))){
throw
new
BaseException
(
"订单不存在或状态不是已完成"
,
ResultCode
.
FAILED_CODE
);
}
BigDecimal
goodsAmount
=
baseOrder
.
getGoodsAmount
().
subtract
(
baseOrder
.
getCouponAmount
());
List
<
OrderRentVehicleDetail
>
orderRentVehicleDetails
=
orderRentVehicleBiz
.
listByOrderId
(
baseOrder
.
getId
());
if
(
orderRentVehicleDetails
==
null
||
orderRentVehicleDetails
.
size
()
==
0
){
throw
new
BaseException
(
"订单详情不存在"
,
ResultCode
.
FAILED_CODE
);
}
List
<
Integer
>
types
=
new
ArrayList
<>();
if
(
type
==
2
){
types
.
add
(
201
);
types
.
add
(
202
);
types
.
add
(
203
);
}
else
if
(
type
==
3
)
{
types
.
add
(
204
);
}
OrderAccountDetail
accountDetail
=
null
;
if
(
types
.
size
()
>
0
){
accountDetail
=
getAccountDetail
(
types
,
baseOrder
.
getId
());
if
(
accountDetail
==
null
){
throw
new
BaseException
(
"费用明细不存在"
,
ResultCode
.
FAILED_CODE
);
}
}
OrderItem
orderItem
=
new
OrderItem
();
orderItem
.
setOrderId
(
baseOrder
.
getId
());
List
<
OrderItem
>
orderItems
=
orderItemBiz
.
selectList
(
orderItem
);
//不计免赔
BigDecimal
damageSafeAmount
=
orderItems
.
stream
().
filter
(
x
->
x
.
getType
()==
102
).
map
(
OrderItem:
:
getRealAmount
).
reduce
(
BigDecimal
.
ZERO
,
(
x
,
y
)
->
x
.
add
(
y
));
OrderRentVehicleDetail
vehicleDetail
=
orderRentVehicleDetails
.
get
(
0
);
//获取营收明细dto
OrderDetailDTO
orderDetailDTO
=
new
OrderDetailDTO
();
orderDetailDTO
.
setRentVehicleDetail
(
vehicleDetail
);
orderDetailDTO
.
setDamageSafeAmount
(
damageSafeAmount
);
orderDetailDTO
.
setGoodsAmount
(
goodsAmount
);
orderDetailDTO
.
setOrderType
(
baseOrder
.
getType
());
orderDetailDTO
.
setOrderId
(
baseOrder
.
getId
());
orderDetailDTO
.
setUserId
(
baseOrder
.
getUserId
());
orderDetailDTO
.
setOrderNo
(
baseOrder
.
getNo
());
if
(
accountDetail
!=
null
){
List
<
OrderAccountDeduction
>
deductions
=
accountDetail
.
getDeductions
();
if
(
CollectionUtils
.
isNotEmpty
(
deductions
)){
setDeductionDetail
(
deductions
,
orderDetailDTO
);
}
}
return
orderDetailDTO
;
}
public
OrderAccountDetail
getAccountDetail
(
List
<
Integer
>
types
,
Integer
orderId
)
{
Example
example
=
new
Example
(
OrderAccount
.
class
);
example
.
createCriteria
().
andEqualTo
(
"orderId"
,
orderId
).
andIn
(
"accountType"
,
types
);
List
<
OrderAccount
>
orderAccounts
=
orderAccountBiz
.
selectByExample
(
example
);
if
(
orderAccounts
.
size
()
>
0
){
OrderAccount
orderAccount
=
orderAccounts
.
get
(
0
);
return
org
.
springframework
.
util
.
StringUtils
.
hasText
(
orderAccount
.
getAccountDetail
())
?
JSON
.
parseObject
(
orderAccount
.
getAccountDetail
(),
OrderAccountDetail
.
class
)
:
null
;
}
return
null
;
}
public
void
setDeductionDetail
(
List
<
OrderAccountDeduction
>
deductions
,
OrderDetailDTO
orderDetailDTO
){
Integer
orderStatus
=
0
;
for
(
OrderAccountDeduction
orderAccountDeduction:
deductions
){
Integer
type
=
orderAccountDeduction
.
getType
()
==
null
?
0
:
orderAccountDeduction
.
getType
();
BigDecimal
amount
=
orderAccountDeduction
.
getAmount
()
==
null
?
BigDecimal
.
ZERO
:
orderAccountDeduction
.
getAmount
();
if
(
Objects
.
equals
(
DeductionTypeEnum
.
VIOLATE_CANCEL
.
getCode
(),
type
)){
orderStatus
=
OrderDetailDTO
.
CANEL
;
orderDetailDTO
.
setViolateAmount
(
amount
);
}
else
{
if
(
Objects
.
equals
(
DeductionTypeEnum
.
VIOLATE_ADVANCE
.
getCode
(),
type
)){
orderStatus
=
OrderDetailDTO
.
ADVANCE
;
orderDetailDTO
.
setViolateAmount
(
amount
);
}
else
if
(
Objects
.
equals
(
DeductionTypeEnum
.
VIOLATE_DELAY
.
getCode
(),
type
)){
orderStatus
=
OrderDetailDTO
.
DELAY
;
orderDetailDTO
.
setViolateAmount
(
amount
);
}
else
if
(
Objects
.
equals
(
DeductionTypeEnum
.
VIOLATE_CHANGE_C
.
getCode
(),
type
)){
orderDetailDTO
.
setChageAmount
(
amount
);
}
else
if
(
Objects
.
equals
(
DeductionTypeEnum
.
CONSUME
.
getCode
(),
type
)){
orderDetailDTO
.
setOrderAmount
(
amount
);
}
else
if
(
Objects
.
equals
(
DeductionTypeEnum
.
DAMAGES
.
getCode
(),
type
)){
orderDetailDTO
.
setLossSpecifiedAmount
(
amount
);
}
else
if
(
Objects
.
equals
(
DeductionTypeEnum
.
VIOLATE_TRAFFIC_DEDUCT
.
getCode
(),
type
)){
orderDetailDTO
.
setBreakRulesRegulation
(
amount
);
}
else
if
(
Objects
.
equals
(
DeductionTypeEnum
.
OTHER_DELAY_SAFE
.
getCode
(),
type
)){
orderDetailDTO
.
setDamageSafeAmount2
(
amount
);
}
}
}
orderDetailDTO
.
setOrderStatus
(
orderStatus
);
}
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/AppOrderDetailController.java
0 → 100644
View file @
df8ba7f9
package
com
.
xxfc
.
platform
.
order
.
rest
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.order.biz.OrderDetailBiz
;
import
com.xxfc.platform.order.pojo.dto.OrderDetailDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
"chw/orderDetail"
)
@Slf4j
public
class
AppOrderDetailController
{
@Autowired
OrderDetailBiz
orderDetailBiz
;
@RequestMapping
(
value
=
"app/unauth/getOrderDetail"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
public
ObjectRestResponse
<
List
<
OrderDetailDTO
>>
getOrderDetail
(
@RequestParam
(
"orderNo"
)
String
orderNo
,
@RequestParam
(
"type"
)
Integer
type
)
{
return
ObjectRestResponse
.
succ
(
orderDetailBiz
.
getOrderDetail
(
orderNo
,
type
));
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
df8ba7f9
...
@@ -20,6 +20,7 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
...
@@ -20,6 +20,7 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import
com.google.common.base.Function
;
import
com.google.common.base.Function
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.xxfc.platform.order.feign.OrderFeign
;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.constant.DictionaryKey
;
import
com.xxfc.platform.universal.dto.SendMsgDTO
;
import
com.xxfc.platform.universal.dto.SendMsgDTO
;
import
com.xxfc.platform.universal.entity.Dictionary
;
import
com.xxfc.platform.universal.entity.Dictionary
;
...
@@ -122,6 +123,9 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -122,6 +123,9 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
@Autowired
@Autowired
VehicleManageApplyBiz
vehicleManageApplyBiz
;
VehicleManageApplyBiz
vehicleManageApplyBiz
;
@Autowired
OrderFeign
orderFeign
;
@Override
@Override
public
UserFeign
getUserFeign
()
{
public
UserFeign
getUserFeign
()
{
return
userFeign
;
return
userFeign
;
...
@@ -1793,6 +1797,22 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
...
@@ -1793,6 +1797,22 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
public
ObjectRestResponse
updState
(
Vehicle
vehicle
){
ObjectRestResponse
<
Boolean
>
restResponse
=
orderFeign
.
checkHasSpecialRentFegin
(
vehicle
.
getId
());
if
(
restResponse
.
getData
()
==
null
){
return
restResponse
;
}
Boolean
flag
=
restResponse
.
getData
();
if
(
flag
){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"已存在特惠租车无法上架"
);
}
updateSelectiveById
(
vehicle
);
return
ObjectRestResponse
.
succ
();
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/AppVehicleController.java
View file @
df8ba7f9
...
@@ -44,8 +44,7 @@ public class AppVehicleController extends BaseController<VehicleBiz> {
...
@@ -44,8 +44,7 @@ public class AppVehicleController extends BaseController<VehicleBiz> {
@PostMapping
(
"updVehicle"
)
@PostMapping
(
"updVehicle"
)
@ApiModelProperty
(
"更新商品信息"
)
@ApiModelProperty
(
"更新商品信息"
)
public
ObjectRestResponse
updVehicle
(
@RequestBody
Vehicle
vehicle
)
{
public
ObjectRestResponse
updVehicle
(
@RequestBody
Vehicle
vehicle
)
{
baseBiz
.
updateSelectiveById
(
vehicle
);
return
baseBiz
.
updState
(
vehicle
);
return
ObjectRestResponse
.
succ
();
}
}
...
...
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