Antiloveg 8 years ago
parent
commit
641fe8a98a

+ 16 - 2
src/main/java/com/goafanti/portal/controller/PortalSearchApiController.java

@@ -13,7 +13,7 @@ import com.goafanti.achievement.service.AchievementInterestService;
 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.controller.CertifyApiController;
 import com.goafanti.common.enums.AchievementAuditStatus;
 import com.goafanti.common.enums.AchievementReleaseStatus;
 import com.goafanti.common.enums.DeleteStatus;
@@ -28,7 +28,7 @@ import com.goafanti.demand.service.DemandService;
 
 @RestController
 @RequestMapping(value = "/portal/search")
-public class PortalSearchApiController extends BaseApiController {
+public class PortalSearchApiController extends CertifyApiController {
 	@Resource
 	private AchievementService			achievementService;
 	@Resource
@@ -63,6 +63,9 @@ public class PortalSearchApiController extends BaseApiController {
 	@RequestMapping(value = "/demandCancelInterest", method = RequestMethod.POST)
 	public Result demandCancelInterest(String id) {
 		Result res = new Result();
+		if(!checkUserLogin(res)){
+			return res;
+		}
 		if (StringUtils.isBlank(id)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
 			return res;
@@ -77,6 +80,9 @@ public class PortalSearchApiController extends BaseApiController {
 	@RequestMapping(value = "/demandInterest", method = RequestMethod.POST)
 	public Result demandInterest(String id) {
 		Result res = new Result();
+		if(!checkUserLogin(res)){
+			return res;
+		}
 		if (StringUtils.isBlank(id)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
 			return res;
@@ -99,6 +105,9 @@ public class PortalSearchApiController extends BaseApiController {
 	@RequestMapping(value = "/achievementCancelInterest", method = RequestMethod.POST)
 	public Result achievementCancelInterest(String id) {
 		Result res = new Result();
+		if(!checkUserLogin(res)){
+			return res;
+		}
 		if (StringUtils.isBlank(id)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果ID", "成果ID"));
 			return res;
@@ -113,6 +122,11 @@ public class PortalSearchApiController extends BaseApiController {
 	@RequestMapping(value = "/achievementInterest", method = RequestMethod.POST)
 	public Result achievementInterest(String id) {
 		Result res = new Result();
+		
+		if(!checkUserLogin(res)){
+			return res;
+		}
+		
 		if (StringUtils.isBlank(id)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果ID", "科技成果ID"));
 			return res;