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 44c5ce2..4138333 100644 --- a/src/main/java/com/hangang/HangangRiver/access/web/AccessController.java +++ b/src/main/java/com/hangang/HangangRiver/access/web/AccessController.java @@ -52,7 +52,6 @@ private User submitFacebookLogin(String accessToken, String user_id) return userInfo; } - public User faceBookUserInfoValidate(String accessToken, String user_id) throws Exception { BufferedReader in = null; diff --git a/src/main/java/com/hangang/HangangRiver/meeting/dao/ActivityMapper.java b/src/main/java/com/hangang/HangangRiver/meeting/dao/ActivityMapper.java new file mode 100644 index 0000000..12cfd70 --- /dev/null +++ b/src/main/java/com/hangang/HangangRiver/meeting/dao/ActivityMapper.java @@ -0,0 +1,9 @@ +package com.hangang.HangangRiver.meeting.dao; + +import com.hangang.HangangRiver.meeting.model.Activity; + +import java.util.List; + +public interface ActivityMapper { + List getAllActivities(); +} diff --git a/src/main/java/com/hangang/HangangRiver/meeting/dao/CommentMapper.java b/src/main/java/com/hangang/HangangRiver/meeting/dao/CommentMapper.java index 532bb28..7942791 100644 --- a/src/main/java/com/hangang/HangangRiver/meeting/dao/CommentMapper.java +++ b/src/main/java/com/hangang/HangangRiver/meeting/dao/CommentMapper.java @@ -5,7 +5,7 @@ import com.hangang.HangangRiver.meeting.model.Comment; public interface CommentMapper { - public void insert(Comment comment); - public void delete(int comment_seq); - public List selectCommentList(int meeting_seq); + void insert(Comment comment); + void delete(int comment_seq); + List selectCommentList(int meeting_seq); } diff --git a/src/main/java/com/hangang/HangangRiver/meeting/model/Activity.java b/src/main/java/com/hangang/HangangRiver/meeting/model/Activity.java new file mode 100644 index 0000000..63b42d4 --- /dev/null +++ b/src/main/java/com/hangang/HangangRiver/meeting/model/Activity.java @@ -0,0 +1,31 @@ +package com.hangang.HangangRiver.meeting.model; + +public class Activity { + private int activity_seq; + private String name; + private String description; + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public int getActivity_seq() { + return activity_seq; + } + + public void setActivity_seq(int activity_seq) { + this.activity_seq = activity_seq; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/src/main/java/com/hangang/HangangRiver/meeting/service/ActivityService.java b/src/main/java/com/hangang/HangangRiver/meeting/service/ActivityService.java new file mode 100644 index 0000000..0cf482b --- /dev/null +++ b/src/main/java/com/hangang/HangangRiver/meeting/service/ActivityService.java @@ -0,0 +1,18 @@ +package com.hangang.HangangRiver.meeting.service; + +import com.hangang.HangangRiver.meeting.dao.ActivityMapper; +import com.hangang.HangangRiver.meeting.model.Activity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class ActivityService { + @Autowired + public ActivityMapper activityMapper; + + public List getAllActivities() { + return activityMapper.getAllActivities(); + } +} diff --git a/src/main/java/com/hangang/HangangRiver/meeting/web/ActivityController.java b/src/main/java/com/hangang/HangangRiver/meeting/web/ActivityController.java new file mode 100644 index 0000000..9b23290 --- /dev/null +++ b/src/main/java/com/hangang/HangangRiver/meeting/web/ActivityController.java @@ -0,0 +1,21 @@ +package com.hangang.HangangRiver.meeting.web; + +import com.hangang.HangangRiver.meeting.model.Activity; +import com.hangang.HangangRiver.meeting.service.ActivityService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@RestController +@RequestMapping("/activity") +public class ActivityController { + @Autowired + ActivityService activityService; + + @GetMapping("/all") + private ResponseEntity> getAllActivities() { + return ResponseEntity.ok().body(activityService.getAllActivities()); + } +} \ No newline at end of file diff --git a/src/main/resources/com/hangang/HangangRiver/ActivityMapper.xml b/src/main/resources/com/hangang/HangangRiver/ActivityMapper.xml new file mode 100644 index 0000000..7011381 --- /dev/null +++ b/src/main/resources/com/hangang/HangangRiver/ActivityMapper.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file