Ver código fonte

首页数据更新,跳转页面填写

anderx 7 anos atrás
pai
commit
4224e535c1

+ 0 - 38
src/main/java/com/goafanti/app/bo/HomeImages.java

@@ -1,38 +0,0 @@
-package com.goafanti.app.bo;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-public class HomeImages {
-	
-
-	public String img1="/customer_sys_file/1/GGN1.jpg";
-	
-	public String img2="/customer_sys_file/1/GG2.jpg";
-	
-	public String img3="/customer_sys_file/1/GG3.jpg";
-	
-	public String img4="/customer_sys_file/1/GG4.jpg";
-	
-	private List<HomeImgBo> imagers=new ArrayList<>();
-	
-	public  List<HomeImgBo> getImagers(HttpServletRequest request) {
-		String url=request.getServerName();
-		
-		if (url.contains("uat")) {
-			imagers.add(new HomeImgBo("14bd3573-7d09-4dcd-bfa0-10ad3285e3e9",img1,"成果"));
-			imagers.add(new HomeImgBo("e9c9577f-5b01-446a-b5f8-7667be957b4a",img2,"需求"));
-			imagers.add(new HomeImgBo("2023b591-c5fd-4c24-a5ca-a7eb491e8d9e",img3,"专家"));
-			imagers.add(new HomeImgBo(null,img4,null));
-		}else {
-			imagers.add(new HomeImgBo("065de736-9b40-4678-93bc-e95f5e8c529b",img1,"成果"));
-			imagers.add(new HomeImgBo("739aed36-6ee6-406f-b03e-97d719b484b9",img2,"需求"));
-			imagers.add(new HomeImgBo("af430be8-7752-43ac-ad82-27f02be317e6",img3,"专家"));
-			imagers.add(new HomeImgBo(null,img4,null));
-		}
-		return imagers;
-	}
-	
-}

+ 13 - 17
src/main/java/com/goafanti/app/bo/HomeImgBo.java

