Преглед изворни кода

智者详情,成果、需求搜索,专家搜索

liliang4869 пре 7 година
родитељ
комит
bd8b5b9685
23 измењених фајлова са 605 додато и 64 уклоњено
  1. 5 0
      src/main/java/com/goafanti/achievement/service/AchievementService.java
  2. 29 1
      src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java
  3. 86 2
      src/main/java/com/goafanti/common/controller/PortalController.java
  4. 28 1
      src/main/java/com/goafanti/common/controller/PublicController.java
  5. 16 5
      src/main/java/com/goafanti/common/controller/WebpageController.java
  6. 3 1
      src/main/java/com/goafanti/common/dao/AchievementMapper.java
  7. 6 0
      src/main/java/com/goafanti/common/dao/UserMapper.java
  8. 38 2
      src/main/java/com/goafanti/common/mapper/AchievementMapper.xml
  9. 38 2
      src/main/java/com/goafanti/common/mapper/DemandMapper.xml
  10. 29 40
      src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml
  11. 42 0
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  12. 1 0
      src/main/java/com/goafanti/demand/bo/DemandListBo.java
  13. 2 0
      src/main/java/com/goafanti/demand/service/DemandService.java
  14. 33 0
      src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java
  15. 89 0
      src/main/java/com/goafanti/portal/controller/PortalSearchController.java
  16. 5 0
      src/main/java/com/goafanti/user/service/UserService.java
  17. 11 0
      src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java
  18. 2 2
      src/main/webapp/WEB-INF/views/common.html
  19. 6 6
      src/main/webapp/WEB-INF/views/portal/index.html
  20. 1 0
      src/main/webapp/WEB-INF/views/portal/technologyTrading/achievementList.html
  21. 1 1
      src/main/webapp/WEB-INF/views/portal/technologyTrading/demandList.html
  22. 1 1
      src/main/webapp/WEB-INF/views/user/signIn.html
  23. 133 0
      src/main/webapp/WEB-INF/views/user/subscriberDetail.html

+ 5 - 0
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -87,5 +87,10 @@ public interface AchievementService {
 	List<AchievementObject>guessYouLike(int size);
 	
 	int updateAuditAchievement(String id,Integer auditResult,String auditInfo);
+	
+	Pagination<AchievementObject>getAchievementObjects(AchievementObject achievementObject,Integer pageNo,Integer pageSize);
+	
+	   /**查询智者的科技成果**/
+    public List<AchievementPartnerListBo> findPartnerAchievementList(String uid);
 
 }

+ 29 - 1
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -800,7 +800,35 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		achievementMapper.updateByPrimaryKeySelective(achievement);
 		return auditStatus;
 	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<AchievementObject> getAchievementObjects(AchievementObject achievementObject,Integer pageNo,Integer pageSize) {
+	if(pageNo==null ||pageNo<1)pageNo=1;
+	if(pageSize== null ||pageSize<1)pageSize=10;
+		// TODO Auto-generated method stub
+		return (Pagination<AchievementObject>)findPage("findAchievementListWithPid","findAchievementCountWithPid",disposeAchievementParams(achievementObject), pageNo, pageSize); 
+	}
+	 private Map<String, Object> disposeAchievementParams(AchievementObject achievementObject) {
+		 Map<String, Object> params=new HashMap<String,Object>();
+		 if(null !=achievementObject.getName()) {
+			 params.put("name", achievementObject.getName());
+		 }
+		 
+		 if(null != achievementObject.getFieldA())
+		 {
+			 params.put("fieldA", achievementObject.getFieldA());
+		 }
+		 if(null != achievementObject.getFieldB()) {
+			 params.put("fieldB", achievementObject.getFieldB());
+		 }
+		 return params;
+		
+	}
 	
-	
+	 @Override
+		public List<AchievementPartnerListBo> findPartnerAchievementList(String uid) {
+			return achievementMapper.findPartnerAchievementListByPage(uid);
+		}
 
 }

+ 86 - 2
src/main/java/com/goafanti/common/controller/PortalController.java

@@ -1,5 +1,9 @@
 package com.goafanti.common.controller;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import org.springframework.stereotype.Controller;
@@ -8,14 +12,19 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.view.RedirectView;
+
+import com.goafanti.achievement.bo.AchievementPartnerListBo;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.business.service.BusinessProjectService;
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.enums.AchievementMaturity;
+import com.goafanti.common.enums.UserType;
 import com.goafanti.common.service.DistrictGlossoryService;
 import com.goafanti.common.service.FieldGlossoryService;
 import com.goafanti.demand.service.DemandInterestService;
 import com.goafanti.demand.service.DemandService;
 import com.goafanti.order.service.OrderService;
+import com.goafanti.user.bo.UserPartnerDetailBo;
 import com.goafanti.user.service.UserIdentityService;
 import com.goafanti.user.service.UserService;
 
@@ -56,6 +65,81 @@ public class PortalController extends BaseController {
 		return modelview;
 	}
 	
