Commit 940b7ab0 authored by zhangzhenbang's avatar zhangzhenbang

试探性写了一两个接口

parent 330bfc8d
......@@ -33,7 +33,7 @@ public class ReservationController {
} catch (Exception e) {
LOGGER.error("预约表单提交接口异常:", e);
}
return Response.fail();
return Response.fail("UNKNOW-ERROR", "系统繁忙,请稍后重试。");
}
@PostMapping("/reservations")
......
......@@ -15,7 +15,9 @@ public class Reservation {
private int id;
private String carNumber;
private String outset;
private String detailedOutset;
private String destination;
private String detailedDestination;
private String communityContactName;
private String communityContactPhone;
private String submitCoordinate;
......
......@@ -33,8 +33,8 @@ public interface IdentityInformationMapper {
* @return
*/
@Update("update identity_information set name=#{name},id_card_number=#{idCardNumber}," +
"phone_number=#{phoneNumber},face_image=#{faceImage},toBeijing_date=#{toBeijingDate}," +
"is_worker=#{isWorker} where id =#{id}")
"phone_number=#{phoneNumber},face_image=#{faceImage},toBeijing_date=#{toBeijingDate}" +
" where id =#{id}")
int updateIdentityInfo(IdentityInformation identityInformation);
@Select("select * from identity_information where wechat_openid = #{openid}")
......
......@@ -25,8 +25,8 @@ public interface ReservationMapper {
* @param reservation 预约表信息
* @return int
*/
@Insert("insert into reservation(car_number,outset,destination,community_contact_name,community_contact_phone,submit_coordinate,submit_time,verify_state,identity_id) " +
"values(#{carNumber},#{outset},#{destination},#{communityContactName},#{communityContactPhone},#{submitCoordinate},#{submitTime},#{verifyState},#{identityId}) ")
@Insert("insert into reservation(car_number,outset,detailed_outset,destination,detailed_destination,community_contact_name,community_contact_phone,submit_coordinate,submit_time,verify_state,identity_id) " +
"values(#{carNumber},#{outset},#{detailedOutset},#{destination},#{detailedDestination},#{communityContactName},#{communityContactPhone},#{submitCoordinate},#{submitTime},#{verifyState},#{identityId}) ")
int insertReservation(Reservation reservation);
/**
......
......@@ -46,7 +46,7 @@ public class ReservationServiceImpl implements ReservationService {
return Response.succ();
}
return Response.fail();
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