|
@@ -0,0 +1,53 @@
|
|
|
|
|
+package com.goafanti.portal.controller;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
|
|
+
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
+
|
|
|
|
|
+import com.goafanti.lecture.bo.BigShotLectureListBo;
|
|
|
|
|
+import com.goafanti.lecture.service.LectureService;
|
|
|
|
|
+import com.goafanti.star.bo.BigShotStarListBo;
|
|
|
|
|
+import com.goafanti.star.service.StarService;
|
|
|
|
|
+import com.goafanti.user.service.UserInterestService;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 大咖说
|
|
|
|
|
+ */
|
|
|
|
|
+@RestController
|
|
|
|
|
+public class PortalBigShotController {
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private StarService starService;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private UserInterestService userInterestService;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private LectureService lectureService;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 科技明星展示
|
|
|
|
|
+ */
|
|
|
|
|
+ // @RequestMapping(value = "/portal/scienceTechnology/bigShot", method =
|
|
|
|
|
+ // RequestMethod.GET)
|
|
|
|
|
+ public ModelAndView bigShot() {
|
|
|
|
|
+ ModelAndView mv = new ModelAndView();
|
|
|
|
|
+ List<BigShotStarListBo> starList = starService.listBigShotStar();
|
|
|
|
|
+ if (null != starList && starList.size() > 0) {
|
|
|
|
|
+ Integer fansNum = 0;
|
|
|
|
|
+ for (BigShotStarListBo bo : starList) {
|
|
|
|
|
+ if (StringUtils.isNotBlank(bo.getUid())) {
|
|
|
|
|
+ fansNum = userInterestService.countByToUid(bo.getUid());
|
|
|
|
|
+ bo.setFansNum(fansNum);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ mv.addObject("starList", starList);
|
|
|
|
|
+ }
|
|
|
|
|
+ List<BigShotLectureListBo> lectureList = lectureService.listBigShotLecture();
|
|
|
|
|
+ mv.addObject("lectureList", lectureList);
|
|
|
|
|
+ mv.setViewName("/portal/scienceTechnology/bigShot");
|
|
|
|
|
+ return mv;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|