+	@RequestMapping(value = "/portal/subscriberDetail", method = RequestMethod.GET)
+	public ModelAndView subscriberDetail(HttpServletRequest request, ModelAndView modelview, String uid, Integer type) {
+		ModelAndView mv = new ModelAndView();
+		UserPartnerDetailBo rePartnerDetail = new UserPartnerDetailBo();
+		/* 查询智者详细信息 */
 
-	
-}
+		if (UserType.PERSONAL.getCode().equals(type)) {
+			rePartnerDetail = userService.findUserPartnerDetail(uid);
+			if (null != rePartnerDetail) {
+				Integer province = rePartnerDetail.getProvince();
+				if (null != province) {
+					rePartnerDetail.setProvinceS(districtglossoryservice.selectNameById(province));
+				}
+			}
+		} else {
+//			rePartnerDetail = (UserPartnerDetailBo) userService.findOrgPartnerDetail(uid);
+//			if (null != rePartnerDetail) {
+//				Integer province = rePartnerDetail.getProvince();
+//				if (null != province) {
+//					rePartnerDetail.setProvinceS(districtglossoryservice.selectNameById(province));
+//				}
+//			}
+		}
+
+		/* 查询该智者的相关成果信息 */
+		List<AchievementPartnerListBo> partnerAchievementList = achievementService.findPartnerAchievementList(uid);
+		for (int i = 0; i < partnerAchievementList.size(); i++) {
+			Integer maturity = partnerAchievementList.get(i).getMaturity();
+			if (null != maturity) {
+				if (AchievementMaturity.RESEARCH.getCode().equals(maturity)) {
+					partnerAchievementList.get(i).setMaturityS(AchievementMaturity.RESEARCH.getDesc());
+				} else if (AchievementMaturity.SAMPLE.getCode().equals(maturity)) {
+					partnerAchievementList.get(i).setMaturityS(AchievementMaturity.SAMPLE.getDesc());
+				} else if (AchievementMaturity.PRIMARYTEST.getCode().equals(maturity)) {
+					partnerAchievementList.get(i).setMaturityS(AchievementMaturity.PRIMARYTEST.getDesc());
+				} else if (AchievementMaturity.INTERMEDIATETEST.getCode().equals(maturity)) {
+					partnerAchievementList.get(i).setMaturityS(AchievementMaturity.INTERMEDIATETEST.getDesc());
+				} else if (AchievementMaturity.MASSPRODUCTION.getCode().equals(maturity)) {
+					partnerAchievementList.get(i).setMaturityS(AchievementMaturity.MASSPRODUCTION.getDesc());
+				}
+			}
+		}
+
+		/* 查询相关智者信息 */
+		List<UserPartnerDetailBo> userPartner = userService.findUserPartner();
+		List<UserPartnerDetailBo> reuserPartner = new ArrayList<UserPartnerDetailBo>();
+		if (userPartner != null && userPartner.size() >= 6) {
+			int index = new Random().nextInt(userPartner.size() - 5);
+			reuserPartner.add(userPartner.get(index));
+			reuserPartner.add(userPartner.get(index + 1));
+			reuserPartner.add(userPartner.get(index + 2));
+			reuserPartner.add(userPartner.get(index + 3));
+			reuserPartner.add(userPartner.get(index + 4));
+		} else {
+			reuserPartner.addAll(userPartner);
+		}
+		for (int i = 0; i < reuserPartner.size(); i++) {
+			String personalProfile = reuserPartner.get(i).getPersonalProfile();
+			if (null != personalProfile && "" != personalProfile && personalProfile.length() > 40) {
+				personalProfile = personalProfile.substring(0, 40) + "... ...";
+				reuserPartner.get(i).setPersonalProfile(personalProfile);
+			}
+		}
+		rePartnerDetail.setUid(uid);
+		mv.setViewName("/user/subscriberDetail");
+		mv.addObject("rePartnerDetail", rePartnerDetail);
+		mv.addObject("reuserPartner", reuserPartner);
+		partnerAchievementList.size();
+		if (partnerAchievementList.size()<=0) {
+			mv.addObject("showflg", 0);
+		}else{
+			mv.addObject("showflg", 1);
+		};
+		mv.addObject("uid", uid);
+		return mv;
+
+	}
+	}

+ 28 - 1
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
 
+import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.admin.service.AftFileService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
@@ -35,6 +36,9 @@ import com.goafanti.common.utils.PictureUtils;
 import com.goafanti.common.utils.TimeUtils;
 import com.goafanti.common.utils.VerifyCodeUtils;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.demand.bo.DemandListBo;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.portal.bo.AchievementObject;
 import com.goafanti.user.service.UserIdentityService;
 import com.goafanti.user.service.UserService;
 
