OpenAppDiscoveryController.java 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. package com.goafanti.app.controller;
  2. import javax.annotation.Resource;
  3. import org.springframework.web.bind.annotation.RequestMapping;
  4. import org.springframework.web.bind.annotation.RequestMethod;
  5. import org.springframework.web.bind.annotation.RestController;
  6. import com.goafanti.achievement.service.AchievementInterestService;
  7. import com.goafanti.achievement.service.AchievementService;
  8. import com.goafanti.common.bo.Result;
  9. import com.goafanti.common.controller.BaseApiController;
  10. import com.goafanti.common.utils.StringUtils;
  11. import com.goafanti.demand.service.DemandService;
  12. import com.goafanti.news.service.NewsService;
  13. import com.goafanti.news.service.PolicyService;
  14. import com.goafanti.user.service.UserIdentityService;
  15. @RestController
  16. @RequestMapping(path = "/open/app/discovery", method = RequestMethod.GET)
  17. public class OpenAppDiscoveryController extends BaseApiController {
  18. @Resource
  19. private AchievementService achievementService;
  20. @Resource
  21. private DemandService demandService;
  22. @Resource
  23. private UserIdentityService userIdentityService;
  24. @Resource
  25. private AchievementInterestService achievementInterestService;
  26. @Resource
  27. private NewsService newsService;
  28. @Resource
  29. private PolicyService policyService;
  30. /**
  31. * 成果列表
  32. */
  33. @RequestMapping(value = "/achievementList", method = RequestMethod.GET)
  34. private Result achievementList(Integer auditStatus, Integer serialNumber, String name, String keyword,Integer dataCategory,Integer category,
  35. Integer ownerType,Integer fieldA, Integer status, String releaseDateStartDate, String releaseDateEndDate,
  36. Integer releaseStatus,String ownerId,String pageNo, String pageSize) {
  37. Result res = new Result();
  38. Integer pNo = 1;
  39. Integer pSize = 10;
  40. if (StringUtils.isNumeric(pageSize)) {
  41. pSize = Integer.parseInt(pageSize);
  42. }
  43. if (StringUtils.isNumeric(pageNo)) {
  44. pNo = Integer.parseInt(pageNo);
  45. }
  46. res.setData(achievementService.listAppUserAchievement(auditStatus, serialNumber, name, keyword, dataCategory,category,
  47. ownerType, status, releaseDateStartDate, releaseDateEndDate, releaseStatus,ownerId, fieldA, pNo, pSize));
  48. return res;
  49. }
  50. /**
  51. * 需求列表
  52. */
  53. @RequestMapping(value = "/demandList", method = RequestMethod.GET)
  54. public Result demandList(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,Integer industryCategoryA,
  55. String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
  56. String releaseDateStartDate, String releaseDateEndDate, String employerId,String pageNo, String pageSize) {
  57. Result res = new Result();
  58. Integer pNo = 1;
  59. Integer pSize = 10;
  60. if (StringUtils.isNumeric(pageSize)) {
  61. pSize = Integer.parseInt(pageSize);
  62. }
  63. if (StringUtils.isNumeric(pageNo)) {
  64. pNo = Integer.parseInt(pageNo);
  65. }
  66. res.setData(demandService.listAppDemand(auditStatus, serialNumber, name, keyword, demandType, industryCategoryA,
  67. validityPeriodStartDate, validityPeriodEndDate, status, releaseStatus, releaseDateStartDate,
  68. releaseDateEndDate, employerId, pNo, pSize));
  69. return res;
  70. }
  71. /**
  72. * 行业分类列表
  73. *
  74. */
  75. @RequestMapping(value = "/industryList", method = RequestMethod.GET)
  76. public Result industryList() {
  77. Result res = new Result();
  78. res.setData(userIdentityService.industryList());
  79. return res;
  80. }
  81. /**
  82. * 专家领域分类列表
  83. *
  84. */
  85. @RequestMapping(value = "/domainList", method = RequestMethod.GET)
  86. public Result domainList() {
  87. Result res = new Result();
  88. res.setData(userIdentityService.domainList());
  89. return res;
  90. }
  91. /**
  92. * 专家列表
  93. */
  94. @RequestMapping(value = "/expertsList", method = RequestMethod.GET)
  95. public Result expertsList(String name,String industry, Integer sortType,Integer pageNo, Integer pageSize) {
  96. Result res = new Result();
  97. res.setData(userIdentityService.appExpertsList(name,industry,sortType,pageNo,pageSize));
  98. return res;
  99. }
  100. /**
  101. * 顾问列表
  102. */
  103. @RequestMapping(value = "/consultantList", method = RequestMethod.GET)
  104. public Result consultantList(String name,Integer sortType, Integer consultantType, Integer province,Integer city,
  105. Integer area, Integer pageNo, Integer pageSize) {
  106. Result res = new Result();
  107. res.setData(userIdentityService.consultantList( name, sortType, consultantType, province, city,
  108. area, pageNo, pageSize));
  109. return res;
  110. }
  111. /**
  112. * 发现页面广告
  113. */
  114. @RequestMapping(value = "/advertising", method = RequestMethod.GET)
  115. public Result advertising() {
  116. Result res = new Result();
  117. res.setData(userIdentityService.advertising());
  118. return res;
  119. }
  120. /**
  121. * 政策列表
  122. */
  123. @RequestMapping(value = "/listPolicy", method = RequestMethod.GET)
  124. public Result ListPolicy(Integer pageNo,Integer pageSize) {
  125. Result res = new Result();
  126. res.setData(policyService.appListPolicy(pageNo, pageSize));
  127. return res;
  128. }
  129. /**
  130. * 政策详情
  131. */
  132. @RequestMapping(value = "/policyDetail", method = RequestMethod.GET)
  133. public Result policyDetail(String id) {
  134. Result res = new Result();
  135. res.setData(policyService.policyDetail(id));
  136. return res;
  137. }
  138. /**
  139. * 新闻详情
  140. */
  141. @RequestMapping(value = "/newsDetail", method = RequestMethod.GET)
  142. public Result newsDetail(long id) {
  143. Result res = new Result();
  144. res.setData(newsService.findAppNewsDetail(id));
  145. return res;
  146. }
  147. /**
  148. * 科技资讯列表
  149. */
  150. @RequestMapping(value = "/listInformation", method = RequestMethod.GET)
  151. public Result listInformation(Integer pageNo,Integer pageSize) {
  152. Result res = new Result();
  153. res.setData(newsService.appListinformation( pageNo, pageSize));
  154. return res;
  155. }
  156. /**
  157. * 科技资讯详情
  158. */
  159. @RequestMapping(value = "/informationDetail", method = RequestMethod.GET)
  160. public Result informationDetail(String id) {
  161. Result res = new Result();
  162. res.setData(newsService.informationDetail(id));
  163. return res;
  164. }
  165. /**
  166. * 资产百科列表
  167. */
  168. @RequestMapping(value = "/listEncyclopedia", method = RequestMethod.GET)
  169. public Result listEncyclopedia(Integer pageNo,Integer pageSize) {
  170. Result res = new Result();
  171. res.setData(newsService.listEncyclopedia( pageNo, pageSize));
  172. return res;
  173. }
  174. }