controller结构微调;活动创建逻辑基本完善;活动查看界面初始编辑;增加校验器;组件结构微调;DAO层微调,增加UserActivityRepository;增加寻找当前登录信息组件,此组件尚未完善。

This commit is contained in:
chuyan 2020-03-14 17:28:01 +08:00 committed by yourtree
parent 47ef733453
commit c1a23adaba

View File

@ -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<Activity> participatedActivities = activityRepository.findc
return "/my/participated";
}
}