Browse Source

APP发布成果后台开发

anderx 8 years ago
parent
commit
cf9d61e0e2

+ 15 - 2
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -35,6 +35,7 @@ import com.goafanti.common.dao.DemandKeywordMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
+import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.dao.UserRoleMapper;
 import com.goafanti.common.enums.AchievementAuditStatus;
 import com.goafanti.common.enums.AchievementReleaseStatus;
@@ -52,6 +53,7 @@ import com.goafanti.common.model.AchievementKeyword;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrganizationIdentity;
+import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.LoggerUtils;
@@ -89,6 +91,8 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	private OrganizationIdentityMapper		organizationIdentityMapper;
 	@Autowired
 	private AchievementInterestMapper	achievementInterestMapper;
+	@Autowired
+	private UserMapper					userMapper;
 
 	private static final Logger				logger	= LoggerFactory.getLogger(AchievementServiceImpl.class);
 
@@ -144,7 +148,6 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		a.setDeletedSign(DeleteStatus.UNDELETE.getCode());
 		Calendar now = Calendar.getInstance();
 		now.set(Calendar.MILLISECOND, 0);
-
 		if (TokenManager.getToken() instanceof Admin) {
 			a.setTechBrokerId(TokenManager.getAdminId());
 		}
@@ -156,7 +159,17 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		} else {
 			a.setAuditStatus(AchievementAuditStatus.CREATE.getCode());
 		}
-
+		if (null!=TokenManager.getUserId()) {
+			a.setOwnerId(TokenManager.getUserId());
+			User u=userMapper.selectByPrimaryKey(TokenManager.getUserId());
+			if (null!=u.getType()) {
+				a.setOwnerType(u.getType());
+			}if (StringUtils.isNotBlank(u.getMobile())) {
+				a.setOwnerMobile(u.getMobile());
+			}if (StringUtils.isNotBlank(u.getNickname())) {
+				a.setOwnerName(u.getNickname());
+			}
+		}
 		a.setCreateTime(now.getTime());
 		achievementMapper.insert(a);
 		disposeAchievementKeyword(keywords, a, false);

+ 10 - 0
src/main/java/com/goafanti/app/bo/ProjectBo.java

