diff --git a/src/main/java/com/codesdream/ase/controller/activity/ActivityViewerController.java b/src/main/java/com/codesdream/ase/controller/activity/ActivityViewerController.java new file mode 100644 index 0000000..91a112d --- /dev/null +++ b/src/main/java/com/codesdream/ase/controller/activity/ActivityViewerController.java @@ -0,0 +1,36 @@ +package com.codesdream.ase.controller.activity; + +import com.codesdream.ase.component.ASESpringUtil; +import com.codesdream.ase.component.datamanager.JSONParameter; +import com.codesdream.ase.model.activity.Activity; +import com.codesdream.ase.repository.activity.ActivityRepository; +import com.codesdream.ase.service.ActivityService; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.security.Principal; +import java.util.List; + +@Controller +public class ActivityViewerController { + + @Resource + ActivityService activityService; + + @Resource + ActivityRepository activityRepository; + + @RequestMapping(value = "/my/participated", method = RequestMethod.GET) + String showParticipated(Model model, HttpServletRequest request){ + Principal principal = request.getUserPrincipal(); + String username = principal.getName(); + ASESpringUtil aseSpringUtil = new ASESpringUtil(); + activityRepository = aseSpringUtil.getBean(ActivityRepository.class); + //List participatedActivities = activityRepository.findc + return "/my/participated"; + } +}