|
|
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
+import com.goafanti.achievement.service.AchievementInterestService;
|
|
|
import com.goafanti.achievement.service.AchievementService;
|
|
|
import com.goafanti.app.bo.consultantListBo;
|
|
|
import com.goafanti.banners.enums.BannersType;
|
|
|
@@ -22,17 +23,23 @@ import com.goafanti.common.bo.PolicyEntity;
|
|
|
import com.goafanti.common.bo.fieldGlossoryBo;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.constant.PageConstants;
|
|
|
+import com.goafanti.common.dao.ProjectInterestMapper;
|
|
|
+import com.goafanti.common.model.AchievementInterest;
|
|
|
import com.goafanti.common.model.Banners;
|
|
|
+import com.goafanti.common.model.Demand;
|
|
|
+import com.goafanti.common.model.DemandInterest;
|
|
|
import com.goafanti.common.model.IndustryCategory;
|
|
|
import com.goafanti.common.model.JtBusinessCategory;
|
|
|
import com.goafanti.common.model.JtBusinessProject;
|
|
|
import com.goafanti.common.model.News;
|
|
|
import com.goafanti.common.model.Policy;
|
|
|
+import com.goafanti.common.model.ProjectInterest;
|
|
|
import com.goafanti.common.model.User;
|
|
|
import com.goafanti.common.utils.LimitLengthUtil;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.demand.bo.DemandListBo;
|
|
|
+import com.goafanti.demand.service.DemandInterestService;
|
|
|
import com.goafanti.demand.service.DemandService;
|
|
|
import com.goafanti.user.bo.UserIdentityBo;
|
|
|
import com.goafanti.user.service.OrganizationIdentityService;
|
|
|
@@ -74,6 +81,15 @@ public class WebpageController extends BaseController {
|
|
|
|
|
|
@Resource
|
|
|
private UserService userService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private AchievementInterestService achievementInterestService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private DemandInterestService demandInterestService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private ProjectInterestMapper projectInterestMapper;
|
|
|
|
|
|
@RequestMapping(value = "/user/account/index", method = RequestMethod.GET)
|
|
|
public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
|
|
|
@@ -363,6 +379,12 @@ public class WebpageController extends BaseController {
|
|
|
JtBusinessCategory jtBusinessCategory=jtBusinessService.getCategoryById(jtBusinessProject.getCategoryId());
|
|
|
if(jtBusinessCategory!=null && jtBusinessCategory.getModule()!=null)modelview.addObject("module",jtBusinessCategory.getModule());
|
|
|
else modelview.addObject("module",0);
|
|
|
+
|
|
|
+ //是否关注
|
|
|
+ if(StringUtils.isNotBlank(TokenManager.getUserId())) {
|
|
|
+ int projectInterest=projectInterestMapper.checkUidAndDid(id, TokenManager.getUserId());
|
|
|
+ if(projectInterest>0)modelview.addObject("interested",true);
|
|
|
+ }
|
|
|
return modelview;
|
|
|
}
|
|
|
|
|
|
@@ -543,8 +565,8 @@ public class WebpageController extends BaseController {
|
|
|
String url =com.goafanti.common.utils.StringUtils.getDomainByHttpRequest(request);
|
|
|
modelview.setViewName("/portal/index");
|
|
|
@SuppressWarnings("unchecked")
|
|
|
- List<JtBusinessProject> jtBusinessProjects=(List<JtBusinessProject>) jtBusinessService.getProjects(null, null, null, 5, 1, 1, 2, 0, 1).getList();
|
|
|
- for(JtBusinessProject project:jtBusinessProjects) {
|
|
|
+ List<JtBusinessProject> jtBusinessProjects=(List<JtBusinessProject>) jtBusinessService.getProjects(null, null, null, 5, 1, 1, 2, 0, 1,0,0).getList();
|
|
|
+ for(JtBusinessProject project:jtBusinessProjects) {
|
|
|
if(project.getMaxImgUrl()!=null && project.getMaxImgUrl().length()<=0)project.setMaxImgUrl(null);
|
|
|
if(project.getMinImgUrl()!=null && project.getMinImgUrl().length()<=0)project.setMinImgUrl(null);
|
|
|
}
|
|
|
@@ -697,6 +719,12 @@ public class WebpageController extends BaseController {
|
|
|
|
|
|
//view
|
|
|
modelAndView.setViewName("/portal/technologyTrading/demandDetail");
|
|
|
+
|
|
|
+ //是否关注
|
|
|
+ if(StringUtils.isNotBlank(TokenManager.getUserId())) {
|
|
|
+ DemandInterest demandInterest=demandInterestService.selectDemandInterestByUidAndDemandId(TokenManager.getUserId(), id);
|
|
|
+ if(demandInterest!=null)modelAndView.addObject("interested",true);
|
|
|
+ }
|
|
|
return modelAndView;
|
|
|
}
|
|
|
|
|
|
@@ -747,6 +775,21 @@ public class WebpageController extends BaseController {
|
|
|
modelAndView.addObject("guess",guess);
|
|
|
//view
|
|
|
modelAndView.setViewName("/portal/technologyTrading/achievementDetail");
|
|
|
+
|
|
|
+ //是否关注
|
|
|
+ if(StringUtils.isNotBlank(TokenManager.getUserId())){
|
|
|
+ AchievementInterest achievementInterest=achievementInterestService.selectAchievementInterestByUidAndAchievementId(TokenManager.getUserId(), id);
|
|
|
+ if(achievementInterest!=null)modelAndView.addObject("isInterested",true);
|
|
|
+ }
|
|
|
+ return modelAndView;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping(value = "/portal/service/patentList")
|
|
|
+ public ModelAndView patentList(HttpServletRequest request, ModelAndView modelAndView,String id, Integer type) {
|
|
|
+
|
|
|
+ modelAndView.setViewName("/portal/service/patentList");
|
|
|
+
|
|
|
return modelAndView;
|
|
|
}
|
|
|
|