|
|
@@ -821,9 +821,8 @@ public class WebpageController extends BaseController {
|
|
|
public ModelAndView mainIndex(HttpServletRequest request, ModelAndView modelview) {
|
|
|
// String url = com.goafanti.common.utils.StringUtils.getDomainByHttpRequest(request);
|
|
|
modelview.setViewName("/portal/index");
|
|
|
-
|
|
|
List<JtBusinessCategoryBo> patentCategory = jtBusinessService.getHomeIndex(1,1);
|
|
|
- patentCategory = patentCategory.subList(0, Math.min(6, patentCategory.size()));
|
|
|
+ patentCategory = patentCategory.subList(0, Math.min(7, patentCategory.size()));
|
|
|
modelview.addObject("patentCategory", patentCategory);
|
|
|
List<JtBusinessProject> jtBusinessProjects = (List<JtBusinessProject>) jtBusinessService
|
|
|
.getProjects(null,null, null, null, 8, 1, 1, 2, null, 1, 0, 0, null).getList();
|
|
|
@@ -832,74 +831,21 @@ public class WebpageController extends BaseController {
|
|
|
project.setMaxImgUrl(null);
|
|
|
if (project.getMinImgUrl() != null && project.getMinImgUrl().length() <= 0)
|
|
|
project.setMinImgUrl(null);
|
|
|
-
|
|
|
//去除数据中的标签
|
|
|
if(StringUtils.isNotBlank(project.getIntroduce())){
|
|
|
project.setIntroduce(project.getIntroduce().replaceAll("\\<.*?>", ""));
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
modelview.addObject("projects", jtBusinessProjects);
|
|
|
- List<PolicyResult> policies = (List<PolicyResult>) policyService
|
|
|
- .searchPolicy("", 2, null, null, "web_index", 1, 99, null).getList();
|
|
|
- for (PolicyResult p : policies) {
|
|
|
- if (null != p.getTitleImg() && p.getTitleImg().contains(",")) {
|
|
|
- p.setTitleImg(p.getTitleImg().substring(0, p.getTitleImg().indexOf(",")));
|
|
|
- }
|
|
|
- }
|
|
|
- modelview.addObject("policys", policies);//政策
|
|
|
List<News> newsList = (List<News>) newsService
|
|
|
- .listNews(0, null, null, null, null, null, null, 1, 3, "2", null, null,null).getList();
|
|
|
+ .listNews(0, null, null, null, null, null, null, 1, 8, "2", null, null,null).getList();
|
|
|
modelview.addObject("news", newsList);//资讯
|
|
|
- //
|
|
|
- List<News> subscriptions = (List<News>) newsService
|
|
|
- .listNews(99, null, null, null, null, null, null, 1, 8, "2", null, null,null).getList();
|
|
|
- modelview.addObject("subscription", subscriptions);//技淘观点精选
|
|
|
-
|
|
|
- if (subscriptions != null && subscriptions.size() > 0 && subscriptions.get(0).getSourceUrl() != null
|
|
|
- && subscriptions.get(0).getSourceUrl().contains(".")) {
|
|
|
- modelview.addObject("videoUrl", subscriptions.get(0).getSourceUrl());
|
|
|
- }
|
|
|
-
|
|
|
//获得轮播图数据
|
|
|
List<Banners> blist = bannersService.findBannersList("index", 0, 4, 1);
|
|
|
if(null != blist){
|
|
|
modelview.addObject("bannerlist", blist);
|
|
|
}
|
|
|
- //视频
|
|
|
- AdminVideoBo video = adminVideoService.getIndexVideo(1);
|
|
|
- if(null != video ){
|
|
|
- String url = video.getUrl();
|
|
|
- modelview.addObject("vurl", url);
|
|
|
- }
|
|
|
- // List<AchievementObject>
|
|
|
- // achievementObjects=achievementService.getHotAchievements(9, url,
|
|
|
- // "web_index");
|
|
|
- // modelview.addObject("achievements",achievementObjects);
|
|
|
- //
|
|
|
- //
|
|
|
- //
|
|
|
- //
|
|
|
- // List<DemandListBo> demandListBos=demandService.getHotDemand(9, url,
|
|
|
- // "web_index");
|
|
|
- // for(DemandListBo demandListBo:demandListBos) {
|
|
|
- // if(demandListBo.getPictureUrl()==null ||
|
|
|
- // !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
|
|
|
- // else
|
|
|
- // demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
|
|
|
- // }
|
|
|
- // //专家
|
|
|
- // List<UserIdentityBo>aExperts=userIdentityService.getExperts(8);
|
|
|
- // for(UserIdentityBo u:aExperts) {
|
|
|
- // if(u.getHeadPortraitUrl()!=null &&
|
|
|
- // u.getHeadPortraitUrl().length()<=0) {
|
|
|
- // u.setHeadPortraitUrl(null);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // modelview.addObject("experts",aExperts);
|
|
|
- // modelview.addObject("demands",demandListBos);
|
|
|
+
|
|
|
|
|
|
return modelview;
|
|
|
}
|
|
|
@@ -1212,7 +1158,6 @@ public class WebpageController extends BaseController {
|
|
|
/*
|
|
|
* 交易
|
|
|
*/
|
|
|
- @SuppressWarnings("unchecked")
|
|
|
@RequestMapping(value = "/portal/technologyTrading/tradingIndex")
|
|
|
public ModelAndView patentTrading(HttpServletRequest request, ModelAndView modelAndView) {
|
|
|
String url = com.goafanti.common.utils.StringUtils.getDomainByHttpRequest(request);
|
|
|
@@ -1236,22 +1181,6 @@ public class WebpageController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
modelAndView.addObject("demand", demandListBos);
|
|
|
-
|
|
|
- // 政策
|
|
|
- List<Policy> policies = (List<Policy>) policyService.searchPolicy(null, 2, null, null, "web_index", 1, 5, null)
|
|
|
- .getList();
|
|
|
- modelAndView.addObject("policy", policies);
|
|
|
-
|
|
|
- // 专家
|
|
|
- List<UserIdentityBo> userIdentityBos = userIdentityService.getExperts(3);
|
|
|
- modelAndView.addObject("expert", userIdentityBos);
|
|
|
-
|
|
|
- //获得轮播图数据
|
|
|
- List<Banners> blist = bannersService.findBannersList("tradingIndex", 0, 3, 1);
|
|
|
- if(null != blist){
|
|
|
- modelAndView.addObject("tbannerlist", blist);
|
|
|
- }
|
|
|
-
|
|
|
return modelAndView;
|
|
|
}
|
|
|
|