Преглед изворни кода

Merge branch 'test' of ssh://git@git.jishutao.com:55555/jishutao/jitao-server.git into test

limin пре 7 година
родитељ
комит
39e02db168

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

@@ -116,7 +116,7 @@ public class OpenAppDiscoveryController extends BaseApiController {
 	public Result consultantList(String name,Integer sortType, Integer consultantType, Integer province,Integer city,
 			 Integer area, Integer pageNo, Integer pageSize) {
 		Result res = new Result();
-		res.setData(userIdentityService.appConsultantList( name, sortType,  consultantType,  province, city,
+		res.setData(userIdentityService.consultantList( name, sortType,  consultantType,  province, city,
 				  area,  pageNo,  pageSize));
 		return res;
 	}

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

@@ -88,10 +88,10 @@ public class OpenAppUserController extends BaseApiController {
 	public Result expertsDetail(String id ) {
 		Result res = new Result();
 		if (StringUtils.isBlank(id)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"专家必须指定","专家"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"id必须指定","id"));
 			return res;
 		}
-		res.setData(userIdentityService.selectAppExpertsDetail( id));
+		res.setData(userIdentityService.selectExpertsDetail( id));
 		return res;
 	}
 	
@@ -102,11 +102,11 @@ public class OpenAppUserController extends BaseApiController {
 	public Result expertsComment(String id ,Integer pageNo,Integer pageSize) {
 		Result res = new Result();
 		if (StringUtils.isBlank(id)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"专家必须指定","专家"));
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"id必须指定","id"));
 			return res;
 		}
 		CommentResult commentResult=new CommentResult();
-		ExpertsListBo e=userIdentityService.selectAppExpertsDetail( id);
+		ExpertsListBo e=userIdentityService.selectExpertsDetail( id);
 		commentResult.setNegativeCommentCount(e.getInferior());
 		commentResult.setOrdinaryCommentCount(e.getGeneral());
 		commentResult.setPositiveCommentCount(e.getFavorable());

+ 2 - 2
src/main/java/com/goafanti/business/controller/AdminJtBusinessController.java

@@ -341,7 +341,7 @@ public class AdminJtBusinessController extends CertifyApiController{
     	}
 		int x=jtBusinessService.updateProjectMoveUp(id);
 		if(x==-1) {
-    		result.getError().add(buildError("上移失败","上移失败"));return result;
+    		result.getError().add(buildError("已到顶部无法上移","已到顶部无法上移"));return result;
     	}
 		result.data(x);
 		return result;
@@ -357,7 +357,7 @@ public class AdminJtBusinessController extends CertifyApiController{
     	}
 		int x=jtBusinessService.updateProjectSetTop(id);
 		if(x==-1) {
-    		result.getError().add(buildError("置顶失败","置顶失败"));return result;
+    		result.getError().add(buildError("已到顶部无法上移","已到顶部无法上移"));return result;
     	}
 		result.data(x);
 		return result;

+ 2 - 2
src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java

@@ -455,7 +455,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	public int updateProjectMoveUp(String id) {
 		JtBusinessCategory j1=jtBusinessCategoryMapper.selectByPrimaryKey(id);
 		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getLayer(),0);
