|
|
@@ -13,6 +13,7 @@ import com.goafanti.achievement.service.AchievementService;
|
|
|
import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.BaseApiController;
|
|
|
+import com.goafanti.common.enums.DemandPortalSearchSignType;
|
|
|
import com.goafanti.common.enums.UserLevel;
|
|
|
import com.goafanti.common.enums.UserType;
|
|
|
import com.goafanti.demand.service.DemandService;
|
|
|
@@ -56,19 +57,29 @@ public class PortalSearchApiController extends BaseApiController {
|
|
|
* 科技需求搜索
|
|
|
*/
|
|
|
@RequestMapping(value = "/demandList", method = RequestMethod.GET)
|
|
|
- public Result demandSearchList(String keyword, Integer industryCategoryA, Integer industryCategoryB,
|
|
|
+ public Result demandSearchList(Integer sign, String keyword, Integer industryCategoryA, Integer industryCategoryB,
|
|
|
Integer demandType, BigDecimal budgetCostLower, BigDecimal budgetCostUpper, String pageNo,
|
|
|
String pageSize) {
|
|
|
Result res = new Result();
|
|
|
Integer pNo = 1;
|
|
|
Integer pSize = 10;
|
|
|
+ if (null == sign) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "查询标记"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!DemandPortalSearchSignType.ALL.getCode().equals(sign)
|
|
|
+ && !DemandPortalSearchSignType.NEGOATION.getCode().equals(sign)) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "查询标记"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
if (StringUtils.isNumeric(pageSize)) {
|
|
|
pSize = Integer.parseInt(pageSize);
|
|
|
}
|
|
|
if (StringUtils.isNumeric(pageNo)) {
|
|
|
pNo = Integer.parseInt(pageNo);
|
|
|
}
|
|
|
- res.setData(demandService.listDemandSearchList(keyword, industryCategoryA, industryCategoryB, demandType,
|
|
|
+ res.setData(demandService.listDemandSearchList(sign, keyword, industryCategoryA, industryCategoryB, demandType,
|
|
|
budgetCostLower, budgetCostUpper, pNo, pSize));
|
|
|
return res;
|
|
|
}
|