liliang4869 7 years ago
parent
commit
c15d93daec

File diff suppressed because it is too large
+ 639 - 559
src/main/java/com/goafanti/common/controller/PublicController.java


+ 1 - 1
src/main/java/com/goafanti/common/mapper/JtBusinessProjectMapper.xml

@@ -498,8 +498,8 @@
   	jt_business_project
   	where 
   	category_id=#{0}
+  	 order by create_time
   	limit #{1}
-  	order by create_time
   </select>
   
   <select id="findJtBusinessProjectByPage" resultType="com.goafanti.common.model.JtBusinessProject">

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

@@ -949,7 +949,7 @@
 		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 u.source=0
+			ui.expert = 1 and u.source=0
 		<if test="null != level and level==1 ">
 			AND u.lvl <![CDATA[ >= ]]> 1 
 		</if>
@@ -989,7 +989,7 @@
 		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 u.source=0
+		 ui.expert = 1 and u.source=0
 		<if test="null != level and level==1 ">
 			AND u.lvl <![CDATA[ >= ]]> 1 
 		</if>

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

@@ -1150,7 +1150,7 @@
 		left join user_edu e on u.id=e.uid
 		left join industry_category ic on i.industry=ic.id
 		WHERE
-		u.type = 0
+		u.source=0 and i.expert=1
 		<if test="_parameter!= null">
 			and u.id= #{_parameter,jdbcType=VARCHAR}
 		</if>
@@ -1170,7 +1170,7 @@
 		<!-- left join user_info info on u.id=info.uid -->
 		left join user_ability ua on u.id=ua.uid
 		WHERE
-		u.type = 0
+		u.source =0 and i.expert=1
 		limit 0,50
 	</select>
 </mapper>

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

@@ -1,89 +1,73 @@
-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;
-	}
-	
-	
-}
+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());
+		Integer pNo = 1;
+		Integer pSize = 12;
+		if (StringUtils.isNumeric(pageSize)) {
+			pSize = Integer.parseInt(pageSize);
+		}
+		if (StringUtils.isNumeric(pageNo)) {
+			pNo = Integer.parseInt(pageNo);
+		}
+	
+			res.setData(userIdentityService.listSubscriber(url,name, level, field, province, city, area, international, pNo, pSize));
+	
+		return res;
+	}
+	
+	
+}