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
4d214ba6
Commit
4d214ba6
authored
Nov 03, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加代码
parent
f991582a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
5 deletions
+28
-5
SpecialRentBiz.java
...main/java/com/xxfc/platform/order/biz/SpecialRentBiz.java
+7
-3
SpecialRentController.java
...a/com/xxfc/platform/order/rest/SpecialRentController.java
+21
-2
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/SpecialRentBiz.java
View file @
4d214ba6
...
...
@@ -67,8 +67,12 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> {
return
w
;
});
if
(
list
.
size
()
>
0
)
{
return
Boolean
.
TRUE
;
if
(
list
.
size
()
>
0
)
{
for
(
SpecialRent
specialRent
:
list
)
{
if
(
specialRent
.
getStartCompanyId
().
equals
(
specialRent
.
getEndCompanyId
()))
{
return
Boolean
.
TRUE
;
}
}
}
return
Boolean
.
FALSE
;
}
...
...
@@ -128,7 +132,7 @@ public class SpecialRentBiz extends BaseBiz<SpecialRentMapper, SpecialRent> {
specialRent
.
setEndCityCode
(
companyDetail
.
getAddrCity
());
}
if
(
null
!=
specialRent
.
getCategoryId
())
{
VehicleCategory
vehicleCategory
=
vehicleFeign
.
getVehicleCategory
(
specialRent
.
get
EndCompan
yId
()).
getData
();
VehicleCategory
vehicleCategory
=
vehicleFeign
.
getVehicleCategory
(
specialRent
.
get
Categor
yId
()).
getData
();
specialRent
.
setBrandName
(
vehicleCategory
.
getBrandName
());
specialRent
.
setCategoryName
(
vehicleCategory
.
getName
());
}
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/SpecialRentController.java
View file @
4d214ba6
...
...
@@ -76,16 +76,35 @@ public class SpecialRentController extends BaseController<SpecialRentBiz, Specia
return
ObjectRestResponse
.
succ
();
}
@RequestMapping
(
value
=
"/appBusiness/cnlRent"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/appBusiness/cnlRent"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
@ApiOperation
(
value
=
"取消发布特惠租车"
)
public
ObjectRestResponse
appBusinessCnlRent
(
@RequestBody
SpecialRent
specialRent
)
{
UserDTO
userDTO
=
getBusinessUserByAppUser
();
//查询
SpecialRent
specialRentDB
=
baseBiz
.
selectById
(
specialRent
.
getId
());
AssertUtils
.
isBlank
(
specialRentDB
);
if
(
SpecialRent
.
STATUS_CRT
!=
specialRentDB
.
getStatus
())
{
throw
new
BaseException
(
ResultCode
.
AJAX_WECHAT_NOTEXIST_CODE
);
}
//拒绝原来的预约
orderRentVehicleService
.
errorRejectVehicle
(
new
RentVehicleBO
(){{
setBookRecordId
(
specialRent
.
getBookRecordId
());
setBookRecordId
(
specialRentDB
.
getBookRecordId
());
}});
//设置车辆上架
ObjectRestResponse
restResponse
=
vehicleFeign
.
updVehicleFeign
(
new
Vehicle
(){{
setId
(
specialRentDB
.
getVehicleId
());
setState
(
STATE_UP
);
}});
baseBiz
.
updateSelectiveById
(
new
SpecialRent
(){{
setId
(
specialRentDB
.
getId
());
setStatus
(
SpecialRent
.
STATUS_CNL
);
}});
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