@@ -7,6 +7,8 @@ public class ProjectBo {
 	
 	private String minLogoUrl;
 	
+	private String maxLogoUrl;
+	
 	private String name;
 	
 	private String introduce;
@@ -80,4 +82,12 @@ public class ProjectBo {
 	public void setProjectUrl(String projectUrl) {
 		this.projectUrl = projectUrl;
 	}
+
+	public String getMaxLogoUrl() {
+		return maxLogoUrl;
+	}
+
+	public void setMaxLogoUrl(String maxLogoUrl) {
+		this.maxLogoUrl = maxLogoUrl;
+	}
 }

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

@@ -8,15 +8,20 @@ import java.util.UUID;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.crypto.hash.SimpleHash;
+import org.springframework.beans.BeanUtils;
 import org.springframework.http.HttpMethod;
+import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.alibaba.fastjson.JSONObject;
+import com.goafanti.achievement.bo.InputAchievement;
 import com.goafanti.achievement.service.AchievementInterestService;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.activity.service.ActivityService;
@@ -25,11 +30,15 @@ import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.enums.AchievementFields;
+import com.goafanti.common.enums.AttachmentType;
+import com.goafanti.common.model.Achievement;
 import com.goafanti.common.model.JpushEasemobAccount;
 import com.goafanti.common.model.MessageConsumer;
 import com.goafanti.common.model.MessageFromSystem;
 import com.goafanti.common.model.MessageProducer;
 import com.goafanti.common.model.User;
+import com.goafanti.common.service.FieldGlossoryService;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.service.DemandService;
@@ -45,7 +54,7 @@ import com.goafanti.user.service.UserInterestService;
 import com.goafanti.user.service.UserService;
 
 @RestController
-@RequestMapping(path = "/app/user", method = RequestMethod.GET)
+@RequestMapping(path = "/open/app/user", method = RequestMethod.GET)
 public class AppUserController extends BaseApiController {
 	@Resource
 	private UserService userServiceImpl;
@@ -71,6 +80,10 @@ public class AppUserController extends BaseApiController {
 	private UserIdentityService	userIdentityService;
 	@Resource
 	AchievementInterestService achievementInterestService;
+	@Resource
+	private FieldGlossoryService fieldGlossoryService;
+	
+	
 	
 	@RequestMapping(value = "/uploadImg",method = RequestMethod.POST)
 	public Result uploadAvatar(HttpServletRequest req){
@@ -362,6 +375,98 @@ public class AppUserController extends BaseApiController {
 		res.setData(demandService.selectDemandDetail( id));
 		return res;
 	}
+	/**
+     * 新增成果
+     */
+    
+	@RequestMapping(value = "/appAddAchievement", method = RequestMethod.POST)
+    private Result apply(@Valid InputAchievement ia, BindingResult bindingResult,
+            String keyword1,String keyword2,String keyword3) {
+        Result res = new Result();
+        String[] keywords ;
+        if (null==keyword3) {
+        	keywords=new String[]{keyword1,keyword2}; 
+        }else if (null==keyword2) {
+        	keywords=new String[]{keyword1};
+        }else {
+        	keywords=new String[]{keyword1,keyword2,keyword3};
+		}
+        System.out.println( StringUtils.join(keywords,","));
+        ia.setKeyword(StringUtils.join(keywords,","));
+        if (bindingResult.hasErrors()) {
+            res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+                    AchievementFields.getFieldDesc(bindingResult.getFieldError().getField())));
+            return res;
+        }
+        
+       res = disposeInputAchievement(res, ia, keywords);
+        if (!res.getError().isEmpty()) {
+            return res;
+        }
+        Achievement a = new Achievement();
+        BeanUtils.copyProperties(ia, a);
+        achievementService.saveAchievement(a, keywords);
+        return res;
+    }
+    
+    private Result disposeInputAchievement(Result res, InputAchievement ia, String[] keywords) {
+        if (StringUtils.isBlank(ia.getName())) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果名称", "成果名称"));
+            return res;
+        }
+        if (null == ia.getCategory()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到数据类别", "数据类别"));
+            return res;
+        }
+        if (StringUtils.isBlank(ia.getKeyword())) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
+            return res;
+        }
+        if (null == keywords || keywords.length < 1) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到关键词", "关键词"));
+            return res;
+        }
+        
+        if (null == ia.getCooperationMode()) {
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到合作方式", "合作方式"));
+            return res;
+        }
+        for (int i = 0; i < keywords.length; i++) {
+            if (AFTConstants.KEYWORDLENTH < keywords[i].length()) {
+                res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "关键词长度"));
+                return res;
+            }
+        }
+        return res;
+    }
+    /**
+     * 图片上传
+     */
+    @RequestMapping(value = "/uploadPicture", method = RequestMethod.POST)
+    public Result uploadPicture(HttpServletRequest req, String sign) {
+        Result res = new Result();
+        AttachmentType attachmentType = AttachmentType.getField(sign);
+        if (attachmentType == AttachmentType.ACHIEVEMENT_TECHNICAL_PICTURE
+                || attachmentType == AttachmentType.ACHIEVEMENT_MATURITY_PICTURE
+                || attachmentType == AttachmentType.ACHIEVEMENT_COVER_PICTURE) {
+            res.setData(handleFiles(res, "/achievement/", false, req, sign, "achievement"));
+        } else {
+            res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+        }
+        return res;
+    }
+    /**
+     * 获取领域
+     * @param pid
+     * @param level
+     * @return
+     */
+    @RequestMapping(value = "/getField", method = RequestMethod.POST)
+    public Result getField(Integer pid, Integer level) {
+    	Result res = new Result();
+    	res.setData(fieldGlossoryService.getField(pid, level));
+    	return res;
+    }
 	
 
 	/**

+ 8 - 0
src/main/java/com/goafanti/business/service/BusinessProjectService.java

@@ -49,10 +49,18 @@ public interface BusinessProjectService {
 	
 	boolean judgeBeing(BusinessProject s);
 
+	List<ProjectBo> portalRecommend();
+	
 	Pagination<ProjectBo> getBusinessProject(String id,Integer pNo,Integer pSize);
 
 	Pagination<ProjectBo> recommendProjectList(Integer pNo, Integer pSize);
 
 	boolean checkProject(String id);
+
+	Pagination<ProjectBo> portalRecommendList(Integer pNo, Integer pSize);
+
+	Pagination<ProjectBo> portalBusinessProject(String id, Integer pNo, Integer pSize);
+
+	ProjectDetailBo ProjectDetail(String id);
 	
 }

+ 2 - 0
src/main/java/com/goafanti/business/service/BusinessVarietiesService.java

@@ -34,5 +34,7 @@ public interface BusinessVarietiesService {
 	List<VarietiesBo> getVarieties();
 
 	int  updateLocation(String id, Integer sort, Integer flag);
+
+	List<VarietiesBo> portalVarieties();
 }
 

+ 35 - 0
src/main/java/com/goafanti/business/service/impl/BusinessProjectServiceImpl.java

@@ -407,6 +407,41 @@ public class BusinessProjectServiceImpl extends BaseMybatisDao<BusinessProjectMa
 		}
 		return false;
 	}
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<ProjectBo> portalRecommendList(Integer pNo, Integer pSize) {
+		Map<String, Object> params = new HashMap<>();
+		return (Pagination<ProjectBo>)findPage("findRecommendProjectListByPage", "findRecommendProjectListCount",
+				params,pNo,pSize);
+	}
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<ProjectBo> portalBusinessProject(String id, Integer pNo, Integer pSize) {
+		Map<String, Object> params = new HashMap<>();
+		if (StringUtils.isNotBlank(id)) {
+			params.put("id", id);
+		}
+		Pagination<ProjectBo> data =  (Pagination<ProjectBo>)findPage("getBusinessProject", "getBusinessProjectCount",
+				params,pNo,pSize);
+		return data;
+	
+	}
+	@Override
+	public ProjectDetailBo ProjectDetail(String id) {
+		ProjectDetailBo pd=businessProjectMapper.selectAppProjectDetail(id);
+		if (StringUtils.isNotBlank(TokenManager.getUserId())&&projectInterestMapper.checkUidAndDid(id,TokenManager.getUserId())>0) {
+			pd.setInterest("1");
+		}else {
+			pd.setInterest("0");
+		}
+		pd.setProjectSize(projectSizeMapper.selectPidList(id));
+		return pd;
+	
+	}
+	@Override
+	public List<ProjectBo> portalRecommend() {
+		return businessProjectMapper.selectServiceProjectDetail();
+	}
 	
 }
 

+ 4 - 0
src/main/java/com/goafanti/business/service/impl/BusinessVarietiesServiceImpl.java

@@ -269,6 +269,10 @@ public class BusinessVarietiesServiceImpl extends BaseMybatisDao<BusinessVarieti
 		}
 
 	}
+	@Override
+	public List<VarietiesBo> portalVarieties() {
+		return businessVarietiesMapper.getVarieties();
+	}
 	
 }
 

+ 70 - 1
src/main/java/com/goafanti/common/controller/PortalController.java

@@ -16,6 +16,7 @@ import org.springframework.web.servlet.view.RedirectView;
 import com.goafanti.achievement.bo.AchievementListBo;
 import com.goafanti.achievement.bo.AchievementPartnerListBo;
 import com.goafanti.achievement.service.AchievementService;
+import com.goafanti.business.service.BusinessProjectService;
 import com.goafanti.common.enums.AchievementBargainingMode;
 import com.goafanti.common.enums.AchievementMaturity;
 import com.goafanti.common.enums.AchievementTransferMode;
@@ -27,11 +28,13 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.service.DemandInterestService;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.order.service.OrderService;
 import com.goafanti.portal.bo.AchievementPortalDetailBo;
 import com.goafanti.portal.bo.AchievementPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
 import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.user.bo.UserPartnerDetailBo;
+import com.goafanti.user.service.UserIdentityService;
 import com.goafanti.user.service.UserService;
 
 @Controller
@@ -43,6 +46,8 @@ public class PortalController extends BaseController {
 	@Resource
 	private DemandService demandService;
 	@Resource
+	UserIdentityService	userIdentityService;
+	@Resource
 	private FieldGlossoryService fieldGlossoryService;
 	@Resource
 	private DemandInterestService  demandInterestService;
@@ -50,6 +55,11 @@ public class PortalController extends BaseController {
 	private UserService userService;
 	@Resource
 	private DistrictGlossoryService districtglossoryservice;
+	@Resource
+	BusinessProjectService	businessProjectService;
+	@Resource
+	OrderService	orderService;
+	
 	private static final String UNIT = "万元";
 
 	private static final int MULTIPLE = 20;
@@ -950,5 +960,64 @@ public class PortalController extends BaseController {
 		mv.addObject("uid", uid);
 		return mv;
 
-	};
+	}
+	
+	/**
+	 * 服务
+	 */
+	@RequestMapping(value = "/portal/services", method = RequestMethod.GET)
+	public ModelAndView services(HttpServletRequest request, ModelAndView modelview) {
+		ModelAndView mv = new ModelAndView();
+		mv.setViewName("");
+		return mv;
+	}
+	/**
+	 * 服务 权威咨询师
+	 */
+	@RequestMapping(value = "/portal/services/consultant", method = RequestMethod.GET)
+	public ModelAndView consultant(HttpServletRequest request, ModelAndView modelview) {
+		ModelAndView mv = new ModelAndView();
+		mv.setViewName("");
+		return mv;
+	}
+	
+	/**
+	 * 项目详情
+	 */
+	@RequestMapping(value = "/portal/services/projectDetail", method = RequestMethod.GET)
+	public ModelAndView projectDetail(HttpServletRequest request, ModelAndView modelview,String id,Integer pSize ) {
+		ModelAndView mv = new ModelAndView();
+		mv.setViewName("");
+		//获取项目详情
+		mv.addObject("project", businessProjectService.ProjectDetail(id));
+		//获取3条推荐
+		mv.addObject("recommend",businessProjectService.recommendProjectList(null,pSize));
+		return mv;
+	}
+	
+	/**
+	 * 咨询师详情
+	 */
+	@RequestMapping(value = "/portal/services/consultantDetail", method = RequestMethod.GET)
+	public ModelAndView consultantDetail(HttpServletRequest request, ModelAndView modelview,String id,Integer pSize ) {
+		ModelAndView mv = new ModelAndView();
+		mv.setViewName("");
+		//获取咨询师详情
+		mv.addObject("consultant", userIdentityService.consultantDetail( id));
+		//获取咨询师列表(传入显示数)
+		mv.addObject("recommend",userIdentityService.consultantList(null,pSize));
+		return mv;
+	}
+	/**
+	 * 服务意向
+	 */
+	@RequestMapping(value = "/portal/services/AddIntention", method = RequestMethod.GET)
+	public ModelAndView AddIntention(HttpServletRequest request, ModelAndView modelview,String commodityId,Integer commodityType ) {
+		ModelAndView mv = new ModelAndView();
+		mv.setViewName("");
+		//获取服务意向参数
+		mv.addObject("Intention", orderService.selectCommodityDetail(commodityId, commodityType));
+		
+		return mv;
+	}
 }

