Browse Source

合并BUG修复

Michael 8 years ago
parent
commit
7c84246e29

+ 107 - 0
src/main/java/com/goafanti/app/controller/OpenAppDiscoveryController.java

@@ -0,0 +1,107 @@
+package com.goafanti.app.controller;
+
+import javax.annotation.Resource;
+
+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.AchievementInterestService;
+import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.user.service.UserIdentityService;
+
+@RestController
+@RequestMapping(path = "open/app/discovery", method = RequestMethod.GET)
+public class OpenAppDiscoveryController extends BaseApiController {
+	@Resource
+	private AchievementService	achievementService;
+	@Resource
+	private DemandService	demandService;
+	@Resource
+	private UserIdentityService	userIdentityService;
+	@Resource
+	private AchievementInterestService	achievementInterestService;
+	
+	/**
+	 * 成果列表
+	 */
+	@RequestMapping(value = "/achievementList", method = RequestMethod.GET)
+	private Result achievementList(Integer auditStatus, Integer serialNumber, String name, String keyword,Integer dataCategory,Integer category,
+			Integer ownerType,Integer fieldA, Integer status, String releaseDateStartDate, String releaseDateEndDate,
+			Integer releaseStatus,String ownerId,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.listAppUserAchievement(auditStatus, serialNumber, name, keyword,  dataCategory,category,
+				ownerType,  status, releaseDateStartDate, releaseDateEndDate, releaseStatus,ownerId, fieldA, pNo, pSize));
+		return res;
+	}
+	
+	
+	
+	/**
+	 * 需求列表
+	 */
+	@RequestMapping(value = "/demandList", method = RequestMethod.GET)
+	public Result demandList(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,Integer industryCategoryA,
+			String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
+			String releaseDateStartDate, String releaseDateEndDate, String employerId,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.listAppDemand(auditStatus, serialNumber, name, keyword, demandType, industryCategoryA,
+				validityPeriodStartDate, validityPeriodEndDate, status, releaseStatus, releaseDateStartDate,
+				releaseDateEndDate, employerId, pNo, pSize));
+		return res;
+	}
+	
+	/**
+	 * 行业分类列表
+	 * 
+	 */
+	@RequestMapping(value = "/industryList", method = RequestMethod.GET)
+	public Result industryList() {
+		Result res = new Result();
+		res.setData(userIdentityService.industryList());
+		return res;
+	}
+	
+	/**
+	 * 专家列表
+	 */
+	@RequestMapping(value = "/expertsList", method = RequestMethod.GET)
+	public Result expertsList(String industry, Integer pNo, Integer pSize) {
+		Result res = new Result();
+		res.setData(userIdentityService.expertsList(industry,  pNo,  pSize));
+		return res;
+	}
+	
+	/**
+	 * 发现页面广告
+	 */
+	@RequestMapping(value = "/advertising", method = RequestMethod.GET)
+	public Result advertising() {
+		Result res = new Result();
+		res.setData(userIdentityService.advertising());
+		return res;
+	}
+	
+}

+ 111 - 0
src/main/java/com/goafanti/app/controller/OpenAppServiceController.java

@@ -0,0 +1,111 @@
+package com.goafanti.app.controller;
+
+import javax.annotation.Resource;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+
+import com.goafanti.admin.service.AdminService;
+
+import com.goafanti.app.bo.ServiceImages;
+import com.goafanti.business.service.BusinessVarietiesService;
+import com.goafanti.business.service.BusinessProjectService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.utils.StringUtils;
+
+import com.goafanti.user.service.UserIdentityService;
+
+
+@RestController
+@RequestMapping(path = "open/app/service", method = RequestMethod.GET)
+public class OpenAppServiceController extends BaseApiController {
+	@Resource
+	private BusinessVarietiesService	adminVarietiesService;
+	@Resource
+	private BusinessProjectService	businessProjectService;
+	@Resource
+	private AdminService			adminService;
+	@Resource
+	private UserIdentityService 	userIdentityService;
+
+	/**
+	 * 获取初级品类
+	 */
+	@RequestMapping(value = "/getVarieties", method = RequestMethod.GET)
+	public Result getVarieties() {
+		Result res = new Result();
+		res.setData(adminVarietiesService.getVarieties());
+		return res;
+	}
+	/**
+	 * 获取服务轮播图
+	 */
+	@RequestMapping(value = "/getImagers", method = RequestMethod.GET)
+	public Result getImagers() {
+		Result res = new Result();
+		ServiceImages	serviceImages=new ServiceImages();
+		res.setData(serviceImages.getImagers());
+		return res;
+	}
+	/**
+	 * 获取品类下的项目
+	 */
+	@RequestMapping(value = "/getBusinessProject", method = RequestMethod.GET)
+	public Result getBusinessProject(String id,Integer pNo,Integer pSize) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"品类必须指定","品类"));
+			return res;
+		}
+		res.setData(businessProjectService.getBusinessProject(id,pNo, pSize));
+		//res.setData(new Pagination<ProjectBo>());
+		return res;
+	}
+	/**
+	 * 项目详情
+	 */
+	@RequestMapping(value = "/ProjectDetail", method = RequestMethod.GET)
+	public Result ProjectDetail(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"项目必须指定","项目"));
+			return res;
+		}
+		res.setData(businessProjectService.orgProject(id));
+		return res;
+	}
+	/**
+	 * 推荐列表
+	 */
+	@RequestMapping(value = "/recommendProjectList", method = RequestMethod.GET)
+	public Result recommendProjectList(Integer pNo,Integer pSize) {
+		Result res = new Result();
+		res.setData(businessProjectService.recommendProjectList( pNo, pSize));
+		return res;
+	}
+	/**
+	 * 一对一
+	 */
+	@RequestMapping(value = "/consultantList", method = RequestMethod.GET)
+	public Result consultantList(Integer pNo,Integer pSize) {
+		Result res = new Result();
+		res.setData(userIdentityService.consultantList( pNo, pSize));
+		return res;
+	}
+	/**
+	 * 咨询师详情
+	 */
+	@RequestMapping(value = "/consultantDetail", method = RequestMethod.GET)
+	public Result consultantDetail(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"咨询师必须指定","咨询师"));
+			return res;
+		}
+		res.setData(userIdentityService.consultantDetail( id));
+		return res;
+	}
+}