Commit 3d5cba66 authored by zhangzhenbang's avatar zhangzhenbang

试探性写了一两个接口

parent 23346127
...@@ -12,7 +12,9 @@ import lombok.Data; ...@@ -12,7 +12,9 @@ import lombok.Data;
@Data @Data
public class ReservationsDisplayDTO { public class ReservationsDisplayDTO {
private int reservationId;
private String name; private String name;
private String toBeijingDate; private String toBeijingDate;
private String submitCoordinate; private String submitCoordinate;
private int identityId;
} }
...@@ -44,6 +44,7 @@ public interface IdentityInformationMapper { ...@@ -44,6 +44,7 @@ public interface IdentityInformationMapper {
@Select("select * from identity_information where wechat_openid = #{openid}") @Select("select * from identity_information where wechat_openid = #{openid}")
IdentityInformation getAllInfoByOpenid(String openid); IdentityInformation getAllInfoByOpenid(String openid);
@Select("select info.name,info.toBeijing_date,r.submit_coordinate from identity_information AS info LEFT JOIN reservation AS r ON info.id=r.identity_id WHERE info.id = #{id} ") @Select("select r.id as reservationId,info.name,info.toBeijing_date,r.submit_coordinate,r.identity_id " +
"from identity_information AS info LEFT JOIN reservation AS r ON info.id=r.identity_id WHERE info.id = #{id} ")
List<ReservationsDisplayDTO> selectReservatinsByIdentityId(IdentityInformation info); List<ReservationsDisplayDTO> selectReservatinsByIdentityId(IdentityInformation info);
} }
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