limin %!s(int64=7) %!d(string=hai) anos
pai
achega
316f84ae54

+ 8 - 1
src/main/java/com/goafanti/business/service/JtBusinessService.java

@@ -1,7 +1,6 @@
 package com.goafanti.business.service;
 
 import java.util.List;
-import java.util.Map;
 
 import com.goafanti.business.bo.JtBusinessCategoryBo;
 import com.goafanti.business.bo.JtBusinessCategoryTree;
@@ -72,6 +71,14 @@ public interface JtBusinessService {
 	void updateJtCollectSearch(String id);
 	List<JtBusinessCategoryBo> getHomeIndex(Integer module, Integer isHome);
 	
+	/**
+	 * 根据标签名称获得项目
+	 * @param name
+	 * @param size
+	 * @return
+	 */
+	List<JtBusinessProject> getProjectByTag(String name, Integer size);
+	
 	
 	
 }

+ 5 - 0
src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java

@@ -532,6 +532,11 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 		
 		return jtBusinessCategoryMapper.getHomeIndex(module,isHome);
 	}
+
+	@Override
+	public List<JtBusinessProject> getProjectByTag(String name, Integer size) {
+		return jtBusinessProjectMapper.getProjectByTag(name, size);
+	}
 	
 
 }

+ 21 - 3
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -347,7 +347,23 @@ public class WebpageController extends BaseController {
 	@SuppressWarnings("unchecked")
 	@RequestMapping(value = "/portal/service/serviceIndex", method = RequestMethod.GET)
 	public ModelAndView portalServiceServiceIndex(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/service/serviceIndex");
+		modelview.setViewName("/portal/service/serviceIndex");
+		//根据标签名称获得项目
+		List<JtBusinessProject> sc  = jtBusinessService.getProjectByTag("政府市场采购", 3);
+		modelview.addObject("sc", sc);
+		List<JtBusinessProject> cg  = jtBusinessService.getProjectByTag("军工市场采购", 3);
+		modelview.addObject("cg", cg);
+		List<JtBusinessProject> gj  = jtBusinessService.getProjectByTag("国际市场开发", 3);
+		modelview.addObject("gj", gj);
+		List<JtBusinessProject> js  = jtBusinessService.getProjectByTag("减税免税", 3);
+		modelview.addObject("js", js);
+		List<JtBusinessProject> rz  = jtBusinessService.getProjectByTag("融资租售", 3);
+		modelview.addObject("rz", rz);
+		List<JtBusinessProject> gf  = jtBusinessService.getProjectByTag("攻防利器", 3);
+		modelview.addObject("gf", gf);
+		List<JtBusinessProject> ts  = jtBusinessService.getProjectByTag("他山己用", 3);
+		modelview.addObject("ts", ts);
+		
 		// 政策
 		// List<PolicyEntity>policyEntities=achievementService.getIntellectualProperty(8);
 		List<PolicyResult> policies = (List<PolicyResult>) policyService
@@ -1408,7 +1424,7 @@ public class WebpageController extends BaseController {
 		//获得法律顾问列表数据
 		String id = TokenManager.getUserId();
 		if(null != id){
-			modelview.addObject("userType", userService.selectByPrimaryKey(TokenManager.getUserToken().getId()).getType());
+			modelview.addObject("userType", userService.selectByPrimaryKey(id).getType());
 		}
 		modelview.addObject("slist", userIdentityService.consultantList( null, 1,  4,  null, null, null,  0,  12).getList());
 		modelview.setViewName("/portal/service/safeguarding");
@@ -1460,7 +1476,7 @@ public class WebpageController extends BaseController {
 		modelview.setViewName("/portal/adviser");
 		String id = TokenManager.getUserId();
 		if(null != id){
-			modelview.addObject("userType", userService.selectByPrimaryKey(TokenManager.getUserToken().getId()).getType());
+			modelview.addObject("userType", userService.selectByPrimaryKey(id).getType());
 		}
 		return modelview;
 	}
@@ -1539,4 +1555,6 @@ public class WebpageController extends BaseController {
 		return modelview;
 	}
 	
+	
+	
 }

+ 4 - 4
src/main/java/com/goafanti/common/dao/JtBusinessProjectMapper.java

@@ -1,12 +1,12 @@
 package com.goafanti.common.dao;
 
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+
 import com.goafanti.business.bo.JtBusinessProjectResult;
 import com.goafanti.common.model.JtBusinessProject;
 import com.goafanti.common.model.JtBusinessProjectExample;
-import com.goafanti.core.mybatis.page.Pagination;
-
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
 
 public interface JtBusinessProjectMapper {
     /**