|
|
@@ -23,13 +23,13 @@ import com.goafanti.user.service.UserIdentityService;
|
|
|
@RequestMapping(value = "/portal/search")
|
|
|
public class PortalSearchApiController extends BaseApiController {
|
|
|
@Resource
|
|
|
- private AchievementService achievementService;
|
|
|
+ private AchievementService achievementService;
|
|
|
@Resource
|
|
|
- private DemandService demandService;
|
|
|
+ private DemandService demandService;
|
|
|
@Resource
|
|
|
- private UserIdentityService userIdentityService;
|
|
|
+ private UserIdentityService userIdentityService;
|
|
|
@Resource
|
|
|
- private OrganizationIdentityService organizationIdentityService;
|
|
|
+ private OrganizationIdentityService organizationIdentityService;
|
|
|
|
|
|
/**
|
|
|
* 科技成果搜索
|
|
|
@@ -77,19 +77,21 @@ public class PortalSearchApiController extends BaseApiController {
|
|
|
* 用户搜索
|
|
|
*/
|
|
|
@RequestMapping(value = "/subscriberList", method = RequestMethod.GET)
|
|
|
- public Result subscriberSearchList(Integer level, Integer type, String field, Integer province,String pageNo, String pageSize) {
|
|
|
+ public Result subscriberSearchList(Integer level, Integer type, String field, Integer province, Integer city,
|
|
|
+ Integer area, String pageNo, String pageSize) {
|
|
|
Result res = new Result();
|
|
|
- if (null == type){
|
|
|
+ if (null == type) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "用户类型"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- if (!UserType.PERSONAL.getCode().equals(type) && !UserType.ORGANIZATION.getCode().equals(type)){
|
|
|
+
|
|
|
+ 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)){
|
|
|
+
|
|
|
+ if (null != level && !UserLevel.GENERAL.getCode().equals(level)
|
|
|
+ && !UserLevel.CERTIFIED.getCode().equals(level)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户认证标记"));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -101,10 +103,10 @@ public class PortalSearchApiController extends BaseApiController {
|
|
|
if (StringUtils.isNumeric(pageNo)) {
|
|
|
pNo = Integer.parseInt(pageNo);
|
|
|
}
|
|
|
- if (UserType.PERSONAL.getCode().equals(type)){
|
|
|
- res.setData(userIdentityService.listSubscriber(level, field, province, pNo, pSize));
|
|
|
+ if (UserType.PERSONAL.getCode().equals(type)) {
|
|
|
+ res.setData(userIdentityService.listSubscriber(level, field, province, city, area, pNo, pSize));
|
|
|
} else {
|
|
|
- res.setData(organizationIdentityService.listSubscriber(level, field, province, pNo, pSize));
|
|
|
+ res.setData(organizationIdentityService.listSubscriber(level, field, province, city, area, pNo, pSize));
|
|
|
}
|
|
|
return res;
|
|
|
}
|