| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- package com.goafanti.portal.controller;
- import java.math.BigDecimal;
- import javax.annotation.Resource;
- 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.controller.BaseApiController;
- import com.goafanti.demand.service.DemandService;
- @RestController
- @RequestMapping(value = "/portal/search")
- public class PortalSearchApiController extends BaseApiController {
- @Resource
- private AchievementService achievementService;
- @Resource
- private DemandService demandService;
- /**
- * 科技成果搜索
- */
- @RequestMapping(value = "/achievementList", method = RequestMethod.GET)
- public Result achievementSearchList(Integer bargainingMode, Integer category, Integer maturity,
- BigDecimal transferPriceLower, BigDecimal transferPriceUpper, Integer transferMode, String keyword,
- Integer fieldA, Integer fieldB, String pageNo, String pageSize) {
- Result res = new Result();
- Integer pNo = 1;
- Integer pSize = 10;
- if (StringUtils.isNumeric(pageSize)) {
- pSize = Integer.parseInt(pageSize);
- }
- if (StringUtils.isNumeric(pageNo)) {
- pNo = Integer.parseInt(pageNo);
- }
- res.setData(achievementService.listAchievementSearchList(bargainingMode, category, maturity, transferPriceLower,
- transferPriceUpper, transferMode, keyword, fieldA, fieldB, pNo, pSize));
- return res;
- }
- /**
- * 科技需求搜索
- */
- @RequestMapping(value = "/demandList", method = RequestMethod.GET)
- public Result demandSerarchList(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 (StringUtils.isNumeric(pageSize)) {
- pSize = Integer.parseInt(pageSize);
- }
- if (StringUtils.isNumeric(pageNo)) {
- pNo = Integer.parseInt(pageNo);
- }
- res.setData(demandService.listDemandSearchList(keyword, industryCategoryA, industryCategoryB, demandType,
- budgetCostLower, budgetCostUpper, pNo, pSize));
- return res;
- }
-
- }
|