-		if(null==j1||null==j2){
+		if(null==j2){
 			return -1;
 		}
 		Integer i=j1.getSort();
@@ -474,7 +474,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	public int updateProjectSetTop(String id) {
 		JtBusinessCategory j1=jtBusinessCategoryMapper.selectByPrimaryKey(id);
 		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getLayer(),1);
-		if(null==j1||null==j2){
+		if(null==j2){
 			return -1;
 		}
 		Integer i=j1.getSort();

+ 78 - 0
src/main/java/com/goafanti/user/controller/UserIdentityApiController.java

@@ -0,0 +1,78 @@
+package com.goafanti.user.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.app.bo.ExpertsListBo;
+import com.goafanti.comment.bo.CommentResult;
+import com.goafanti.comment.service.CommentService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.enums.UserType;
+import com.goafanti.common.model.UserInterest;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.user.service.UserIdentityService;
+import com.goafanti.user.service.UserInterestService;
+
+@RestController
+@RequestMapping(value = "/open/api/user/identity")
+public class UserIdentityApiController extends CertifyApiController {
+	@Resource
+	private UserIdentityService userIdentityService;
+	@Resource
+	private CommentService	commentService;
+
+	/**
+	 * 顾问列表
+	 */
+	@RequestMapping(value = "/consultantList", method = RequestMethod.GET)
+	public Result consultantList(String name,Integer sortType, Integer consultantType, Integer province,Integer city,
+			 Integer area, Integer pageNo, Integer pageSize) {
+		Result res = new Result();
+		res.setData(userIdentityService.consultantList( name, sortType,  consultantType,  province, city,
+				  area,  pageNo,  pageSize));
+		return res;
+	}
+	/**
+	 * 顾问详情
+	 * @param id
+	 * @return
+	 */
+	@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.selectExpertsDetail( id));
+		return res;
+	}
+	/**
+	 * 顾问评价
+	 */
+	@RequestMapping(value = "/expertsComment", method = RequestMethod.GET)
+	public Result expertsComment(String id ,Integer pageNo,Integer pageSize) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"顾问必须指定","顾问"));
+			return res;
+		}
+		CommentResult commentResult=new CommentResult();
+		ExpertsListBo e=userIdentityService.selectExpertsDetail( id);
+		commentResult.setNegativeCommentCount(e.getInferior());
+		commentResult.setOrdinaryCommentCount(e.getGeneral());
+		commentResult.setPositiveCommentCount(e.getFavorable());
+		commentResult.setTotalCommentCount(e.getCommentCount());
+		commentResult.setComments(commentService.selectExpertsComment(id, pageNo, pageSize));
+		res.setData(commentResult);
+		return res;
+	}
+
+
+}

+ 2 - 2
src/main/java/com/goafanti/user/service/UserIdentityService.java

@@ -82,9 +82,9 @@ public interface UserIdentityService {
 
 	Pagination<ExpertsListBo> appExpertsList(String name, String industry, Integer sortType,Integer pageNo, Integer pageSize);
 
-	ExpertsListBo selectAppExpertsDetail(String id);
+	ExpertsListBo selectExpertsDetail(String id);
 
-	Pagination<ExpertsListBo> appConsultantList(String name, Integer sortType, Integer consultantType, Integer province, Integer city,
+	Pagination<ExpertsListBo> consultantList(String name, Integer sortType, Integer consultantType, Integer province, Integer city,
 			Integer area, Integer pageNo, Integer pageSize);
 	/**
 	 * 更改用户认证(顾问/专家)审核状态

+ 2 - 2
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -551,7 +551,7 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 	}
 
 	@Override
-	public ExpertsListBo selectAppExpertsDetail(String id) {
+	public ExpertsListBo selectExpertsDetail(String id) {
 		ExpertsListBo expertsListBo=userIdentityMapper.selectAppExpertsDetail(id,TokenManager.getUserId());
 		expertsListBo.setCommentDetailResult(userIdentityMapper.expertsCommentByUid(id));
 		return expertsListBo;
@@ -559,7 +559,7 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<ExpertsListBo> appConsultantList(String name, Integer sortType, Integer consultantType,
+	public Pagination<ExpertsListBo> consultantList(String name, Integer sortType, Integer consultantType,
 			Integer province, Integer city, Integer area, Integer pageNo, Integer pageSize) {
 		if(pageNo==null || pageNo<1)pageNo=1;
 		if(pageSize==null ||pageSize<1)pageSize=10; 

+ 0 - 1
src/main/webapp/WEB-INF/views/common.html

@@ -426,7 +426,6 @@
 								<option value="0">个人</option>
 								<option value="1">企业</option>
 							</select>
-							<span class="star"> * </span>
 						</div>
 						<div class="login_check">
 						<a href="#">忘记密码?</a>

+ 1 - 1
src/main/webapp/WEB-INF/views/user/signIn.html

@@ -38,7 +38,7 @@
 						</div>
 						<div class="zhuce_input">
 							<img th:src="${portalHost+'/img/resiger_username.jpg'}" alt=""/>
-							<select id="customerType">
+							<select id="customerTypes">
 								<option value="0">个人</option>
 								<option value="1">企业</option>
 							</select>