|
|
@@ -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;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|