@@ -77,7 +81,13 @@ public class PublicController extends BaseController {
 	
 	@Autowired
 	private UserIdentityService userIdentityService;
-
+	
+	@Autowired
+	private AchievementService achievementService;
+	
+	@Autowired
+	private DemandService demandService;
+	
 	@Value(value = "${patentTemplate}")
 	private String					patentTemplate		= null;
 
@@ -528,5 +538,22 @@ public class PublicController extends BaseController {
 		
 	}
 	
+	@RequestMapping(value="/achievementList", method = RequestMethod.GET)
+	@ResponseBody
+	public Result getAchievements(AchievementObject achievementObject,Integer pageNo,Integer pageSize) {
+		Result result=new Result();
+		result.setData(achievementService.getAchievementObjects(achievementObject, pageNo, pageSize));
+		return result;  
+	}
+	
+	@RequestMapping(value="/demandList", method = RequestMethod.GET)
+	@ResponseBody
+	public Result getDemands(DemandListBo demandListBo,Integer pageNo,Integer pageSize) {
+		Result result=new Result();   
+		result.setData(demandService.getDemandObjects(demandListBo, pageNo, pageSize));
+		return result;
+	}
+	
+	
 	
 }

+ 16 - 5
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -333,7 +333,18 @@ public class WebpageController extends BaseController {
 	
 	@RequestMapping(value="/portal/technologyTrading/demandList",method=RequestMethod.GET)
 	public ModelAndView demandList(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/service/serviceList");
+		String url =com.goafanti.common.utils.StringUtils.getDomainByHttpRequest(request);
+		modelview.setViewName("/portal/technologyTrading/demandList");
+		List<DemandListBo> boutiques=demandService.getBoutiqueDemandList(3, url, "");
+		modelview.addObject("boutiques",boutiques);
+		return modelview;
+	}
+	
+	@RequestMapping(value="/portal/technologyTrading/achievementList",method=RequestMethod.GET)
+	public ModelAndView achievementList(HttpServletRequest request, ModelAndView modelview) {
+		modelview.setViewName("/portal/technologyTrading/achievementList");
+		List<AchievementObject>boutiques=achievementService.getBoutiquePatent(3); 
+		modelview.addObject("boutiques",boutiques);
 		return modelview;
 	}
 	
@@ -374,7 +385,7 @@ public class WebpageController extends BaseController {
 		modelview.addObject("newsPortalList", newsPortalList);
 		List<NewsPortalList> portalNewsQuestion = newsService.portalNewsQuestion();
 		modelview.addObject("portalNewsQuestion", portalNewsQuestion);
-		return modelview;
+		return modelview; 
 	}
 
 	/**
@@ -584,7 +595,7 @@ public class WebpageController extends BaseController {
 		for(DemandListBo demandListBo:fourMaxFundDemand) { 
 			if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
 			else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
-		}
+		}  
 		LimitLengthUtil.limiteDemandLength(fourMaxFundDemand,9,30);
 		modelview.addObject("fundDemandList",fourMaxFundDemand);
 		
@@ -621,7 +632,7 @@ public class WebpageController extends BaseController {
 		//view
 		modelAndView.setViewName("/portal/technologyTrading/demandDetail");
 		return modelAndView;
-	}
+	} 
 	
 	
 	//成果首页
@@ -636,7 +647,7 @@ public class WebpageController extends BaseController {
 
 		//最新成果
 		List<AchievementObject>recentAchievements=achievementService.recentAchievements(5,url,showLocation);
-		modelview.addObject("recentAchievements",recentAchievements);
+		modelview.addObject("recentAchievements",recentAchievements); 
 		//热门关注
 		List<AchievementObject> hotAchievements=achievementService.getHotAchievements(6,url,showLocation);
 		modelview.addObject("hotAchievements",hotAchievements);

+ 3 - 1
src/main/java/com/goafanti/common/dao/AchievementMapper.java

@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
 
 import com.goafanti.achievement.bo.AchievementInterestBo;
 import com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo;
+import com.goafanti.achievement.bo.AchievementPartnerListBo;
 import com.goafanti.achievement.bo.AchievementRecommended;
 import com.goafanti.achievement.bo.AchievementUserOwnerDetailBo;
 import com.goafanti.app.bo.HomeAchievemend;
@@ -71,6 +72,7 @@ public interface AchievementMapper {
 	
 	AchievementResultObject getAchievementDetailById(String id);
 	
-
+    /**	查询智者的科技成果**/
+	List<AchievementPartnerListBo>findPartnerAchievementListByPage(String uid);
 	
 }

+ 6 - 0
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -10,6 +10,7 @@ import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.User;
 import com.goafanti.user.bo.UserBaseBo;
 import com.goafanti.user.bo.UserDownLoadBo;
