浏览代码

新增政策详情、新闻详情

anderx 7 年之前
父节点
当前提交
2b46a31268

+ 2 - 2
src/main/java/com/goafanti/app/controller/AppDiscoveryController.java

@@ -18,7 +18,7 @@ import com.goafanti.news.service.NewsService;
 import com.goafanti.user.service.UserIdentityService;
 
 @RestController
-@RequestMapping(path = "/open/discovery", method = RequestMethod.GET)
+@RequestMapping(path = "/app/discovery", method = RequestMethod.GET)
 public class AppDiscoveryController extends CertifyApiController {
 	@Resource
 	private AchievementService	achievementService;
@@ -134,7 +134,7 @@ public class AppDiscoveryController extends CertifyApiController {
 	@RequestMapping(value = "/newsDetail", method = RequestMethod.GET)
 	public Result newsDetail(long id) {
 		Result res = new Result();
-		res.setData(newsService.findNewsDetail(id));
+		res.setData(newsService.findAppNewsDetail(id));
 		return res;
 	}
 	

+ 0 - 3
src/main/java/com/goafanti/app/controller/AppUserController.java

@@ -637,12 +637,10 @@ public class AppUserController extends CertifyApiController {
 					AchievementFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
-
 		if (StringUtils.isBlank(ia.getId())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果ID", "成果ID"));
 			return res;
 		}
-
 		/*if (!AchievementAuditStatus.CREATE.getCode().equals(ia.getAuditStatus())
 				&& !AchievementAuditStatus.SUBMIT.getCode().equals(ia.getAuditStatus())
 				&& !AchievementAuditStatus.UNAUDITED.getCode().equals(ia.getAuditStatus())) {
@@ -674,7 +672,6 @@ public class AppUserController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果名称", "成果名称"));
 			return res;
 		}
-
 		if (null == ia.getCategory()) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到数据类别", "数据类别"));
 			return res;

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

@@ -151,6 +151,16 @@ public class OpenAppDiscoveryController extends BaseApiController {
 		return res;
 	}
 	/**
+	 * 新闻详情
+	 */
+	@RequestMapping(value = "/newsDetail", method = RequestMethod.GET)
+	public Result newsDetail(long id) {
+		Result res = new Result();
+		res.setData(newsService.findAppNewsDetail(id));
+		return res;
+	}
+	
+	/**
 	 * 科技资讯列表
 	 */
 	@RequestMapping(value = "/listInformation", method = RequestMethod.GET)

+ 4 - 0
src/main/java/com/goafanti/news/service/NewsService.java

@@ -352,6 +352,10 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 		return p;
 	}
 
+	public News findAppNewsDetail(long id) {
+		return newsMapper.selectByPrimaryKey(id);
+	}
+