From c1a23adabae56a64a74b47bf9a805add7c828ab8 Mon Sep 17 00:00:00 2001 From: chuyan <1047381936@qq.com> Date: Sat, 14 Mar 2020 17:28:01 +0800 Subject: [PATCH] =?UTF-8?q?controller=E7=BB=93=E6=9E=84=E5=BE=AE=E8=B0=83?= =?UTF-8?q?=EF=BC=9B=E6=B4=BB=E5=8A=A8=E5=88=9B=E5=BB=BA=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E5=AE=8C=E5=96=84=EF=BC=9B=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E7=95=8C=E9=9D=A2=E5=88=9D=E5=A7=8B=E7=BC=96?= =?UTF-8?q?=E8=BE=91=EF=BC=9B=E5=A2=9E=E5=8A=A0=E6=A0=A1=E9=AA=8C=E5=99=A8?= =?UTF-8?q?=EF=BC=9B=E7=BB=84=E4=BB=B6=E7=BB=93=E6=9E=84=E5=BE=AE=E8=B0=83?= =?UTF-8?q?=EF=BC=9BDAO=E5=B1=82=E5=BE=AE=E8=B0=83=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0UserActivityRepository=EF=BC=9B=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AF=BB=E6=89=BE=E5=BD=93=E5=89=8D=E7=99=BB=E5=BD=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=BB=84=E4=BB=B6=EF=BC=8C=E6=AD=A4=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=B0=9A=E6=9C=AA=E5=AE=8C=E5=96=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity/ActivityViewerController.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/main/java/com/codesdream/ase/controller/activity/ActivityViewerController.java 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"; + } +}