Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beijing-vehicleflow
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangzhenbang
beijing-vehicleflow
Commits
095f4702
Commit
095f4702
authored
Feb 24, 2020
by
zhangzhenbang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单独实名认证
parent
196497a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
ReservationServiceImpl.java
...ijingvehicleflow/service/impl/ReservationServiceImpl.java
+11
-5
No files found.
src/main/java/com/yingxin/beijingvehicleflow/service/impl/ReservationServiceImpl.java
View file @
095f4702
...
...
@@ -3,6 +3,7 @@ package com.yingxin.beijingvehicleflow.service.impl;
import
com.yingxin.beijingvehicleflow.dto.ReservationInfoDTO
;
import
com.yingxin.beijingvehicleflow.entity.IdentityInformation
;
import
com.yingxin.beijingvehicleflow.entity.Reservation
;
import
com.yingxin.beijingvehicleflow.mapper.IdentityInformationMapper
;
import
com.yingxin.beijingvehicleflow.mapper.ReservationMapper
;
import
com.yingxin.beijingvehicleflow.response.Response
;
import
com.yingxin.beijingvehicleflow.service.IdentityInformationService
;
...
...
@@ -35,19 +36,24 @@ public class ReservationServiceImpl implements ReservationService {
private
ReservationMapper
reservationMapper
;
@Autowired
private
IdentityInformation
Service
identityService
;
private
IdentityInformation
Mapper
identityInformationMapper
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Response
insertIdentityInfoAndReservation
(
ReservationInfoDTO
info
)
throws
Exception
{
if
(
identityService
.
isUpdateIdentityInfoSucc
(
info
.
getIdentityInformation
())
&&
isInsertReservationSucc
(
info
.
getReservation
()))
{
return
Response
.
succ
();
if
(
identityInformationMapper
.
updateIdentityInfo
(
info
.
getIdentityInformation
())
==
1
)
{
Reservation
reservation
=
info
.
getReservation
();
Date
date
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
reservation
.
setSubmitTime
(
sdf
.
format
(
date
));
if
(
reservationMapper
.
insertReservation
(
reservation
)
==
1
)
{
return
Response
.
succ
();
}
}
throw
new
Exception
();
return
Response
.
fail
(
"UNKNOW-ERROR"
,
"系统繁忙,请稍后重试。"
);
}
@Override
...
...
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