@@ -1,35 +1,31 @@
 package com.goafanti.app.bo;
 
 public class HomeImgBo {
-	/**跳转ID*/
-	private String id;
+	
 	/**轮播图片*/
 	private String imgUrl;
-	/**类型*/
-	private String type;
+	/**跳转地址*/
+	private String jumpUrl;
 	
-	HomeImgBo(String id,String imgUrl,String type){
-		this.id = id;
+	 public HomeImgBo(String imgUrl,String jumpUrl){
 		this.imgUrl = imgUrl;
-		this.type = type;
-	}
-	public String getId() {
-		return id;
-	}
-	public void setId(String id) {
-		this.id = id;
+		this.jumpUrl = jumpUrl;
 	}
+	
 	public String getImgUrl() {
 		return imgUrl;
 	}
 	public void setImgUrl(String imgUrl) {
 		this.imgUrl = imgUrl;
 	}
-	public String getType() {
-		return type;
+
+	public String getJumpUrl() {
+		return jumpUrl;
 	}
-	public void setType(String type) {
-		this.type = type;
+
+	public void setJumpUrl(String jumpUrl) {
+		this.jumpUrl = jumpUrl;
 	}
+
 	
 	}

+ 18 - 14
src/main/java/com/goafanti/app/controller/OpenAppHomeController.java

@@ -1,6 +1,8 @@
 package com.goafanti.app.controller;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import javax.annotation.Resource;
@@ -11,7 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.goafanti.app.service.AppHomePageService;
+import com.goafanti.app.bo.HomeImgBo;
 import com.goafanti.business.service.JtBusinessService;
 import com.goafanti.business.service.JtTagService;
 import com.goafanti.comment.bo.CommentResult;
@@ -25,8 +27,7 @@ import com.goafanti.common.utils.StringUtils;
 @RestController
 @RequestMapping(path = "/open/app/home")
 public class OpenAppHomeController extends BaseApiController{
-	@Resource
-	private AppHomePageService	appHomePageService;
+	
 	@Resource
 	private JtBusinessService	jtBusinessService;
 	@Resource
@@ -35,15 +36,8 @@ public class OpenAppHomeController extends BaseApiController{
 	private JtTagService	jtTagService;
 	
 	
-	/**App首页轮播图、导航、知产*/
-	@RequestMapping(value = "/getHomePageData", method = RequestMethod.GET)
-	public Result getHomePageData(HttpServletRequest  request){
-		Result res = new Result();
-		res.setData(appHomePageService.getAppHomePage(request));
-		return res;
-	}
 	
-	/**技淘推荐*/
+	/**技淘推荐*//*
 	@RequestMapping(value = "/getHomeRecommended", method = RequestMethod.GET)
 	public Result getHomeRecommended(Integer type){
 		Result res = new Result();
@@ -53,7 +47,8 @@ public class OpenAppHomeController extends BaseApiController{
 		}
 		res.setData(appHomePageService.getHomeRecommended(type));
 		return res;
-	}
+	}*/
+	
 	/**
 	 * 项目列表
 	 * @param topId
@@ -141,8 +136,8 @@ public class OpenAppHomeController extends BaseApiController{
 		Result result=new Result();
 		if (null==pageNo)pageNo=1;
 		if (null==pageSize)pageSize=3;
-		//1 赚钱数据    2首页数据
 		Map<String, Object> map=new HashMap<>();
+		//1 赚钱数据    2首页数据
 		map.put("recommended", jtBusinessService.recommendedApplication(1,pageNo,pageSize));
 		map.put("tag", jtTagService.selectListJtTag(null, pageNo, pageSize));
 		result.setData(map);
@@ -157,9 +152,18 @@ public class OpenAppHomeController extends BaseApiController{
 		Result result=new Result();
 		if (null==pageNo)pageNo=1;
 		if (null==pageSize)pageSize=3;
-		result.setData(jtBusinessService.recommendedApplication(2,pageNo,pageSize));
+		Map<String, Object> map=new HashMap<>();
+		//1 赚钱数据    2首页数据
+		map.put("recommended", jtBusinessService.recommendedApplication(1,pageNo,pageSize));
+		List<HomeImgBo> l=new ArrayList<>();
+		l.add(new HomeImgBo("1","1"));
+		l.add(new HomeImgBo("2","2"));
+		l.add(new HomeImgBo("3","3"));
+		map.put("homeImg", l);
+		result.setData(map);
 		return result;
 	}
+
 	
 	
 	

+ 0 - 24
src/main/java/com/goafanti/app/service/AppHomePageService.java

@@ -1,24 +0,0 @@
-package com.goafanti.app.service;
-
-
-
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.springframework.stereotype.Service;
-import com.goafanti.app.bo.AppHomePage;
-
-
-@Service
-public interface AppHomePageService {
-	
-	public AppHomePage getAppHomePage(HttpServletRequest request);
-
-	public List<?> getHomeRecommended(Integer type);
-
-	
-
-	
-}

+ 0 - 63
src/main/java/com/goafanti/app/service/impl/AppHomePageServiceImpl.java

@@ -1,63 +0,0 @@
-package com.goafanti.app.service.impl;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.goafanti.app.bo.AppHomePage;
-import com.goafanti.app.bo.HomeAchievemend;
-import com.goafanti.app.bo.HomeImages;
-import com.goafanti.app.service.AppHomePageService;
-import com.goafanti.common.dao.AchievementMapper;
-import com.goafanti.common.dao.DemandMapper;
-import com.goafanti.common.dao.UserIdentityMapper;
-import com.goafanti.user.service.UserIdentityService;
-
-@Service
-public  class AppHomePageServiceImpl implements AppHomePageService{
-	@Autowired
-	AchievementMapper	achievementMapper;
-	@Autowired
-	DemandMapper	demandMapper;
-	@Autowired
-	UserIdentityMapper	userIdentityMapper;
-	@Autowired
-	UserIdentityService userIdentityService;
-	
-
-	@Override
-	public AppHomePage getAppHomePage(HttpServletRequest request) {
-		AppHomePage ap=new AppHomePage();
-		ap.setHomeImg(new HomeImages().getImagers(request));
-		ap.setAdvertising(userIdentityService.advertising());
-		List<HomeAchievemend> h=achievementMapper.getAppHomeAchievement();
-		for (HomeAchievemend ha : h) {
-			if (null!=ha.getImg()&&ha.getImg().indexOf(",")>0) {
-				ha.setImg(ha.getImg().substring(0, ha.getImg().indexOf(",")));
-			}
-		}
-		ap.setAchievemend(h);
-		return ap;
-	}
-
-
-	@Override
-	public List<?> getHomeRecommended(Integer type) {
-		if (type==1) {
-		return achievementMapper.getAppHomeRecommended();			
-		}
-		if (type==2) {
-			return 	demandMapper.getAppHomeRecommended();
-		}
-		if (type==3) {
-			return userIdentityMapper.getAppHomeRecommended();
-		}
-		return null;
-	}
-
-	
-
-	
-}

+ 17 - 0
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -266,6 +266,23 @@ public class WebpageController extends BaseController {
 		modelview.setViewName("/portal/practicalPatent");
 		return modelview;
 	}
+	@RequestMapping(value = "/portal/continueHighApp", method = RequestMethod.GET)
+	public ModelAndView portalContinueHighApp(HttpServletRequest request, ModelAndView modelview) {
+		modelview.setViewName("/portal/continueHighApp");
+		return modelview;
+	}
+
+	@RequestMapping(value = "/portal/militaryProjectApp", method = RequestMethod.GET)
+	public ModelAndView portalMilitaryProjectApp(HttpServletRequest request, ModelAndView modelview) {
+		modelview.setViewName("/portal/militaryProjectApp");
+		return modelview;
+	}
+
+	@RequestMapping(value = "/portal/practicalPatentApp", method = RequestMethod.GET)
+	public ModelAndView portalPracticalPatentApp(HttpServletRequest request, ModelAndView modelview) {
+		modelview.setViewName("/portal/practicalPatentApp");
+		return modelview;
+	}
 
 	@RequestMapping(value = "/admin/order", method = RequestMethod.GET)
 	public ModelAndView adminOrder(HttpServletRequest request, ModelAndView modelview) {

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/continueHighApp.html


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/militaryProjectApp.html


Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/practicalPatentApp.html