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
802bfb1c
Commit
802bfb1c
authored
Aug 12, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改租車訂單地址,修改车辆预定时添加订单号
parent
64176698
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
ResultCode.java
...thub/wxiaoqi/security/common/util/process/ResultCode.java
+5
-2
resultcod.properties
...common/src/main/resources/properties/resultcod.properties
+2
-0
VehicleBiz.java
...c/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
+8
-0
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/process/ResultCode.java
View file @
802bfb1c
...
...
@@ -18,8 +18,11 @@ public class ResultCode {
// 车辆预定失败,请重试
public
static
int
BOOKED_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"BOOKED_FAILED_CODE"
));
// 车辆预定失败,请重试
public
static
int
ONLY_BOOK_FROM_TODAY
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"BOOKED_FAILED_CODE"
));
//预定时间不能为空 DATE_TIME_IS_NULL
public
static
int
DATE_TIME_IS_NULL
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"DATE_TIME_IS_NULL"
));
// 预定时间不能小于当前时间
public
static
int
ONLY_BOOK_FROM_TODAY
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ONLY_BOOK_FROM_TODAY"
));
// 添加车辆失败,请重试
public
static
int
ADD_VEHICLE_FAIL
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ADD_VEHICLE_FAIL"
));
...
...
ace-common/src/main/resources/properties/resultcod.properties
View file @
802bfb1c
...
...
@@ -222,4 +222,6 @@ ADD_VEHICLE_FAIL = 4009
UPDATE_VEHICLE_FAIL
=
4010
4010
=
修改车辆失败,请重试
DATE_TIME_IS_NULL
=
4011
4011
=
预定时间不能为空
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBiz.java
View file @
802bfb1c
...
...
@@ -327,6 +327,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
checkIfVehicleExists
(
bookVehicleVo
.
getVehicleId
());
//提取日期和相应的预定目标日期
Map
<
String
,
List
<
String
>>
yearMonthAndDate
=
Maps
.
newHashMap
();
//预定时间不能为空
if
(
StringUtils
.
isBlank
(
bookVehicleVo
.
getBookStartDate
())
||
StringUtils
.
isBlank
(
bookVehicleVo
.
getBookEndDate
())){
throw
new
BaseException
(
ResultCode
.
DATE_TIME_IS_NULL
);
}
String
[]
bookStartDateArray
=
bookVehicleVo
.
getBookStartDate
().
split
(
" "
);
String
[]
bookEndDateArray
=
bookVehicleVo
.
getBookEndDate
().
split
(
" "
);
...
...
@@ -412,6 +416,10 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
checkIfVehicleExists
(
bookVehicleVo
.
getVehicleId
());
//提取日期和相应的预定目标日期
Map
<
String
,
List
<
String
>>
yearMonthAndDate
=
Maps
.
newHashMap
();
//预定时间不能为空
if
(
StringUtils
.
isBlank
(
bookVehicleVo
.
getBookStartDate
())
||
StringUtils
.
isBlank
(
bookVehicleVo
.
getBookEndDate
())){
throw
new
BaseException
(
ResultCode
.
DATE_TIME_IS_NULL
);
}
DateTime
startDay
=
DateTime
.
parse
(
bookVehicleVo
.
getBookStartDate
(),
DATE_TIME_FORMATTER
);
DateTime
endDay
=
DateTime
.
parse
(
bookVehicleVo
.
getBookEndDate
(),
DATE_TIME_FORMATTER
);
...
...
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