+ 16 - 0
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -559,5 +559,21 @@ public class WebpageController extends BaseController {
 		if (!banners.isEmpty()) {
 			modelview.addObject("banners", banners);
 		}
+	} 
+	
+	/**
+	 * 服务-推荐
+	 * 
+	 * @param request
+	 * @param modelview
+	 * @return
+	 */
+	@RequestMapping(value = "/portal/service/recommended")
+	public ModelAndView recommended(HttpServletRequest request, ModelAndView modelview) {
+		modelview.setViewName("/portal/service/recommended");
+		return modelview;
 	}
+	
+	
+	
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java

@@ -88,5 +88,7 @@ public interface BusinessProjectMapper {
 
 	int checkProject(String id);
 
+	List<ProjectBo> selectServiceProjectDetail();
+
 	
 }

+ 6 - 0
src/main/java/com/goafanti/common/dao/FieldGlossoryMapper.java

@@ -1,5 +1,9 @@
 package com.goafanti.common.dao;
 
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+
 import com.goafanti.common.model.FieldGlossory;
 
 public interface FieldGlossoryMapper {
@@ -14,4 +18,6 @@ public interface FieldGlossoryMapper {
     int updateByPrimaryKeySelective(FieldGlossory record);
 
     int updateByPrimaryKey(FieldGlossory record);
+
+	List<FieldGlossory> getField(@Param("pid")Integer pid, @Param("level")Integer level);
 }

+ 11 - 1
src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml

@@ -714,7 +714,7 @@
     where bname = #{bname,jdbcType=VARCHAR}
   </select>
   <select id="getBusinessProject" resultType="com.goafanti.app.bo.ProjectBo">
-  	select id,bname as name,min_logo as minLogoUrl,introduce,project_url as projectUrl
+  	select id,bname as name,min_logo as minLogoUrl,max_logo as maxLogoUrl,introduce,project_url as projectUrl,boutique
    from business_project
 	where delete_sign=0 
 	and status=0
@@ -771,4 +771,14 @@ where id=#{id,jdbcType=VARCHAR}
   select count(0) from business_project
  where  cid=#{id,jdbcType=VARCHAR}
  </select>
+ 
+  <select id="getPortalBusinessProject" resultType="com.goafanti.app.bo.ProjectBo">
+  select id ,min_logo as minLogoUrl,bname as name 
+   from business_project
+	where delete_sign=0 
+	and status=0
+	and boutique=1	
+	LIMIT 0, 3	
+  </select>
+ 
 </mapper>

+ 12 - 0
src/main/java/com/goafanti/common/mapper/FieldGlossoryMapper.xml

@@ -79,4 +79,16 @@
       level = #{level,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
+  <select id="getField" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from field_glossory
+    where 1=1
+    <if test="pid != null" >
+     and   pid = #{pid,jdbcType=INTEGER}
+      </if>
+    <if test="level != null" >
+       and  level = #{level,jdbcType=INTEGER}
+      </if>
+  </select>
 </mapper>

+ 8 - 2
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -1097,11 +1097,17 @@
   </select>
   
   <select id="findConsultantListByPage" resultType="com.goafanti.app.bo.consultantListBo">
-  select t.uid as id,u.nickname as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,t.consultant
+  
+  select t.uid as id,u.nickname as username ,u.head_portrait_url as headPortraitUrl,u.introduction ,
+  t.consultant,ifnull(x.n,0) as reservationCount
   from user_identity t
   left join `user` u on t.uid=u.id
+  left join ( select y.x  as n, y.seller_id
+	from (select count( 0 ) as x,seller_id from t_order
+			where order_status != 4
+			group by seller_id)y)x on t.uid=x.seller_id 
   where t.consultant=1
-    <if test="page_sql!=null">
+   <if test="page_sql!=null">
 			${page_sql}
 	</if>
   </select>

+ 7 - 0
src/main/java/com/goafanti/common/service/FieldGlossoryService.java

@@ -1,5 +1,7 @@
 package com.goafanti.common.service;
 
+import java.util.List;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -7,6 +9,7 @@ import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.common.bo.Result;
 import com.goafanti.common.dao.FieldGlossoryMapper;
 import com.goafanti.common.model.FieldGlossory;
 import com.goafanti.common.utils.LoggerUtils;
@@ -29,4 +32,8 @@ public class FieldGlossoryService {
 	public void clear(Integer id) {
 		LoggerUtils.debug(logger, "清除领域列表缓存:[%s]", id);
 	}
+	
+	public List<FieldGlossory> getField(Integer pid, Integer level){
+		return fieldGlossoryMapper.getField(pid,level);
+	}
 }

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

@@ -52,4 +52,9 @@ public interface UserIdentityService {
 	 consultantListBo consultantDetail(String id);
 	 
 	 List<AdvertisingBo> advertising();
+
+	 Pagination<consultantListBo> portalConsultantList(Integer pNo, Integer pSize);
+	
+	consultantListBo portalconsultantDetail(String id);
+	
 }

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

@@ -430,4 +430,31 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 		return advertising;
 	}
 
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<consultantListBo> portalConsultantList(Integer pNo, Integer pSize) {
+		Pagination<consultantListBo> p=(Pagination<consultantListBo>) findPage("findConsultantListByPage",
+				"findConsultantCount", new HashMap<>(), pNo, pSize);
+		List<consultantListBo> list=(List<consultantListBo>) p.getList();
+		for (consultantListBo c : list) {
+			if (StringUtils.isNotBlank(TokenManager.getUserId())&&userInterestMapper.checkUidAndDid(c.getId(), TokenManager.getUserId())>0) {
+				c.setInterest("1");
+			}else {
+				c.setInterest("0");
+			}
+		}
+		return p;
+	}
+
+	@Override
+	public consultantListBo portalconsultantDetail(String id) {
+		consultantListBo c=userIdentityMapper.selectconsultantByUid(id);
+		if (StringUtils.isNotBlank(TokenManager.getUserId())&&userInterestMapper.checkUidAndDid(id, TokenManager.getUserId())>0) {
+			c.setInterest("1");
+		}else {
+			c.setInterest("0");
+		}
+		return c;
+	}
+
 }