+import com.goafanti.user.bo.UserPartnerDetailBo;
 import com.goafanti.common.model.UserExample;
 
 public interface UserMapper {
@@ -102,4 +103,9 @@ public interface UserMapper {
 	List<User> selectUserByRoleName(@Param("roleName")String roleName);
 
 	User selectByNameAndType(@Param("username")String username,@Param("type") Integer type);
+	
+	UserPartnerDetailBo findUserPartnerDetail(String uid);
+	
+
+	List<UserPartnerDetailBo> findUserPartner();
 }

+ 38 - 2
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -596,7 +596,42 @@
 		#{item}
 	</foreach>
   </update>
-  
+  <select id="findAchievementListWithPid" resultType="com.goafanti.portal.bo.AchievementObject">
+  select a.name,a.id,release_date as releaseDate,technical_picture_url as technicalPictureUrl,data_category as dataCategory,is_hot as isHot 
+  ,field_a as fieldA,field_b as fieldB,ic.name as fieldAS,icc.name as fieldBS
+  from achievement a
+  left join industry_category ic on ic.id=a.field_a
+  left join industry_category icc on icc.id=a.field_b
+  where info_sources=1 and audit_status=2
+  <if test="fieldA!=null">
+ and a.field_a =#{fieldA,jdbcType=INTEGER}
+  </if>
+  <if test="fieldB!=null">
+  and a.field_b=#{fieldB,jdbcType=INTEGER}
+  </if>
+  <if test="name !=null">
+  and a.name like concat("%",#{name,jdbcType=VARCHAR},"%")
+  </if>
+  order by a.release_date
+  <if test="page_sql !=null">
+  	${page_sql}
+  </if>
+  </select>
+  <select id="findAchievementCountWithPid" resultType="java.lang.Integer">
+   select
+   count(0)
+    from achievement a
+  where info_sources=1 and audit_status=2
+  <if test="fieldA!=null">
+ and a.field_a =#{fieldA,jdbcType=INTEGER}
+  </if>
+  <if test="fieldB!=null">
+  and a.field_b=#{fieldB,jdbcType=INTEGER}
+  </if>
+  <if test="name !=null">
+  and a.name like concat("%",#{name,jdbcType=VARCHAR},"%")
+  </if>
+  </select>
    <select id="findAppAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
   	
 	select 
@@ -1207,7 +1242,8 @@ select
 	a.technical_picture_url as technicalPictureUrl,
 	name,
 	id,
-	data_category as dataCategory
+	data_category as dataCategory,
+	summary
 from
 	achievement a
 where

+ 38 - 2
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -1075,7 +1075,7 @@ left join demand_publish dp on dp.demand_id=d.id and dp.publish_platform=branchI
     where d.id=#{0} and d.data_category=#{1}
   </select>
   <select id="getBoutiqueDemandList" resultType="com.goafanti.demand.bo.DemandListBo">
- select d.id,d.name,picture_url as picture_url,data_category as dataCategory
+ select d.id,d.name,picture_url as picture_url,data_category as dataCategory,problem_des as problemDes
  from demand d
  left join branch_information branchInfo on INSTR(branchInfo.domain_name,#{1})>0
 left join demand_publish dp on dp.demand_id=d.id and dp.publish_platform=branchInfo.id 
@@ -1107,4 +1107,40 @@ order by release_date desc limit #{0}
 	<if test="endDate != null">
 		and create_time <![CDATA[ < ]]>  #{endDate,jdbcType=VARCHAR}
 	</if>
-  </select></mapper>
+  </select>
+  
+    <select id="searchDemandList" resultType="com.goafanti.demand.bo.DemandListBo">
+  select a.name,a.id,create_time as createTime ,picture_url as pictureUrl,data_category as dataCategory,is_hot as isHot,demand_type as demandType,
+  industry_category_a as industryCategoryA,industry_category_b as industryCategoryB,ic.name as industryCategory1,icc.name as industryCategory2
+   from demand a
+  left join industry_category ic on ic.id=a.industry_category_a
+  left join industry_category icc on icc.id=a.industry_category_b
+  where info_sources=1 and audit_status=2
+  <if test="industryCategoryA!=null">
+ and a.industry_category_a =#{industryCategoryA,jdbcType=INTEGER}
+  </if>
+  <if test="industryCategoryB!=null">
+  and a.industry_category_b=#{industryCategoryB,jdbcType=INTEGER}
+  </if>
+  <if test="name !=null">
+  and a.name like concat("%",#{name,jdbcType=VARCHAR},"%")
+  </if>
+  order by a.release_date
+  <if test="page_sql !=null">
+  	${page_sql}
+  </if>
+  </select>
+      <select id="searchDemandCount" resultType="java.lang.Integer">
+  select count(0) from demand a
+  where info_sources=1 and audit_status=2
+  <if test="industryCategoryA!=null">
+ and a.industry_category_a =#{industryCategoryA,jdbcType=INTEGER}
+  </if>
+  <if test="industryCategoryB!=null">
+  and a.industry_category_b=#{industryCategoryB,jdbcType=INTEGER}
+  </if>
+  <if test="name !=null">
+  and a.name like concat("%",#{name,jdbcType=VARCHAR},"%")
+  </if>
+  </select>
+  </mapper>

+ 29 - 40
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -936,20 +936,14 @@
 			uc.engaged_field as engagedField,
 			uc.work_unit as workUnit,
 			ui.professional_title as position,
-			ui.international,
-			ep.publish_page,ep.publish_platform,ep.publish_client,ep.if_top,ep.top_number,ep.show_number
+			ui.international
 		FROM
 		 user  u
-		right join expert_publish ep on u.id=ep.expert_id
-		left join branch_information bi on bi.id=ep.publish_platform
 		LEFT JOIN user_identity ui ON ui.uid = u.id
 		LEFT JOIN user_career uc ON uc.uid = u.id
 		LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
 		WHERE
 			u.type = 0 and ui.expert = 1
-		and ep.publish_client=0
-		and ep.publish_page='W02'
-		and bi.domain_name like  "%"#{url,jdbcType=VARCHAR}"%"
 		<if test="null != level and level==1 ">
 			AND u.lvl <![CDATA[ >= ]]> 1 
 		</if>
@@ -974,51 +968,46 @@
 		<if test="name != null">
 			AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
 		</if>
-	order by ep.if_top,ep.top_number,ep.show_number,u.number asc
+	order by u.number asc
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>
  </select>
  
 	 <select id="findSearchSubscriberCount" parameterType="String" resultType="java.lang.Integer">
-	 	SELECT 
-		 	count(1)
+	 	SELECT
+			count(0)
 		FROM
-			<![CDATA[ user ]]> u
-		right join expert_publish ep on u.id=ep.expert_id
+		 user  u
 		LEFT JOIN user_identity ui ON ui.uid = u.id
 		LEFT JOIN user_career uc ON uc.uid = u.id
-		<!-- LEFT JOIN user_info info ON info.uid = u.id -->
 		LEFT JOIN achievement_demand_count adc ON adc.uid = u.id
 		WHERE
 			u.type = 0 and ui.expert = 1
-			and ep.publish_client=0
-		and ep.publish_page='W02'
-		and ep.publish_platform='112461d9-2120-4809-b709-3cb5f5acfcc3'
-			<if test="null != level and level==1 ">
-				AND u.lvl <![CDATA[ >= ]]> 1 
-			</if>
-			<if test="null != level and level==0">
-				AND u.lvl = 0
-			</if>
-			<if test="international !=null">
-				AND ui.international= #{international,jdbcType=INTEGER}
-			</if>
-			<if test="province != null">
-				AND ui.province = #{province,jdbcType=INTEGER}
-			</if>
-			<if test="city != null">
-				AND ui.city = #{city,jdbcType=INTEGER}
-			</if>
-			<if test="area != null">
-				AND ui.area = #{area,jdbcType=INTEGER}
-			</if>
-			<if test="field != null">
-				AND uc.engaged_field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
-			</if>
-			<if test="name != null">
-				AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
-			</if>
+		<if test="null != level and level==1 ">
+			AND u.lvl <![CDATA[ >= ]]> 1 
+		</if>
+		<if test="null !=level and level==0">
+			AND u.lvl = 0
+		</if>
+		<if test="international !=null">
+			AND ui.international= #{international,jdbcType=INTEGER}
+		</if>
+		<if test="province != null">
+			AND ui.province = #{province,jdbcType=INTEGER}
+		</if>
+		<if test="city != null">
+			AND ui.city = #{city,jdbcType=INTEGER}
+		</if>
+		<if test="area != null">
+			AND ui.area = #{area,jdbcType=INTEGER}
+		</if>
+		<if test="field != null">
+			AND uc.engaged_field like CONCAT(#{field,jdbcType=VARCHAR}, '%')
+		</if>
+		<if test="name != null">
+			AND ui.username like CONCAT('%', #{name,jdbcType=VARCHAR}, '%')
+		</if>
 	 </select>
   	 <select id="selectInternationalUser" resultType="com.goafanti.portal.bo.InternationalListBo">
 		select 

+ 42 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1131,4 +1131,46 @@
   <select id="selectUserByRoleName" parameterType="java.lang.String" resultMap="BaseResultMap">
   	select c.id from role a left join user_role b on a.id = b.rid left join admin c on b.uid = c.id where a.role_name = #{roleName}
   </select>
+  
+   	<select id="findUserPartnerDetail" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
+		select
+		u.id,i.username,i.work_unit as workUnit,i.professional_title as position,u.introduction as achievement,
+		u.head_portrait_url as personPortraitUrl,
+		i.province,
+		u.introduction as personalProfile,
+		ua.ability_label as abilityLabel,i.qualification,
+		i.graduate_school,i.major_category,i.work_unit as workUnit,
+		ic.name as engagedField
+		from `user` u
+		left join user_identity i on u.id=i.uid
+		left join
+		user_career c on u.id=c.uid
+		<!-- left join user_info info on u.id=info.uid -->
+		left join user_ability ua on u.id=ua.uid
+		left join user_edu e on u.id=e.uid
+		left join industry_category ic on i.industry=ic.id
+		WHERE
+		u.type = 0
+		<if test="_parameter!= null">
+			and u.id= #{_parameter,jdbcType=VARCHAR}
+		</if>
+	</select>
+	
+	  <select id="findUserPartner" parameterType="String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
+		select
+		u.id,i.username,c.work_unit as work_unit,c.position,c.achievement,
+		u.head_portrait_url as personPortraitUrl,
+		i.province,
+		u.introduction as personalProfile,
+		ua.ability_label as abilityLabel,i.uid,u.type
+		from `user` u
+		left join user_identity i on u.id=i.uid
+		left join
+		user_career c on u.id=c.uid
+		<!-- left join user_info info on u.id=info.uid -->
+		left join user_ability ua on u.id=ua.uid
+		WHERE
+		u.type = 0
+		limit 0,50
+	</select>
 </mapper>

+ 1 - 0
src/main/java/com/goafanti/demand/bo/DemandListBo.java

@@ -29,6 +29,7 @@ public class DemandListBo extends InputDemand{
 	private BigDecimal fundForPersonnel;
 	private BigDecimal fundForCrowd;
 	
+
 	public String getDemandTypeS() {
 		return demandTypeS;
 	}

+ 2 - 0
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -80,4 +80,6 @@ public interface DemandService {
 	
 	DemandDetailBo selectDemandDetail(String id);
 	
+	Pagination<DemandListBo>getDemandObjects(DemandListBo demandListBo,Integer pageNo,Integer pageSize);
+	
 }

+ 33 - 0
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -875,4 +875,37 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		bo.setPublishPages(demandPublishMapper.selectPublishPages(id));
 		return bo;
 	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<DemandListBo> getDemandObjects(DemandListBo demandListBo, Integer pageNo, Integer pageSize) {
+		// TODO Auto-generated method stub
+		if(pageNo==null || pageNo<1) {
+			pageNo=1;
+		}
+		if(pageSize==null ||pageSize<1) {
+			pageSize=10; 
+		}
+		return (Pagination<DemandListBo>) findPage("searchDemandList","searchDemandCount",disposeDemandObjectsParams(demandListBo),pageNo , pageSize);
+	}
+	
+	private Map<String ,Object>disposeDemandObjectsParams(DemandListBo demandListBo)
+	{
+		Map<String, Object>params=new HashMap<>();
+		if(demandListBo==null)return params;
+		if(demandListBo.getName() !=null)
+		{
+			params.put("name", demandListBo.getName());
+		}
+		if(demandListBo.getIndustryCategoryA() !=null)
+		{
+			params.put("industryCategoryA", demandListBo.getIndustryCategoryA());
+		}
+		if(demandListBo.getIndustryCategoryB() !=null) {
+			params.put("industryCategoryB", demandListBo.getIndustryCategoryB());
+		}
+		return params;
+	}
+	
+	
 	}

+ 89 - 0
src/main/java/com/goafanti/portal/controller/PortalSearchController.java

@@ -0,0 +1,89 @@
+package com.goafanti.portal.controller;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseController;
+import com.goafanti.common.enums.AchievementMaturity;
+import com.goafanti.common.enums.DemandPortalSearchSignType;
+import com.goafanti.common.enums.UserLevel;
+import com.goafanti.common.enums.UserType;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.portal.bo.AchievementSearchListBo;
+import com.goafanti.portal.bo.BoutiqueListBo;
+import com.goafanti.user.service.OrganizationIdentityService;
+import com.goafanti.user.service.UserIdentityService;
+
+@RestController
+@RequestMapping(value = "/portal/search")
+public class PortalSearchController extends BaseController {
+	@Resource
+	private AchievementService			achievementService;
+	@Resource
+	private DemandService				demandService;
+	@Resource
+	private UserIdentityService			userIdentityService;
+	@Resource
+	private OrganizationIdentityService	organizationIdentityService;
+
+
+		
+		
+
+		
+
+
+
+	/**
+	 * 用户搜索
+	 */
+	@RequestMapping(value = "/subscriberList", method = RequestMethod.GET)
+	public Result subscriberSearchList(HttpServletRequest req,String name, Integer level, Integer type, String field, Integer province,
+			Integer city, Integer area,Integer international, String pageNo, String pageSize) {
+		Result res = new Result();
+		String url=req.getServerName();
+		url=url.substring(url.indexOf(".")+1, url.length());
+		if (null == type) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "用户类型"));
+			return res;
+		}
+
+		if (!UserType.PERSONAL.getCode().equals(type) && !UserType.ORGANIZATION.getCode().equals(type)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户类型"));
+			return res;
+		}
+
+		if (null != level && !UserLevel.GENERAL.getCode().equals(level)
+				&& !UserLevel.CERTIFIED.getCode().equals(level)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户认证标记"));
+			return res;
+		}
+		Integer pNo = 1;
+		Integer pSize = 12;
+		if (StringUtils.isNumeric(pageSize)) {
+			pSize = Integer.parseInt(pageSize);
+		}
+		if (StringUtils.isNumeric(pageNo)) {
+			pNo = Integer.parseInt(pageNo);
+		}
+		if (UserType.PERSONAL.getCode().equals(type)) {
+			res.setData(userIdentityService.listSubscriber(url,name, level, field, province, city, area, international, pNo, pSize));
+		} else {
+		}
+		return res;
+	}
+	
+	
+}

+ 5 - 0
src/main/java/com/goafanti/user/service/UserService.java

@@ -10,6 +10,7 @@ import com.goafanti.user.bo.UserBaseBo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserNames;
 import com.goafanti.user.bo.UserPageHomeBo;
+import com.goafanti.user.bo.UserPartnerDetailBo;
 
 public interface UserService {
 
@@ -50,4 +51,8 @@ public interface UserService {
 	User selectByNumber(String easemobName);
 	
 	List<User> selectUserByRoleName(String roleName);
+	
+	UserPartnerDetailBo findUserPartnerDetail(String uid);
+	
+	List<UserPartnerDetailBo> findUserPartner();
 }

+ 11 - 0
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -23,6 +23,7 @@ import com.goafanti.user.bo.UserBaseBo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserNames;
 import com.goafanti.user.bo.UserPageHomeBo;
+import com.goafanti.user.bo.UserPartnerDetailBo;
 import com.goafanti.user.service.UserService;
 
 @Service
@@ -206,4 +207,14 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 		 
 		return userMapper.selectUserBaseByUserId(userId);
 	}
+	
+	@Override
+	public UserPartnerDetailBo findUserPartnerDetail(String uid) {
+		return userMapper.findUserPartnerDetail(uid);
+	}
+	
+	@Override
+	public List<UserPartnerDetailBo> findUserPartner() {
+		return userMapper.findUserPartner();
+	}
 }

+ 2 - 2
src/main/webapp/WEB-INF/views/common.html

@@ -201,8 +201,8 @@
 		<div class="pub_fix">
 			<span class="index_blur"></span>
 			<ul class="ret_top">
-				<li>
-					<a href="">
+				<li class="head_login">
+					<a href="javascript:;">
 						<img th:src="${portalHost+'/img/index_fix0.png'}" alt="" />
 						<p>申请会员</p>
 					</a>

+ 6 - 6
src/main/webapp/WEB-INF/views/portal/index.html

@@ -82,16 +82,16 @@
 					<div id="seachCont">
 						<div class="seachCont seachCont4" clicka="0">
 							<div>
-								<a href="">发布需求</a>
+							发布需求
 							</div>
 							<div>
-								<a href="">承接需求</a>
+								承接需求
 							</div>
 							<div>
-								<a href="">寻找需求</a>
+							寻找需求
 							</div>
 							<div>
-								<a href="">成果对接</a>
+							成果对接
 							</div>
 							
 						</div>
@@ -257,7 +257,7 @@
 				<p>关于科技&nbsp;&nbsp;&nbsp;&nbsp;我们能做得更多</p>
 			</div>
 			<div class="fruit_h3">
-				<a href="#"><span>+</span> 更多政策</a>
+				<a th:href=@{/portal/thinkTank/policyList}><span>+</span> 更多政策</a>
 			</div>
 			<div class="policy_cont">
 				<div class="policy_img">
@@ -357,7 +357,7 @@
 					
 				</div>
 				<div class="indexGroom_more">
-					<a href=""> 查看更多 ></a>
+					<a th:href=@{/portal/thinkTank/index.html#zizone}> 查看更多 ></a>
 				</div>
 			</div>
 		</div>

Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/technologyTrading/achievementList.html


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/demandList.html


+ 1 - 1
src/main/webapp/WEB-INF/views/user/signIn.html

@@ -131,7 +131,7 @@
 				Copyright © 2016-2017 阿凡提 版权所有
 			</footer>
 		</div>
-		<img src="../img/login_close.png" alt="" class="login_close_"/>
+		<img th:src="${portalHost+'/img/login_close.png'}" alt="" class="login_close_"/>
 	</div>
 	<footer>
 		<div th:replace="common::copyright"></div>

+ 133 - 0
src/main/webapp/WEB-INF/views/user/subscriberDetail.html

@@ -0,0 +1,133 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+<title>用户详情页</title>
+<link th:href="${portalHost + '/vendors.css'}" rel="stylesheet">
+<link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
+<link th:href="${portalHost + '/thinkTank/thinkerDetail.css'}"
+	rel="stylesheet">
+</head>
+<body>
+	<header>
+		<div th:replace="common::nav('user','subscriberDetail')"></div>
+	</header>
+	<div class="banner">
+		<img th:src="${portalHost + '/img/thinkerDetail_banner01.jpg'}" alt="" />
+	</div>
+	<div class="think_man">
+		<img th:src="${portalHost + '/img/thinkTank_er1.png'}" alt="" />			
+		<div th:if="${rePartnerDetail.personPortraitUrl == null or rePartnerDetail.personPortraitUrl == ''}" class="man_img">
+			<img th:src="${avatarUploadHost+ '/default/person.jpg'}" alt="" />
+		</div>
+		<div th:if="${rePartnerDetail.personPortraitUrl != null and rePartnerDetail.personPortraitUrl != ''}" class="man_img">
+			<img th:src="${avatarUploadHost+ rePartnerDetail.personPortraitUrl}" alt="" />
+		</div>
+		<div class="man_name" th:text="${rePartnerDetail.username}"></div>
+	</div>
+	<div class="think_basc">
+		<div class="basc_img">
+			<div class="bacs-img" th:if="${rePartnerDetail.personPortraitUrl != null and rePartnerDetail.personPortraitUrl !=''}">
+				<img
+						th:src="${avatarUploadHost + rePartnerDetail.personPortraitUrl}"
+						alt="" />
+			</div>
+			<div class="bacs-img" th:if="${rePartnerDetail.personPortraitUrl == null or rePartnerDetail.personPortraitUrl ==''}">
+				<img
+						th:src="${avatarUploadHost + '/default/subscriberDetail.jpg'}"
+						alt="" />
+			</div>
+			<div>
+				<div>
+				<span>擅长领域</span>
+				<span class="lingyu" th:text="${rePartnerDetail.abilityLabel}?${rePartnerDetail.abilityLabel}:未知"></span>
+				<span class="box_love"></span>
+				<span class="dem_number">0</span>
+				<span class="shoucang">收藏</span>
+				<span class="yuejian">线下约见</span>
+				<span class="cishu">32</span>
+				<span class="ci">次</span>
+				</div>
+			</div>
+		</div>
+		<div class="basc_p">
+			<h4>关于智者</h4>
+			<p th:text="${rePartnerDetail.achievement}">
+			</p>
+			<div>毕业院校:<span th:text="${rePartnerDetail.graduate_school}"></span></div>
+			<div>专业类别:<span th:text="${rePartnerDetail.major_category}"></span></div>
+			<div>职业资格:<span th:text="${rePartnerDetail.qualification}"></span></div>
+			<div>就职单位:<span th:text="${rePartnerDetail.workUnit}"></span></div>
+			<div>从事行业类别:<span th:text="${rePartnerDetail.engagedField}"></span></div>
+			<div>职&nbsp;&nbsp;&nbsp;&nbsp;称:<span th:text="${rePartnerDetail.position}?${rePartnerDetail.position}:''"></span></div>
+		</div>
+	</div>
+	<div class="think_achieve">
+		<h3>技术成果</h3>
+		<div class="achieve_cont" th:if="${showflg} == 1 ">
+			<a th:each="partnerAchievementList:${partnerAchievementList}">
+				<div>
+					<span></span>
+					<p th:text="${partnerAchievementList.introduction}"></p>
+				</div>
+			</a>
+		</div>
+		<div class="achieve_btn">
+			<a onclick="_MEIQIA('showPanel')">线下约见</a>
+			<a id="consultBtn">在线咨询</a>
+			<input type="hidden" th:isLogin="${!isLogin}" id="isLogin" />
+		</div>
+	</div>
+	<div class="think_about">
+		<h3>相关智者</h3>
+		<div>
+			<div th:each="reuserPartner:${reuserPartner}">
+					<a th:href="@{/portal/subscriberDetail.html(uid=${reuserPartner.uid},type=${reuserPartner.type})}">
+						<img th:src="${reuserPartner.personPortraitUrl}?${avatarUploadHost+reuserPartner.personPortraitUrl}:${avatarUploadHost+ '/default/person.jpg'}"
+								alt="" />
+						<div class="about_name">
+							<span class="about_man" th:text="${reuserPartner.username}?${reuserPartner.username}:佚名"></span>
+							<span class="about_manp" th:text="${reuserPartner.position}?${reuserPartner.position}:未公开"></span>
+						</div>
+						<div class="about_p" th:text="${reuserPartner.personalProfile}?${reuserPartner.personalProfile}:暂无简介">
+						</div>
+					</a>		
+			</div>
+		</div>
+	</div>
+	<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
+		aria-labelledby="myModalLabel">
+		<div class="modal-dialog" role="document">
+			<div class="modal-content">
+				<div class="modal-header">
+					<button type="button" class="close" data-dismiss="modal"
+						aria-label="Close">
+						<span aria-hidden="true">&times;</span>
+					</button>
+					<h4 class="modal-title" id="myModalLabel">咨询订单提交</h4>
+				</div>
+				<div class="modal-body" id="modal-content"></div>
+				<div class="modal-footer">
+					<input type="hidden" th:value="${uid}" id="userId" />
+					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
+					<button type="button" class="btn btn-primary" id="submitOrder">提交订单</button>
+				</div>
+			</div>
+		</div>
+	</div>
+	<footer>
+		<div th:replace="common::copyright"></div>
+		<div th:replace="common::login"></div>
+	</footer>
+	<div class="smg">
+		<input type="text" name="msg" value="" id="msg" />
+	</div>
+	<div th:replace="common::footer(~{::script})">
+		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
+		<script type="text/javascript"
+			th:src="${portalHost + '/thinkTank/thinkerDetail.js'}"></script>
+	</div>
+</body>
+</html>