Commit 095f4702 authored by zhangzhenbang's avatar zhangzhenbang

单独实名认证

parent 196497a7
......@@ -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 IdentityInformationService identityService;
private IdentityInformationMapper 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment