Просмотр исходного кода

Accept Merge Request #281 更新测试 : (prod -> test)

Merge Request: 更新测试
Created By: @浅川
Accepted By: @浅川
URL: https://coding.net/t/aft/p/AFT/git/merge/281
浅川 лет назад: 8
Родитель
Сommit
71c9c7c976

+ 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;
+	}
+}

+ 102 - 0
src/main/java/com/goafanti/app/controller/OpenAppUserController.java

@@ -0,0 +1,102 @@
+package com.goafanti.app.controller;
+
+import javax.annotation.Resource;
+import org.apache.commons.lang3.StringUtils;
+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.activity.service.ActivityService;
+import com.goafanti.banners.service.BannersService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.easemob.EasemobUtils;
+import com.goafanti.message.service.MessageService;
+import com.goafanti.news.service.NewsService;
+import com.goafanti.user.service.UserCareerService;
+import com.goafanti.user.service.UserIdentityService;
+import com.goafanti.user.service.UserInterestService;
+import com.goafanti.user.service.UserService;
+
+@RestController
+@RequestMapping(path = "open/app/user", method = RequestMethod.GET)
+public class OpenAppUserController extends BaseApiController {
+	@Resource
+	private UserService userServiceImpl;
+	@Resource
+	private MessageService messageService;
+	@Resource
+	private EasemobUtils   easemobUtils;
+	@Resource
+	private BannersService		bannersService;
+	@Resource
+	private ActivityService		activityService;
+	@Resource
+	private NewsService			newsService;
+	@Resource
+	private AchievementService	achievementService;
+	@Resource
+	private DemandService		demandService;
+	@Resource
+	private UserCareerService	userCareerService;
+	@Resource
+	private UserInterestService userInterestService; 
+	@Resource
+	private UserIdentityService	userIdentityService;
+	@Resource
+	AchievementInterestService achievementInterestService;
+	
+	
+	/**
+	 * 专家详情
+	 */
+	@RequestMapping(value = "/expertsDetail", method = RequestMethod.GET)
+	public Result expertsDetail(String uid) {
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"专家必须指定","专家"));
+			return res;
+		}
+		res.setData(userIdentityService.expertsDetail( uid));
+		return res;
+	}
+	/**
+	 * 成果详情
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/achievementDetail", method = RequestMethod.GET)
+	private Result userDetail(String id ) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"成果必须指定","成果"));
+			return res;
+		}
+		res.setData(achievementService.selectAppUserOwnerDetail(id));
+		return res;
+	}
+	/**
+	 * 需求详情
+	 */
+	@RequestMapping(value = "/demandDetail", method = RequestMethod.GET)
+	public Result DemandDetail(String id ) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"需求必须指定","需求"));
+			return res;
+		}
+		res.setData(demandService.selectDemandDetail( id));
+		return res;
+	}
+	
+	@RequestMapping(value = "/index", method = RequestMethod.GET)
+	public Result index(){
+		Result res = new Result();
+		res.setData(messageService.selectMessageWithGroup());
+		return res;
+	}
+}

+ 1 - 1
src/main/java/com/goafanti/message/service/impl/MessageServiceImpl.java

@@ -356,7 +356,7 @@ public class MessageServiceImpl  extends BaseMybatisDao<MessageFromSystemMapper>
 		}else if(TokenManager.getToken()  instanceof User){
 			return messageFromSystemMapper.selectMessageWithGroup(TokenManager.getUserId());
 		}
-		return null;
+		return messageFromSystemMapper.selectMessageWithGroup("");
 	}
 
 	@SuppressWarnings("unchecked")