|
|
@@ -6,11 +6,13 @@ 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.CertifyApiController;
|
|
|
import com.goafanti.common.enums.UserType;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
|
+import com.goafanti.demand.service.DemandService;
|
|
|
import com.goafanti.user.service.UserService;
|
|
|
|
|
|
@RestController
|
|
|
@@ -18,6 +20,10 @@ import com.goafanti.user.service.UserService;
|
|
|
public class UserPartnerApiController extends CertifyApiController {
|
|
|
@Resource
|
|
|
private UserService userService;
|
|
|
+ @Resource
|
|
|
+ private DemandService demandService;
|
|
|
+ @Resource
|
|
|
+ private AchievementService achievementService;
|
|
|
|
|
|
/**
|
|
|
* "伙伴"主页详情
|
|
|
@@ -48,16 +54,53 @@ public class UserPartnerApiController extends CertifyApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * "伙伴"主页--科技需求列表
|
|
|
+ */
|
|
|
@RequestMapping(value = "/demandList", method = RequestMethod.GET)
|
|
|
- public Result demandList() {
|
|
|
+ public Result demandList(String employerId, String pageNo, String pageSize) {
|
|
|
Result res = new Result();
|
|
|
+ if (StringUtils.isBlank(employerId)){
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "employerId"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ 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.lisePartnerDemand(employerId, pNo, pSize));
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- /*
|
|
|
- * public Result achievementList(){
|
|
|
- *
|
|
|
- * }
|
|
|
+ /**
|
|
|
+ * "伙伴"主页--科技成果列表
|
|
|
*/
|
|
|
+ @RequestMapping(value = "/achievementList", method = RequestMethod.GET)
|
|
|
+ public Result achievementList(String ownerId, String pageNo, String pageSize){
|
|
|
+ Result res = new Result();
|
|
|
+ if (StringUtils.isBlank(ownerId)){
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "ownerId"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ 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.listPartnerAchievement(ownerId, pNo, pSize));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
}
|