Browse Source

Merge branch 'master' of https://git.coding.net/aft/AFT.git

anderx 8 years ago
parent
commit
e31d76d28b

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

+ 0 - 26
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -1897,9 +1897,6 @@
 	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
 	LEFT JOIN admin a on a.id = d.tech_broker_id
 	LEFT JOIN department_management dm on dm.id = a.department_id
-	<if test="adminId != null">
-		LEFT JOIN user u on d.employer_id = u.id
-	</if>
 	<if test="hot != null and hot == 1"><!-- 在首页 -->
 		inner join marketing_management mm on d.id = mm.product_id
 	</if>
@@ -1913,16 +1910,6 @@
 	<if test="dataCategory != null">
 		and d.data_category = #{dataCategory,jdbcType=VARCHAR}
 	</if>
-	<if test="adminId != null">
-		and (u.mid = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  d.principal_id = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  d.tech_broker_id = #{adminId,jdbcType=VARCHAR}
-		)
-	</if>
 	<!-- <if test="province != null">
 		and  oi.licence_province = #{province,jdbcType=INTEGER}
 	</if> -->
@@ -1997,9 +1984,6 @@
 	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
 	LEFT JOIN admin a on a.id = d.tech_broker_id
 	LEFT JOIN department_management dm on dm.id = a.department_id
-	<if test="adminId != null">
-		LEFT JOIN user u on d.employer_id = u.id
-	</if>
 	<if test="hot != null and hot == 1"><!-- 在首页 -->
 		inner join marketing_management mm on d.id = mm.product_id
 	</if>
@@ -2013,16 +1997,6 @@
 	<if test="dataCategory != null">
 		and d.data_category = #{dataCategory,jdbcType=VARCHAR}
 	</if>
-	<if test="adminId != null">
-		and (u.mid = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  d.principal_id = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  d.tech_broker_id = #{adminId,jdbcType=VARCHAR}
-		)
-	</if>
 	<if test="serialNumber != null">
 		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
 	</if>

+ 1 - 1
src/main/java/com/goafanti/demand/controller/AdminDemandApiController.java

@@ -686,7 +686,7 @@ public class AdminDemandApiController extends CertifyApiController {
 	}
 	
 	/**
-	 * 我的需求列表
+	 * 科技需管理求列表
 	 */
 	@RequestMapping(value = "/manageList", method = RequestMethod.GET)
 	public Result manageList(Integer dataCategory,String employerName, Integer auditStatus, Integer province, Integer serialNumber, String name, String keyword,

+ 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 new IndexBo();
 	}
 
 	@SuppressWarnings("unchecked")