|
|
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
+import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.controller.BaseController;
|
|
|
import com.goafanti.common.model.User;
|
|
|
@@ -35,13 +36,14 @@ public class PortalStarController extends BaseController {
|
|
|
@Resource
|
|
|
private EngagedFieldGlossoryService engagedFieldGlossoryService;
|
|
|
|
|
|
- @RequestMapping(value = "/portal/scienceTechnology/star", method = RequestMethod.GET)
|
|
|
+ @RequestMapping(value = "/portal/scienceTechnology/star", method = RequestMethod.GET)
|
|
|
public ModelAndView star() {
|
|
|
ModelAndView mv = new ModelAndView();
|
|
|
List<LectureListBo> lectureDynamicList = lectureService
|
|
|
.listDynamic(AFTConstants.LECTURE_DYNAMIC_LIST_CACHE_KEY);
|
|
|
mv.addObject("lectureDynamicList", lectureDynamicList);
|
|
|
- List<HotStarListBo> starList = starService.listStarList(TokenManager.getToken() instanceof User ? TokenManager.getUserId() : null);
|
|
|
+ List<HotStarListBo> starList = starService
|
|
|
+ .listStarList(TokenManager.getToken() instanceof User ? TokenManager.getUserId() : null);
|
|
|
if (null != starList && starList.size() > 0) {
|
|
|
for (HotStarListBo bo : starList) {
|
|
|
if (StringUtils.isNotBlank(bo.getUid())) {
|
|
|
@@ -66,4 +68,16 @@ public class PortalStarController extends BaseController {
|
|
|
mv.setViewName("/portal/scienceTechnology/star");
|
|
|
return mv;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 当前用户关注"科技明星"页面科技明星状态
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/portal/scienceTechnology/star/interestStatus", method = RequestMethod.GET)
|
|
|
+ public Result interestStatus() {
|
|
|
+ Result res = new Result();
|
|
|
+ if (TokenManager.getToken() instanceof User) {
|
|
|
+ res.setData(starService.findStarInterestStatus(TokenManager.getUserId()));
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
}
|