|
|
@@ -16,6 +16,7 @@ import com.goafanti.achievement.service.AchievementService;
|
|
|
import com.goafanti.banners.enums.BannersType;
|
|
|
import com.goafanti.banners.service.BannersService;
|
|
|
import com.goafanti.common.bo.fieldGlossoryBo;
|
|
|
+import com.goafanti.common.constant.PageConstants;
|
|
|
import com.goafanti.common.model.Banners;
|
|
|
import com.goafanti.common.model.Demand;
|
|
|
import com.goafanti.common.utils.LimitLengthUtil;
|
|
|
@@ -422,6 +423,7 @@ public class WebpageController extends BaseController {
|
|
|
* */
|
|
|
@RequestMapping(value = "/portal/demand")
|
|
|
public ModelAndView demand(HttpServletRequest request, ModelAndView modelview) {
|
|
|
+ String showLocation="web_demand_main";
|
|
|
String url =com.goafanti.common.utils.StringUtils.getDomainByHttpRequest(request);
|
|
|
modelview.setViewName("/portal/technologyTrading/demand");
|
|
|
//行业
|
|
|
@@ -429,12 +431,12 @@ public class WebpageController extends BaseController {
|
|
|
modelview.addObject("industryList", industryList);
|
|
|
|
|
|
//最新需求
|
|
|
- List<DemandListBo> recentDemandList=demandService.recentDemand(5,url);
|
|
|
+ List<DemandListBo> recentDemandList=demandService.recentDemand(5,url,showLocation);
|
|
|
LimitLengthUtil.limiteDemandCompanyAndName(recentDemandList, 18, 18);
|
|
|
modelview.addObject("recentDemandList",recentDemandList);
|
|
|
//
|
|
|
// //加急需求
|
|
|
- List<DemandListBo> urgentDemand=demandService.getUrgentDemand(5,url);
|
|
|
+ List<DemandListBo> urgentDemand=demandService.getUrgentDemand(5,url,showLocation);
|
|
|
List<DemandListBo> urgentDemand2=urgentDemand.subList(0, Math.min(2, urgentDemand.size()));
|
|
|
List<DemandListBo> urgentDemand3=urgentDemand.subList( Math.min(2, urgentDemand.size()), Math.min(5, urgentDemand.size()));
|
|
|
System.out.print("u2:"+urgentDemand2.size()+" u3:"+urgentDemand3.size());
|
|
|
@@ -444,7 +446,7 @@ public class WebpageController extends BaseController {
|
|
|
modelview.addObject("urgentDemand3",urgentDemand3);
|
|
|
|
|
|
//热点需求
|
|
|
- List<DemandListBo> hotDemand=demandService.getHotDemand(5,url);
|
|
|
+ List<DemandListBo> hotDemand=demandService.getHotDemand(5,url,showLocation);
|
|
|
List<DemandListBo> hotDemand2=hotDemand.subList(0, Math.min(2, hotDemand.size()));
|
|
|
List<DemandListBo> hotDemand3=hotDemand.subList( Math.min(2, hotDemand.size()), Math.min(5, hotDemand.size()));
|
|
|
System.out.print("u2:"+hotDemand2.size()+" u3:"+hotDemand3.size());
|
|
|
@@ -455,7 +457,7 @@ public class WebpageController extends BaseController {
|
|
|
|
|
|
|
|
|
//企业技术需求
|
|
|
- List<DemandListBo> eightMaxCompanyDemand=demandService.companyDemand(8,url);
|
|
|
+ List<DemandListBo> eightMaxCompanyDemand=demandService.companyDemand(8,url,showLocation);
|
|
|
for(DemandListBo demandListBo:eightMaxCompanyDemand) {
|
|
|
if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
|
|
|
else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
|
|
|
@@ -463,7 +465,7 @@ public class WebpageController extends BaseController {
|
|
|
modelview.addObject("companyDemandList",eightMaxCompanyDemand);
|
|
|
|
|
|
//地区产业需求 最多4个
|
|
|
- List<DemandListBo> fourMaxareaDemand=demandService.areaDemand(4,url);
|
|
|
+ List<DemandListBo> fourMaxareaDemand=demandService.areaDemand(4,url,showLocation);
|
|
|
for(DemandListBo demandListBo:fourMaxareaDemand) {
|
|
|
if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
|
|
|
else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
|
|
|
@@ -472,7 +474,7 @@ public class WebpageController extends BaseController {
|
|
|
modelview.addObject("areaDemandList",fourMaxareaDemand);
|
|
|
|
|
|
//产学研需求 最多9个
|
|
|
- List<DemandListBo> nightMaxProLearnStudyDemand=demandService.proLearnStudyDemand(9,url);
|
|
|
+ List<DemandListBo> nightMaxProLearnStudyDemand=demandService.proLearnStudyDemand(9,url,showLocation);
|
|
|
for(DemandListBo demandListBo:nightMaxProLearnStudyDemand) {
|
|
|
if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
|
|
|
else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
|
|
|
@@ -482,7 +484,7 @@ public class WebpageController extends BaseController {
|
|
|
modelview.addObject("proLearnStudyDemandList",nightMaxProLearnStudyDemand);
|
|
|
|
|
|
//研产资金需求 最多4个
|
|
|
- List<DemandListBo> fourMaxFundDemand=demandService.getFundCrowdDemand(4,url);
|
|
|
+ List<DemandListBo> fourMaxFundDemand=demandService.getFundCrowdDemand(4,url,showLocation);
|
|
|
for(DemandListBo demandListBo:fourMaxFundDemand) {
|
|
|
if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
|
|
|
else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
|
|
|
@@ -491,7 +493,7 @@ public class WebpageController extends BaseController {
|
|
|
modelview.addObject("fundDemandList",fourMaxFundDemand);
|
|
|
|
|
|
//技术人才需求
|
|
|
- List<DemandListBo> sixMaxPersonnelDemand=demandService.getPersonnelDemand(6,url);
|
|
|
+ List<DemandListBo> sixMaxPersonnelDemand=demandService.getPersonnelDemand(6,url,showLocation);
|
|
|
// List <DemandListBo>fourMaxPersonnelDemand=personnelDemand.subList(0,Math.min(6, personnelDemand.size()));
|
|
|
for(DemandListBo demandListBo:sixMaxPersonnelDemand) {
|
|
|
if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
|
|
|
@@ -509,14 +511,14 @@ public class WebpageController extends BaseController {
|
|
|
DemandListBo demand=demandService.getDemandDetail(id, type);
|
|
|
int countInterest=demandService.getInterestCount(id);
|
|
|
demand.setCountInterest(countInterest+"");
|
|
|
- modelAndView.addObject("demand",demand);
|
|
|
+ modelAndView.addObject("demand",demand);
|
|
|
|
|
|
//精品需求
|
|
|
- List<DemandListBo>boutiqueDemandList=LimitLengthUtil.LimitListLengthRandomly(demandService.getBoutiqueDemandList(10,url),3,10);
|
|
|
+ List<DemandListBo>boutiqueDemandList=LimitLengthUtil.LimitListLengthRandomly(demandService.getBoutiqueDemandList(10,url,""),3,10);
|
|
|
modelAndView.addObject("reboutiquedemand",boutiqueDemandList);
|
|
|
|
|
|
//猜你喜欢
|
|
|
- List<DemandListBo>guessYouLikeList=LimitLengthUtil.LimitListLengthRandomly(demandService.recentDemand(10, url), 4, 10);
|
|
|
+ List<DemandListBo>guessYouLikeList=LimitLengthUtil.LimitListLengthRandomly(demandService.recentDemand(10, url,""), 4, 10);
|
|
|
modelAndView.addObject("redemandlist",guessYouLikeList);
|
|
|
|
|
|
//view
|