From b0f32d014d2b2f19d9f49e180956cd2212fd08f6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 18 Sep 2018 03:41:48 +0900 Subject: [PATCH] =?UTF-8?q?#103=20=ED=83=80=EC=9E=84=EB=9D=BC=EC=9D=B8=20?= =?UTF-8?q?=EB=AA=A8=EB=8D=B8=EC=97=90=20=EB=8B=89=EB=84=A4=EC=9E=84=20?= =?UTF-8?q?=EA=B0=92=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 타임라인 데이터 요청시, 닉네임 값도 같이 전달 * 기존 쿼리 문 수정(join 사용) --- .../access/web/AccessController.java | 18 --------------- .../timeline/dao/TimeLineMapper.java | 2 +- .../HangangRiver/timeline/model/TimeLine.java | 1 - .../timeline/model/TimeLineForm.java | 9 ++++++++ .../hangang/HangangRiver/TimeLineMapper.xml | 23 +++++++++++++++---- 5 files changed, 29 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/hangang/HangangRiver/access/web/AccessController.java b/src/main/java/com/hangang/HangangRiver/access/web/AccessController.java index 72d88b0..0e1d6b3 100644 --- a/src/main/java/com/hangang/HangangRiver/access/web/AccessController.java +++ b/src/main/java/com/hangang/HangangRiver/access/web/AccessController.java @@ -34,14 +34,6 @@ public class AccessController { private ResponseEntity login(HttpServletRequest request, @RequestBody User user) throws Exception { -// User retUser = submitFacebookLogin(user.getAccess_token(), user); -// -// if(retUser == null) { -// throw new LoginValidateException(); -// } -// -// return ResponseEntity.ok().body(retUser); - if(isValidFacebookUser(user.getAccess_token(), user.getUser_id())) { User loginedUser = userLogin(user); @@ -69,16 +61,6 @@ private ResponseEntity register(HttpServletRequest request, @RequestBody U throw new NotExistFacebookUserException(); } -// -// private User submitFacebookLogin(String accessToken, User user) -// throws Exception { -// if (isValidFacebookUser(accessToken, user.getUser_id())){ -// facebookUser.setFcm_token(user.getFcm_token()); -// return checkUserInfo(facebookUser); -// } -// -// throw new NotExistFacebookUserException(); -// } public boolean isValidFacebookUser(String accessToken, String userID) throws Exception { diff --git a/src/main/java/com/hangang/HangangRiver/timeline/dao/TimeLineMapper.java b/src/main/java/com/hangang/HangangRiver/timeline/dao/TimeLineMapper.java index adfd36c..8a24b03 100644 --- a/src/main/java/com/hangang/HangangRiver/timeline/dao/TimeLineMapper.java +++ b/src/main/java/com/hangang/HangangRiver/timeline/dao/TimeLineMapper.java @@ -11,7 +11,7 @@ public interface TimeLineMapper { int insert(TimeLine timeLine); void delete(int timeLine_seq); List selectTimeLineList(TimeLineForm timeLineForm); - List selectTimeLineListWithOffset(@Param("creation_time") String meeting_time, + List selectTimeLineListWithOffset(@Param("creation_time") String creation_time, @Param("offset") Integer offset, @Param("limit") Integer limit); } diff --git a/src/main/java/com/hangang/HangangRiver/timeline/model/TimeLine.java b/src/main/java/com/hangang/HangangRiver/timeline/model/TimeLine.java index c301605..e252d39 100644 --- a/src/main/java/com/hangang/HangangRiver/timeline/model/TimeLine.java +++ b/src/main/java/com/hangang/HangangRiver/timeline/model/TimeLine.java @@ -66,5 +66,4 @@ public String toString() { return "TimeLine [timeline_seq=" + timeline_seq + ", user_id=" + user_id + ", location=" + location + ", imageurl=" + imageurl + ", content=" + content + ", creation_time=" + creation_time + "]"; } - } diff --git a/src/main/java/com/hangang/HangangRiver/timeline/model/TimeLineForm.java b/src/main/java/com/hangang/HangangRiver/timeline/model/TimeLineForm.java index b91fe83..4d56a0e 100644 --- a/src/main/java/com/hangang/HangangRiver/timeline/model/TimeLineForm.java +++ b/src/main/java/com/hangang/HangangRiver/timeline/model/TimeLineForm.java @@ -3,6 +3,7 @@ public class TimeLineForm extends TimeLine { private String startTime; private String endTime; + private String nickname; public String getStartTime() { return startTime; @@ -20,6 +21,14 @@ public void setEndTime(String endTime) { this.endTime = endTime; } + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } + @Override public String toString() { return "MeetingDetailForm [startTime=" + startTime + ", endTime=" + endTime + "]"; diff --git a/src/main/resources/com/hangang/HangangRiver/TimeLineMapper.xml b/src/main/resources/com/hangang/HangangRiver/TimeLineMapper.xml index f7df8ec..28c00c7 100644 --- a/src/main/resources/com/hangang/HangangRiver/TimeLineMapper.xml +++ b/src/main/resources/com/hangang/HangangRiver/TimeLineMapper.xml @@ -34,14 +34,29 @@ + + + + + + + + + + + \ No newline at end of file