Forráskód Böngészése

Merge remote-tracking branch 'origin/test'

Conflicts:
	src/main/java/com/goafanti/common/controller/WebpageController.java
	src/main/java/com/goafanti/common/model/JtBusinessProject.java
	src/main/java/com/goafanti/news/service/PolicyService.java
	src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html
limin 7 éve%!(EXTRA string=óta)
szülő
commit
b5f10edb61
40 módosított fájl, 1945 hozzáadás és 53 törlés
  1. 1 1
      GeneratorConfig.xml
  2. 20 3
      src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java
  3. 7 0
      src/main/java/com/goafanti/app/bo/ExpertsListBo.java
  4. 4 1
      src/main/java/com/goafanti/business/controller/AdminJtBusinessController.java
  5. 1 0
      src/main/java/com/goafanti/business/controller/UserJtBusinessController.java
  6. 2 0
      src/main/java/com/goafanti/business/service/JtBusinessService.java
  7. 27 0
      src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java
  8. 58 2
      src/main/java/com/goafanti/common/controller/WebpageController.java
  9. 98 0
      src/main/java/com/goafanti/common/dao/JtCollectSearchMapper.java
  10. 3 1
      src/main/java/com/goafanti/common/dao/UserIdentityMapper.java
  11. 64 0
      src/main/java/com/goafanti/common/enums/SocietyTagStatus.java
  12. 62 0
      src/main/java/com/goafanti/common/enums/collectType.java
  13. 21 6
      src/main/java/com/goafanti/common/mapper/JtBusinessProjectMapper.xml
  14. 316 0
      src/main/java/com/goafanti/common/mapper/JtCollectSearchMapper.xml
  15. 20 7
      src/main/java/com/goafanti/common/mapper/NewsMapper.xml
  16. 3 2
      src/main/java/com/goafanti/common/mapper/NewsMapperExt.xml
  17. 25 8
      src/main/java/com/goafanti/common/mapper/PolicyMapper.xml
  18. 8 1
      src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml
  19. 11 3
      src/main/java/com/goafanti/common/model/JtBusinessProject.java
  20. 168 0
      src/main/java/com/goafanti/common/model/JtCollectSearch.java
  21. 642 0
      src/main/java/com/goafanti/common/model/JtCollectSearchExample.java
  22. 11 1
      src/main/java/com/goafanti/common/model/News.java
  23. 10 0
      src/main/java/com/goafanti/common/model/Policy.java
  24. 28 0
      src/main/java/com/goafanti/common/service/GlobalSearchService.java
  25. 2 0
      src/main/java/com/goafanti/demand/service/DemandService.java
  26. 39 1
      src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java
  27. 10 0
      src/main/java/com/goafanti/news/bo/InputNews.java
  28. 11 2
      src/main/java/com/goafanti/news/controller/AdminNewsApiController.java
  29. 10 2
      src/main/java/com/goafanti/news/controller/AdminPolicyApiController.java
  30. 33 1
      src/main/java/com/goafanti/news/service/NewsService.java
  31. 26 2
      src/main/java/com/goafanti/news/service/PolicyService.java
  32. 31 0
      src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java
  33. 1 0
      src/main/resources/props/config_local.properties
  34. 3 1
      src/main/resources/props/config_test.properties
  35. 63 0
      src/main/webapp/WEB-INF/views/portal/adviser.html
  36. 4 6
      src/main/webapp/WEB-INF/views/portal/adviser/adviserDetail.html
  37. 68 0
      src/main/webapp/WEB-INF/views/portal/adviser/adviserList.html
  38. 2 2
      src/main/webapp/WEB-INF/views/portal/index.html
  39. 31 0
      src/main/webapp/WEB-INF/views/portal/search.html
  40. 1 0
      src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html

+ 1 - 1
GeneratorConfig.xml

@@ -10,6 +10,6 @@
    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="jitao-server" />
    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="jitao-server" />
    <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="jitao-server" type="XMLMAPPER" />
-   <table schema="aft" tableName="jt_commodity_comment"/>
+   <table schema="aft" tableName="jt_collect_search"/>
   </context>
 </generatorConfiguration>

+ 20 - 3
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -14,6 +14,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.stereotype.Service;
 
@@ -36,7 +37,7 @@ import com.goafanti.common.dao.AchievementMapper;
 import com.goafanti.common.dao.AchievementPublishMapper;
 import com.goafanti.common.dao.BranchInformationMapper;
 import com.goafanti.common.dao.DemandKeywordMapper;
-
+import com.goafanti.common.dao.JtCollectSearchMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
@@ -50,12 +51,14 @@ import com.goafanti.common.enums.DemandReleaseStatus;
 import com.goafanti.common.enums.NoticeReadStatus;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.UserType;
+import com.goafanti.common.enums.collectType;
 import com.goafanti.common.model.Achievement;
 import com.goafanti.common.model.AchievementDemand;
 import com.goafanti.common.model.AchievementDemandCount;
 import com.goafanti.common.model.AchievementKeyword;
 import com.goafanti.common.model.AchievementPublish;
 import com.goafanti.common.model.Admin;
+import com.goafanti.common.model.JtCollectSearch;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
@@ -93,13 +96,15 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	@Autowired
 	private OrganizationIdentityMapper		organizationIdentityMapper;
 	@Autowired
-	private AchievementInterestMapper	achievementInterestMapper;
-	@Autowired
 	private UserMapper					userMapper;
 	@Autowired
 	BranchInformationMapper		branchInformationMapper;
 	@Autowired
 	AchievementPublishMapper	achievementPublishMapper;
+	@Autowired
+	JtCollectSearchMapper	jtCollectSearchMapper;
+	@Value(value="${collect_flag}")
+	private Boolean collectFlag ;
 	private static final Logger				logger	= LoggerFactory.getLogger(AchievementServiceImpl.class);
 
 
@@ -411,6 +416,8 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		achievementPublishMapper.deleteByAchievementId(a.getId());
 		int i=0;
 		i=achievementMapper.updateByPrimaryKeySelective(a);
+		if(collectFlag)
+		jtCollectSearchMapper.deleteByrowId(a.getId());
 		if (StringUtils.isNotBlank(a.getOwnerId())) {
 			AchievementDemandCount adc = achievementDemandCountMapper.selectByUid(a.getOwnerId());
 			if (null != adc) {
@@ -419,6 +426,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 					adc.setAchievementCount(0);
 				}
 				achievementDemandCountMapper.updateByPrimaryKeySelective(adc);
+				
 			}
 		}
 		return i;
@@ -788,6 +796,15 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		achievement.setAuditInfo(auditInfo);
 		achievement.setReleaseDate(new Date());
 		achievementMapper.updateByPrimaryKeySelective(achievement);
+		if(collectFlag){
+			Achievement a=achievementMapper.selectByPrimaryKey(id);
+			JtCollectSearch r=new JtCollectSearch();
+			r.setFromTable(collectType.ACHIEVEMENT.getDesc());
+			r.setKeyword(a.getKeyword());
+			r.setTitle(a.getName());
+			r.setRowId(a.getId());
+			jtCollectSearchMapper.insertSelective(r);
+		}
 		return auditStatus;
 	}
 

+ 7 - 0
src/main/java/com/goafanti/app/bo/ExpertsListBo.java

@@ -21,6 +21,7 @@ public class ExpertsListBo {
 	private  CommentDetailResult	commentDetailResult;
 	private Integer consultantType;
 	private String consultantTypeName;
+	private String keyword;
 	public String getUid() {
 		return uid;
 	}
@@ -129,6 +130,12 @@ public class ExpertsListBo {
 	public void setConsultantTypeName(String consultantTypeName) {
 		this.consultantTypeName = consultantTypeName;
 	}
+	public String getKeyword() {
+		return keyword;
+	}
+	public void setKeyword(String keyword) {
+		this.keyword = keyword;
+	}
 	
 
 }

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

@@ -262,7 +262,10 @@ public class AdminJtBusinessController extends CertifyApiController{
     	if(jtBusinessProject.getAuditStatus()!= ProjectAuditStatus.SUBMIT.getCode()) {
     		result.getError().add(buildError(ErrorConstants.PARAM_ERROR,"未找到服务","当前状态不可审核"));return result;
     	}
-    	if(auditResult.intValue() == 0) jtBusinessProject.setAuditStatus(ProjectAuditStatus.AUDITED.getCode());
+    	if(auditResult.intValue() == 0){
+    		jtBusinessProject.setAuditStatus(ProjectAuditStatus.AUDITED.getCode());
+    		jtBusinessService.addJtCollectSearch(jtBusinessProject);
+    	} 
     	if(auditResult.intValue() == 1) jtBusinessProject.setAuditStatus(ProjectAuditStatus.UNAUDITED.getCode());
     	jtBusinessProject.setAuditInfo(auditInfo);
     	jtBusinessService.updateProject(jtBusinessProject);

+ 1 - 0
src/main/java/com/goafanti/business/controller/UserJtBusinessController.java

@@ -206,6 +206,7 @@ public class UserJtBusinessController extends CertifyApiController{
 		JtBusinessProject jtBusinessProject = new JtBusinessProject();
 		jtBusinessProject.setId(id);
 		jtBusinessProject.setAuditStatus(ProjectAuditStatus.REVOKE.getCode());
+		jtBusinessService.updateJtCollectSearch(id);
 		jtBusinessService.updateProject(jtBusinessProject);
 		return res;
 	}

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

@@ -68,6 +68,8 @@ public interface JtBusinessService {
 	 * @return
 	 */
 	int updateProjectSetTop(String id);
+	void addJtCollectSearch(JtBusinessProject jtBusinessProject);
+	void updateJtCollectSearch(String id);
 	
 	
 	

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

@@ -9,6 +9,7 @@ import java.util.UUID;
 
 import org.apache.poi.poifs.property.Child;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import com.goafanti.business.bo.JtBusinessCategoryBo;
@@ -20,13 +21,16 @@ import com.goafanti.comment.bo.CommentDetailResult;
 import com.goafanti.common.bo.MyCollection;
 import com.goafanti.common.dao.JtBusinessCategoryMapper;
 import com.goafanti.common.dao.JtBusinessProjectMapper;
+import com.goafanti.common.dao.JtCollectSearchMapper;
 import com.goafanti.common.dao.JtCommodityCommentMapper;
 import com.goafanti.common.dao.JtTagMapper;
 import com.goafanti.common.enums.BusinessCategoryModule;
 import com.goafanti.common.enums.ProjectAuditStatus;
 import com.goafanti.common.enums.UserAuthentication;
+import com.goafanti.common.enums.collectType;
 import com.goafanti.common.model.JtBusinessCategory;
 import com.goafanti.common.model.JtBusinessProject;
+import com.goafanti.common.model.JtCollectSearch;
 import com.goafanti.common.model.JtTag;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
@@ -44,6 +48,10 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	private JtTagMapper	jtTagMapper;
 	@Autowired
 	private JtCommodityCommentMapper	jtCommodityCommentMapper;
+	@Value(value="${collect_flag}")
+	private Boolean collectFlag ;
+	@Autowired
+	private JtCollectSearchMapper	jtCollectSearchMapper;
 	@Override
 	public JtBusinessCategory getBusinessCategoryByLayerAndName(Integer layer, String name) {
 		// TODO Auto-generated method stub 
@@ -489,6 +497,25 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 		jtBusinessCategoryMapper.updateByPrimaryKeySelective(jtBusinessCategory);
 		return 1;
 	}
+
+	@Override
+	public void addJtCollectSearch(JtBusinessProject jtBusinessProject) {
+	  if(collectFlag){
+		JtCollectSearch r=new JtCollectSearch();
+		r.setFromTable(collectType.PROJECT.getDesc());
+		r.setKeyword(jtBusinessProject.getKeyword());
+		r.setTitle(jtBusinessProject.getName());
+		r.setRowId(jtBusinessProject.getId());
+		jtCollectSearchMapper.insertSelective(r);
+	}
+		
+	}
+
+	@Override
+	public void updateJtCollectSearch(String id) {
+		if(collectFlag)jtCollectSearchMapper.deleteByrowId(id);
+		
+	}
 	
 
 }

+ 58 - 2
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -18,6 +18,7 @@ import org.springframework.web.servlet.ModelAndView;
 import com.goafanti.achievement.service.AchievementInterestService;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.app.bo.ExpertsListBo;
+import com.goafanti.app.bo.consultantListBo;
 import com.goafanti.banners.service.BannersService;
 import com.goafanti.business.bo.JtBusinessCategoryBo;
 import com.goafanti.business.bo.JtBusinessCategoryTree;
@@ -38,6 +39,7 @@ import com.goafanti.common.model.JtBusinessProject;
 import com.goafanti.common.model.News;
 import com.goafanti.common.model.Policy;
 import com.goafanti.common.model.User;
+import com.goafanti.common.service.GlobalSearchService;
 import com.goafanti.common.utils.LimitLengthUtil;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -91,7 +93,9 @@ public class WebpageController extends BaseController {
 	private AchievementInterestService achievementInterestService;
 
 	@Resource
-	private DemandInterestService demandInterestService;
+	private DemandInterestService demandInterestService;
+	@Resource
+	private GlobalSearchService globalSearchService;
 
 	@Resource
 	private ProjectInterestMapper projectInterestMapper;
@@ -332,7 +336,18 @@ public class WebpageController extends BaseController {
 		modelview.addObject("policyList", policies);
 		// 新闻
 		List<News> news = (List<News>) newsService.portalNewsList(5, 1, null, null, null, null, 2).getList();
-		modelview.addObject("newsList", news);
+		modelview.addObject("newsList", news);
+		//军工认证
+		/*JtBusinessCategory military = jtBusinessService.getBusinessCategoryByLayerAndName(1, "军工认证");
+		List<JtBusinessProject> l = jtBusinessService.getModuleByName("军工认证", null, 3);
+		for (JtBusinessProject project : l) {
+			//去除数据中的标签
+			if(StringUtils.isNotBlank(project.getIntroduce())){
+				project.setIntroduce(project.getIntroduce().replaceAll("\\<.*?>", "")); 
+			}
+		}
+		modelview.addObject("military", military);
+		modelview.addObject("militaryList", l);*/
 		// 高企服务
 		/*JtBusinessCategory gaoqi = jtBusinessService.getBusinessCategoryByLayerAndName(1, "高新技术企业服务");
 		JtBusinessCategory gaoqi2 = jtBusinessService.getBusinessCategoryByLayerAndName(2, "高新技术企业服务");
@@ -1310,6 +1325,17 @@ public class WebpageController extends BaseController {
 		res.setData(policyService.searchPolicy(keyword, 2, null, null, null, pNo, pSize, provinceId));
 		return res;
 	}
+
+	/**
+	 * 全局搜索
+	 */
+	@RequestMapping(value = "/portal/globalSearch", method = RequestMethod.GET)
+	@ResponseBody
+	public Result globalSearch(String  name,String keyword,Integer pageSize,Integer pageNo) {
+		Result res = new Result();
+		res.setData(globalSearchService.globalSearchList(name,pageNo,pageSize));
+		return res;
+	}
 	
 	/**
 	 * 知识产权维权
@@ -1348,6 +1374,36 @@ public class WebpageController extends BaseController {
 		modelview.addObject("adviserDetail", adviserDetail);
 		return modelview;
 	}
+	/**
+	 * 顾问列表
+	 * @param modelview
+	 * @return
+	 */
+	@RequestMapping(value = "/portal/adviser/adviserList", method = RequestMethod.GET)
+	public ModelAndView adviserList(ModelAndView modelview){
+		modelview.setViewName("/portal/adviser/adviserList");
+		return modelview;
+	}
+	/**
+	 * 顾问首页
+	 * @param modelview
+	 * @return
+	 */
+	@RequestMapping(value = "/portal/adviser", method = RequestMethod.GET)
+	public ModelAndView portalAdviser(ModelAndView modelview){
+		modelview.setViewName("/portal/adviser");
+		return modelview;
+	}
+	/**
+	 * 顾问首页
+	 * @param modelview
+	 * @return
+	 */
+	@RequestMapping(value = "/portal/search", method = RequestMethod.GET)
+	public ModelAndView portalSearch(ModelAndView modelview){
+		modelview.setViewName("/portal/search");
+		return modelview;
+	}
 	
 	/**
 	 * 政策 资讯 百科

+ 98 - 0
src/main/java/com/goafanti/common/dao/JtCollectSearchMapper.java

@@ -0,0 +1,98 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.JtCollectSearch;
+import com.goafanti.common.model.JtCollectSearchExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface JtCollectSearchMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    long countByExample(JtCollectSearchExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    int deleteByExample(JtCollectSearchExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    int insert(JtCollectSearch record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    int insertSelective(JtCollectSearch record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    List<JtCollectSearch> selectByExample(JtCollectSearchExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    JtCollectSearch selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    int updateByExampleSelective(@Param("record") JtCollectSearch record, @Param("example") JtCollectSearchExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    int updateByExample(@Param("record") JtCollectSearch record, @Param("example") JtCollectSearchExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    int updateByPrimaryKeySelective(JtCollectSearch record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    int updateByPrimaryKey(JtCollectSearch record);
+
+	int deleteByrowId(String id);
+}

+ 3 - 1
src/main/java/com/goafanti/common/dao/UserIdentityMapper.java

@@ -108,11 +108,13 @@ public interface UserIdentityMapper {
 	
 	List<UserIdentityBo>getExperts(Integer size);
 
-	ExpertsListBo selectAppExpertsDetail(@Param("id")String id, @Param("uid")String uid);
 
+	ExpertsListBo selectAppExpertsDetail(@Param("id")String id, @Param("uid")String uid);
 	CommentDetailResult expertsCommentByUid(String id);
     
 	UserIdentity getUserIdentityByUid(String uid);
 	
 	Integer updateAuditing(UserIdentity identity);
+
+	ExpertsListBo selectByIdentityId(String id);
 }

+ 64 - 0
src/main/java/com/goafanti/common/enums/SocietyTagStatus.java

@@ -0,0 +1,64 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum SocietyTagStatus {
+	
+	SHQY(0, "社会企业"),
+	KYDW(1, "科研单位"),
+	GDYX(2, "高等院校"),
+	KYZJ(3, "科研专家"),
+	KJDR(4, "科技达人"),
+	FWJG(5, "服务机构"),
+	ZFBM(6, "政府部门"),
+	SH(7, "商会"),
+	XH(8, "协会"),
+	QTZZ(9, "其他组织"),
+	OTHER(10, "其他个人");
+
+	private SocietyTagStatus(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, SocietyTagStatus> status = new HashMap<Integer, SocietyTagStatus>();
+
+	static {
+		for (SocietyTagStatus value : SocietyTagStatus.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static SocietyTagStatus getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static SocietyTagStatus getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return OTHER;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+}

+ 62 - 0
src/main/java/com/goafanti/common/enums/collectType.java

@@ -0,0 +1,62 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum collectType {
+	
+	ACHIEVEMENT(0, "achievement"),//0成果,1需求,2专利,3政策,4项目,5专家,6顾问,7新闻
+	DMAND(1, "demand"),
+	PATENT(2,"jt_business_project"),
+	POLICY(3,"policy"),
+	PROJECT(4,"jt_business_project"),
+	EXPERT(5,"expert"),//expert
+	ADVISER(6,"adviser"),//adviser
+	NEWS(7,"news"),
+	OTHER(8, "");
+	
+	private collectType(Integer code, String desc) {
+		this.code=code;
+		this.desc=desc;
+	}
+	
+	private static Map<Integer, collectType> status = new HashMap<Integer, collectType>();
+	static {
+		for (collectType value : collectType.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+	
+	public static collectType getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+	public static collectType getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return OTHER;
+	}
+	
+	public Integer getCode() {
+		return code;
+	}
+	
+	public String getDesc() {
+		return desc;
+	}
+	
+	private Integer	code;
+	private String	desc;
+	
+	
+
+}

+ 21 - 6
src/main/java/com/goafanti/common/mapper/JtBusinessProjectMapper.xml

@@ -30,6 +30,7 @@
     <result column="audit_info" jdbcType="VARCHAR" property="auditInfo" />
     <result column="release_date" jdbcType="TIMESTAMP" property="releaseDate" />
     <result column="advertisement" jdbcType="VARCHAR" property="advertisement" />
+    <result column="keyword" jdbcType="VARCHAR" property="keyword" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
@@ -107,7 +108,7 @@
     -->
     id, name, category_id, number, price, activity_price, member_price, offset, activity_flag, 
     introduce, province, city, create_time, min_img_url, max_img_url, value, apply_conditions, 
-    owner_id, is_hot, audit_status, audit_info, release_date, advertisement
+    owner_id, is_hot, audit_status, audit_info, release_date, advertisement,keyword
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.JtBusinessProjectExample" resultMap="BaseResultMap">
     <!--
@@ -172,7 +173,7 @@
       create_time, min_img_url, max_img_url, 
       value, apply_conditions, owner_id, 
       is_hot, audit_status, audit_info, 
-      release_date, advertisement)
+      release_date, advertisement,keyword)
     values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{categoryId,jdbcType=VARCHAR}, 
       #{number,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{activityPrice,jdbcType=DECIMAL}, 
       #{memberPrice,jdbcType=DECIMAL}, #{offset,jdbcType=REAL}, #{activityFlag,jdbcType=INTEGER}, 
@@ -180,7 +181,7 @@
       #{createTime,jdbcType=TIMESTAMP}, #{minImgUrl,jdbcType=VARCHAR}, #{maxImgUrl,jdbcType=VARCHAR}, 
       #{value,jdbcType=VARCHAR}, #{applyConditions,jdbcType=VARCHAR}, #{ownerId,jdbcType=VARCHAR}, 
       #{isHot,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{auditInfo,jdbcType=VARCHAR}, 
-      #{releaseDate,jdbcType=TIMESTAMP}, #{advertisement,jdbcType=VARCHAR})
+      #{releaseDate,jdbcType=TIMESTAMP}, #{advertisement,jdbcType=VARCHAR},#{keyword,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.JtBusinessProject">
     <!--
@@ -259,6 +260,9 @@
       <if test="advertisement != null">
         advertisement,
       </if>
+      <if test="keyword != null">
+      keyword,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -330,6 +334,9 @@
       <if test="advertisement != null">
         #{advertisement,jdbcType=VARCHAR},
       </if>
+       <if test="keyword != null">
+      #{keyword,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.JtBusinessProjectExample" resultType="java.lang.Long">
@@ -420,6 +427,9 @@
       <if test="record.advertisement != null">
         advertisement = #{record.advertisement,jdbcType=VARCHAR},
       </if>
+      <if test="keyword !=null">
+      keyword =#{keyword,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -454,7 +464,8 @@
       audit_status = #{record.auditStatus,jdbcType=INTEGER},
       audit_info = #{record.auditInfo,jdbcType=VARCHAR},
       release_date = #{record.releaseDate,jdbcType=TIMESTAMP},
-      advertisement = #{record.advertisement,jdbcType=VARCHAR}
+      advertisement = #{record.advertisement,jdbcType=VARCHAR},
+      keyword = #{keyword,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -533,6 +544,9 @@
       <if test="advertisement != null">
         advertisement = #{advertisement,jdbcType=VARCHAR},
       </if>
+      <if test="keyword != null">
+      	keyword = #{keyword,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -564,13 +578,14 @@
       audit_status = #{auditStatus,jdbcType=INTEGER},
       audit_info = #{auditInfo,jdbcType=VARCHAR},
       release_date = #{releaseDate,jdbcType=TIMESTAMP},
-      advertisement = #{advertisement,jdbcType=VARCHAR}
+      advertisement = #{advertisement,jdbcType=VARCHAR},
+      keyword = #{keyword,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   <select id="selectByPrimaryKeyWithModule" resultType="com.goafanti.business.bo.JtBusinessProjectResult">
     select 
         jtbp.id, jtbp.name, jtbp.category_id as categoryId, jtbp.number, jtbp.price, jtbp.activity_price as activityPrice, jtbp.member_price as memberPrice, jtbp.offset, 
-        jtbp.activity_flag as activityFlag, u.nickname as ownerName,ifnull(p.count,0) as interestCount,if(isnull(x.project_id),0,1) as interested,
+        jtbp.activity_flag as activityFlag, u.nickname as ownerName,ifnull(p.count,0) as interestCount,if(isnull(x.project_id),0,1) as interested,jtbp.keyword,
     jtbp.introduce, jtbp.province, jtbp.city, jtbp.create_time as createTime, jtbp.min_img_url as minImgUrl, jtbp.max_img_url as maxImgUrl, jtbp.value, jtbp.apply_conditions as applyConditions, 
     jtbp.owner_id as ownerId, jtbp.is_hot as isHot, jtbp.audit_status as auditStatus, jtbp.audit_info as auditInfo, jtbp.release_date as releaseDate,jtbc.module as module,jtbp.advertisement
     from jt_business_project jtbp left join `user` u on jtbp.owner_id=u.id

+ 316 - 0
src/main/java/com/goafanti/common/mapper/JtCollectSearchMapper.xml

@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.JtCollectSearchMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.JtCollectSearch">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="from_table" jdbcType="VARCHAR" property="fromTable" />
+    <result column="row_id" jdbcType="VARCHAR" property="rowId" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="keyword" jdbcType="VARCHAR" property="keyword" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    id, from_table, row_id, title, keyword
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.JtCollectSearchExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from jt_collect_search
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from jt_collect_search
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    delete from jt_collect_search
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.JtCollectSearchExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    delete from jt_collect_search
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.JtCollectSearch">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    insert into jt_collect_search (id, from_table, row_id, 
+      title, keyword)
+    values (#{id,jdbcType=INTEGER}, #{fromTable,jdbcType=VARCHAR}, #{rowId,jdbcType=VARCHAR}, 
+      #{title,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.JtCollectSearch">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    insert into jt_collect_search
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="fromTable != null">
+        from_table,
+      </if>
+      <if test="rowId != null">
+        row_id,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="keyword != null">
+        keyword,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="fromTable != null">
+        #{fromTable,jdbcType=VARCHAR},
+      </if>
+      <if test="rowId != null">
+        #{rowId,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="keyword != null">
+        #{keyword,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.JtCollectSearchExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    select count(*) from jt_collect_search
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    update jt_collect_search
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.fromTable != null">
+        from_table = #{record.fromTable,jdbcType=VARCHAR},
+      </if>
+      <if test="record.rowId != null">
+        row_id = #{record.rowId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.keyword != null">
+        keyword = #{record.keyword,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    update jt_collect_search
+    set id = #{record.id,jdbcType=INTEGER},
+      from_table = #{record.fromTable,jdbcType=VARCHAR},
+      row_id = #{record.rowId,jdbcType=VARCHAR},
+      title = #{record.title,jdbcType=VARCHAR},
+      keyword = #{record.keyword,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.JtCollectSearch">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    update jt_collect_search
+    <set>
+      <if test="fromTable != null">
+        from_table = #{fromTable,jdbcType=VARCHAR},
+      </if>
+      <if test="rowId != null">
+        row_id = #{rowId,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="keyword != null">
+        keyword = #{keyword,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.JtCollectSearch">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Sep 10 14:08:59 CST 2018.
+    -->
+    update jt_collect_search
+    set from_table = #{fromTable,jdbcType=VARCHAR},
+      row_id = #{rowId,jdbcType=VARCHAR},
+      title = #{title,jdbcType=VARCHAR},
+      keyword = #{keyword,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+   <delete id="deleteByrowId" parameterType="java.lang.String">
+    delete from jt_collect_search
+    where row_id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <select id="globalSearchList" parameterType="String" resultType="com.goafanti.common.model.JtCollectSearch">
+  	  select id,from_table as fromTable,row_id as rowId,title,keyword from jt_collect_search
+  	  <if test="name !=null">
+    where title like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+    </if>
+    union 
+    select id,from_table,row_id,title,keyword from jt_collect_search
+    <if test="name !=null">
+    where keyword like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+    </if>
+    <if test="page_sql!=null">
+		${page_sql}
+	</if>
+  </select>
+  <select id="globalSearchCount" parameterType="String" resultType="java.lang.Integer">
+  select count(*) from ( select id,from_table,row_id,title,keyword from jt_collect_search
+  <if test="name !=null">
+    where title like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+    </if>
+    union 
+    select id,from_table,row_id,title,keyword from jt_collect_search
+    <if test="name !=null">
+    where keyword like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+    </if>
+    ) a
+  </select>
+</mapper>

+ 20 - 7
src/main/java/com/goafanti/common/mapper/NewsMapper.xml

@@ -14,14 +14,15 @@
     <result column="source_url" jdbcType="VARCHAR" property="sourceUrl" />
     <result column="summary" jdbcType="VARCHAR" property="summary" />
     <result column="jmrh_flag" jdbcType="INTEGER" property="jmrhFlag" />
-    <result column="province_id" jdbcType="INTEGER" property="provinceId" /> 
+    <result column="province_id" jdbcType="INTEGER" property="provinceId" />
+    <result column="keyword" jdbcType="VARCHAR" property="keyword" /> 
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.News">
     <result column="content" jdbcType="LONGVARCHAR" property="content" />
   </resultMap>
   <sql id="Base_Column_List">
     id, create_time, edit_time, title, title_img, author, type, hot, source, source_url, 
-    summary,jmrh_flag,province_id
+    summary,jmrh_flag,province_id,keyword
   </sql>
   <sql id="Blob_Column_List">
     content
@@ -45,7 +46,8 @@
     n.release_status as releaseStatus,
     n.top_number as topNumber,
     n.hotspot,
-    n.release_date as releaseDate
+    n.release_date as releaseDate,
+    n.keyword
     from news n
     where n.id = #{id,jdbcType=BIGINT}
   </select>
@@ -57,14 +59,14 @@
     insert into news (id, create_time, edit_time, 
       title, title_img, author, 
       type, hot, source, 
-      source_url, summary, content,province_id,top_number,hotspot,audit_status,release_status,release_date
+      source_url, summary, content,province_id,top_number,hotspot,audit_status,release_status,release_date,keyword
       )
     values (#{id,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{editTime,jdbcType=TIMESTAMP}, 
       #{title,jdbcType=VARCHAR}, #{titleImg,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, 
       #{type,jdbcType=INTEGER}, #{hot,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, 
       #{sourceUrl,jdbcType=VARCHAR}, #{summary,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR},
       #{provinceId,jdbcType=INTEGER}, #{topNumber,jdbcType=INTEGER}, #{hotspot,jdbcType=INTEGER},#{auditStatus,jdbcType=INTEGER},
-      #{releaseStatus,jdbcType=INTEGER},#{releaseDate,jdbcType=TIMESTAMP}
+      #{releaseStatus,jdbcType=INTEGER},#{releaseDate,jdbcType=TIMESTAMP},#{keyword,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.News">
@@ -112,6 +114,9 @@
       <if test="provinceId != null">
       	province_id,
       </if>
+      <if test="keyword != null">
+        keyword,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -156,6 +161,9 @@
       <if test="provinceId != null">
         #{provinceId,jdbcType=INTEGER},
       </if>
+      <if test="keyword != null">
+      #{keyword,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.News">
@@ -212,6 +220,9 @@
       <if test="hotspot!=null">
       hotspot=#{hotspot,jdbcType=INTEGER},
       </if>
+      <if test="keyword != null">
+        keyword= #{keyword,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -233,7 +244,8 @@
       audit_status = #{auditStatus,jdbcType=INTEGER},
       release_status = #{releaseStatus,jdbcType=INTEGER},
       top_number = #{topNumber,jdbcType=INTEGER},
-      hotspot = #{hotspot,jdbcType=INTEGER}
+      hotspot = #{hotspot,jdbcType=INTEGER},
+        keyword= #{keyword,jdbcType=VARCHAR},
     where id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.News">
@@ -249,7 +261,8 @@
       source_url = #{sourceUrl,jdbcType=VARCHAR},
       summary = #{summary,jdbcType=VARCHAR},
       jmrh_flag = #{jmrhFlag,jdbcType=INTEGER},
-      province_id = #{provinceId,jdbcType=INTEGER}
+      province_id = #{provinceId,jdbcType=INTEGER},
+        keyword= #{keyword,jdbcType=VARCHAR},
     where id = #{id,jdbcType=BIGINT}
   </update>
   <select id="portalNewsList" resultType="com.goafanti.news.bo.NewsPortalList">

+ 3 - 2
src/main/java/com/goafanti/common/mapper/NewsMapperExt.xml

@@ -12,9 +12,10 @@
 		<result column="source" jdbcType="VARCHAR" property="source" />
 		<result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
 		<result column="release_status" jdbcType="INTEGER" property="releaseStatus" />
+		<result column="keyword" jdbcType="VARCHAR" property="keyword" />
 	</resultMap>
 	<sql id="Summary_Column_List">
-		id, create_time, title, title_img, type, hot, summary, source,audit_status,release_status
+		id, create_time, title, title_img, type, hot, summary, source,audit_status,release_status,keyword
 	</sql>
 	<select id="findList" resultType="com.goafanti.news.bo.NewsSummary">
 		select
@@ -220,4 +221,4 @@ summary,source,audit_status as auditStatus,release_date as releaseDate,release_s
 from news where type=0 and audit_status=2
   and id= #{id,jdbcType=VARCHAR}
   </select>
-</mapper>
+</mapper>

+ 25 - 8
src/main/java/com/goafanti/common/mapper/PolicyMapper.xml

@@ -22,6 +22,7 @@
     <result column="province" jdbcType="INTEGER" property="province" />
     <result column="city" jdbcType="INTEGER" property="city" />
     <result column="release_date" jdbcType="TIMESTAMP" property="releaseDate" />
+    <result column="keyword" jdbcType="VARCHAR" property="keyword" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.Policy">
     <!--
@@ -106,7 +107,7 @@
       This element was generated on Thu Jun 28 16:23:43 CST 2018.
     -->
     id, create_time as createTime, edit_time as editTime, title, title_img as titleImg, author, type, source, source_url as sourceUrl, summary, 
-    audit_status as auditStatus, hot, province, city, release_date as releaseDate
+    audit_status as auditStatus, hot, province, city, release_date as releaseDate,keyword
   </sql>
   <sql id="Blob_Column_List">
     <!--
@@ -199,13 +200,13 @@
       type, source, source_url, 
       summary, audit_status, hot, 
       province, city, release_date, 
-      content)
+      content,keyword)
     values (#{id,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{editTime,jdbcType=TIMESTAMP}, 
       #{title,jdbcType=VARCHAR}, #{titleImg,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, 
       #{type,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, #{sourceUrl,jdbcType=VARCHAR}, 
       #{summary,jdbcType=VARCHAR}, #{auditStatus,jdbcType=INTEGER}, #{hot,jdbcType=INTEGER}, 
       #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP}, 
-      #{content,jdbcType=LONGVARCHAR})
+      #{content,jdbcType=LONGVARCHAR},#{keyword,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Policy">
     <!--
@@ -263,6 +264,9 @@
       <if test="content != null">
         content,
       </if>
+      <if test="keyword != null">
+        keyword,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -313,6 +317,9 @@
       <if test="content != null">
         #{content,jdbcType=LONGVARCHAR},
       </if>
+      <if test="keyword != null">
+        #{keyword,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.PolicyExample" resultType="java.lang.Long">
@@ -382,6 +389,9 @@
       <if test="record.content != null">
         content = #{record.content,jdbcType=LONGVARCHAR},
       </if>
+      <if test="keyword != null">
+        keyword= #{keyword,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -409,7 +419,8 @@
       province = #{record.province,jdbcType=INTEGER},
       city = #{record.city,jdbcType=INTEGER},
       release_date = #{record.releaseDate,jdbcType=TIMESTAMP},
-      content = #{record.content,jdbcType=LONGVARCHAR}
+      content = #{record.content,jdbcType=LONGVARCHAR},
+       keyword= #{keyword,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -435,7 +446,8 @@
       hot = #{record.hot,jdbcType=INTEGER},
       province = #{record.province,jdbcType=INTEGER},
       city = #{record.city,jdbcType=INTEGER},
-      release_date = #{record.releaseDate,jdbcType=TIMESTAMP}
+      release_date = #{record.releaseDate,jdbcType=TIMESTAMP},
+       keyword= #{keyword,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -493,6 +505,9 @@
       <if test="content != null">
         content = #{content,jdbcType=LONGVARCHAR},
       </if>
+      <if test="keyword != null">
+        keyword= #{keyword,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -517,7 +532,8 @@
       province = #{province,jdbcType=INTEGER},
       city = #{city,jdbcType=INTEGER},
       release_date = #{releaseDate,jdbcType=TIMESTAMP},
-      content = #{content,jdbcType=LONGVARCHAR}
+      content = #{content,jdbcType=LONGVARCHAR},
+      keyword= #{keyword,jdbcType=VARCHAR},
     where id = #{id,jdbcType=BIGINT}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Policy">
@@ -540,7 +556,8 @@
       hot = #{hot,jdbcType=INTEGER},
       province = #{province,jdbcType=INTEGER},
       city = #{city,jdbcType=INTEGER},
-      release_date = #{releaseDate,jdbcType=TIMESTAMP}
+      release_date = #{releaseDate,jdbcType=TIMESTAMP},
+       keyword= #{keyword,jdbcType=VARCHAR}
     where id = #{id,jdbcType=BIGINT}
   </update>
   <select id="findPolicyByPageAndPublishPages" resultType="com.goafanti.news.bo.PolicyResult">
@@ -714,4 +731,4 @@
 		  </if> 
 		) a 
   </select>
-</mapper>
+</mapper>

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

@@ -1190,7 +1190,7 @@ order by
   
   <select id="listInterestedExpert" resultType="com.goafanti.user.bo.UserIdentityBo">
 	 	select 	t.id ,t.uid,u.identify_name as username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,
-		u.type,u.introduction,u.head_portrait_url as headPortraitUrl
+		u.type,u.introduction,t.expert,u.head_portrait_url as headPortraitUrl
 		from user_identity t left JOIN user u on t.uid = u.id
 		left join user_interest ui on ui.to_uid=u.id
 		where ui.from_uid=#{uid,jdbcType=VARCHAR}
@@ -1462,4 +1462,11 @@ select a.create_time as createTime,
 	</if>
 	where id = #{id,jdbcType=VARCHAR}
 </update>
+
+
+<select id="selectByIdentityId" resultType="com.goafanti.app.bo.ExpertsListBo">
+	select a.id,a.uid as uid,b.nickname as username,b.society_tag as keyword,a.expert from user_identity a 
+    left join user b on a.uid=b.id
+    where a.id=#{id,jdbcType=VARCHAR}
+</select>
 </mapper>

+ 11 - 3
src/main/java/com/goafanti/common/model/JtBusinessProject.java

@@ -3,8 +3,6 @@ package com.goafanti.common.model;
 import java.math.BigDecimal;
 import java.util.Date;
 
-import com.goafanti.common.utils.StringUtils;
-
 public class JtBusinessProject {
 
 	/**
@@ -124,6 +122,8 @@ public class JtBusinessProject {
 	private String advertisement;
 	
 	private String tag;
+	
+	private String keyword;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column jt_business_project.id
@@ -546,4 +546,12 @@ public class JtBusinessProject {
 	public void setTag(String tag) {
 		this.tag = tag;
 	}
-}
+
+	public String getKeyword() {
+		return keyword;
+	}
+
+	public void setKeyword(String keyword) {
+		this.keyword = keyword;
+	}
+}

+ 168 - 0
src/main/java/com/goafanti/common/model/JtCollectSearch.java

@@ -0,0 +1,168 @@
+package com.goafanti.common.model;
+
+public class JtCollectSearch {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_collect_search.id
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_collect_search.from_table
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    private String fromTable;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_collect_search.row_id
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    private String rowId;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_collect_search.title
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    private String title;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column jt_collect_search.keyword
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    private String keyword;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_collect_search.id
+     *
+     * @return the value of jt_collect_search.id
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_collect_search.id
+     *
+     * @param id the value for jt_collect_search.id
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_collect_search.from_table
+     *
+     * @return the value of jt_collect_search.from_table
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public String getFromTable() {
+        return fromTable;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_collect_search.from_table
+     *
+     * @param fromTable the value for jt_collect_search.from_table
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public void setFromTable(String fromTable) {
+        this.fromTable = fromTable;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_collect_search.row_id
+     *
+     * @return the value of jt_collect_search.row_id
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public String getRowId() {
+        return rowId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_collect_search.row_id
+     *
+     * @param rowId the value for jt_collect_search.row_id
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public void setRowId(String rowId) {
+        this.rowId = rowId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_collect_search.title
+     *
+     * @return the value of jt_collect_search.title
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public String getTitle() {
+        return title;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_collect_search.title
+     *
+     * @param title the value for jt_collect_search.title
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column jt_collect_search.keyword
+     *
+     * @return the value of jt_collect_search.keyword
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public String getKeyword() {
+        return keyword;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column jt_collect_search.keyword
+     *
+     * @param keyword the value for jt_collect_search.keyword
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public void setKeyword(String keyword) {
+        this.keyword = keyword;
+    }
+}

+ 642 - 0
src/main/java/com/goafanti/common/model/JtCollectSearchExample.java

@@ -0,0 +1,642 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class JtCollectSearchExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public JtCollectSearchExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Integer value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Integer value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Integer value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Integer value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Integer> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Integer> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Integer value1, Integer value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableIsNull() {
+            addCriterion("from_table is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableIsNotNull() {
+            addCriterion("from_table is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableEqualTo(String value) {
+            addCriterion("from_table =", value, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableNotEqualTo(String value) {
+            addCriterion("from_table <>", value, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableGreaterThan(String value) {
+            addCriterion("from_table >", value, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableGreaterThanOrEqualTo(String value) {
+            addCriterion("from_table >=", value, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableLessThan(String value) {
+            addCriterion("from_table <", value, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableLessThanOrEqualTo(String value) {
+            addCriterion("from_table <=", value, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableLike(String value) {
+            addCriterion("from_table like", value, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableNotLike(String value) {
+            addCriterion("from_table not like", value, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableIn(List<String> values) {
+            addCriterion("from_table in", values, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableNotIn(List<String> values) {
+            addCriterion("from_table not in", values, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableBetween(String value1, String value2) {
+            addCriterion("from_table between", value1, value2, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andFromTableNotBetween(String value1, String value2) {
+            addCriterion("from_table not between", value1, value2, "fromTable");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdIsNull() {
+            addCriterion("row_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdIsNotNull() {
+            addCriterion("row_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdEqualTo(String value) {
+            addCriterion("row_id =", value, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdNotEqualTo(String value) {
+            addCriterion("row_id <>", value, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdGreaterThan(String value) {
+            addCriterion("row_id >", value, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdGreaterThanOrEqualTo(String value) {
+            addCriterion("row_id >=", value, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdLessThan(String value) {
+            addCriterion("row_id <", value, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdLessThanOrEqualTo(String value) {
+            addCriterion("row_id <=", value, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdLike(String value) {
+            addCriterion("row_id like", value, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdNotLike(String value) {
+            addCriterion("row_id not like", value, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdIn(List<String> values) {
+            addCriterion("row_id in", values, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdNotIn(List<String> values) {
+            addCriterion("row_id not in", values, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdBetween(String value1, String value2) {
+            addCriterion("row_id between", value1, value2, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRowIdNotBetween(String value1, String value2) {
+            addCriterion("row_id not between", value1, value2, "rowId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNull() {
+            addCriterion("title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNotNull() {
+            addCriterion("title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleEqualTo(String value) {
+            addCriterion("title =", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotEqualTo(String value) {
+            addCriterion("title <>", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThan(String value) {
+            addCriterion("title >", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("title >=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThan(String value) {
+            addCriterion("title <", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThanOrEqualTo(String value) {
+            addCriterion("title <=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLike(String value) {
+            addCriterion("title like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotLike(String value) {
+            addCriterion("title not like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIn(List<String> values) {
+            addCriterion("title in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotIn(List<String> values) {
+            addCriterion("title not in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleBetween(String value1, String value2) {
+            addCriterion("title between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotBetween(String value1, String value2) {
+            addCriterion("title not between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordIsNull() {
+            addCriterion("keyword is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordIsNotNull() {
+            addCriterion("keyword is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordEqualTo(String value) {
+            addCriterion("keyword =", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordNotEqualTo(String value) {
+            addCriterion("keyword <>", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordGreaterThan(String value) {
+            addCriterion("keyword >", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordGreaterThanOrEqualTo(String value) {
+            addCriterion("keyword >=", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordLessThan(String value) {
+            addCriterion("keyword <", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordLessThanOrEqualTo(String value) {
+            addCriterion("keyword <=", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordLike(String value) {
+            addCriterion("keyword like", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordNotLike(String value) {
+            addCriterion("keyword not like", value, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordIn(List<String> values) {
+            addCriterion("keyword in", values, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordNotIn(List<String> values) {
+            addCriterion("keyword not in", values, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordBetween(String value1, String value2) {
+            addCriterion("keyword between", value1, value2, "keyword");
+            return (Criteria) this;
+        }
+
+        public Criteria andKeywordNotBetween(String value1, String value2) {
+            addCriterion("keyword not between", value1, value2, "keyword");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated do_not_delete_during_merge Mon Sep 10 14:08:59 CST 2018
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table jt_collect_search
+     *
+     * @mbg.generated Mon Sep 10 14:08:59 CST 2018
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 11 - 1
src/main/java/com/goafanti/common/model/News.java

@@ -105,7 +105,9 @@ public class News {
 	 * 热门
 	 */
 	private Integer hotspot;
-	String publishPage;
+	private String publishPage;
+	
+	private String keyword;
 	
 	
 	public String getPublishPage() {
@@ -289,6 +291,14 @@ public class News {
 	public void setHotspot(Integer hotspot) {
 		this.hotspot = hotspot;
 	}
+
+	public String getKeyword() {
+		return keyword;
+	}
+
+	public void setKeyword(String keyword) {
+		this.keyword = keyword;
+	}
 	
 	
 }

+ 10 - 0
src/main/java/com/goafanti/common/model/Policy.java

@@ -88,6 +88,8 @@ public class Policy {
 	 * @mbg.generated  Thu Jun 28 16:23:43 CST 2018
 	 */
 	private String content;
+	
+	private String keyword;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column policy.id
@@ -376,4 +378,12 @@ public class Policy {
 	public void setContent(String content) {
 		this.content = content;
 	}
+
+	public String getKeyword() {
+		return keyword;
+	}
+
+	public void setKeyword(String keyword) {
+		this.keyword = keyword;
+	}
 }

+ 28 - 0
src/main/java/com/goafanti/common/service/GlobalSearchService.java

@@ -0,0 +1,28 @@
+package com.goafanti.common.service;
+
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.dao.JtCollectSearchMapper;
+import com.goafanti.common.model.JtCollectSearch;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+@Service
+public class GlobalSearchService  extends BaseMybatisDao<JtCollectSearchMapper> {
+
+	@SuppressWarnings("unchecked")
+	public Pagination<JtCollectSearch> globalSearchList(String name, Integer pageNo, Integer pageSize) {
+		Map<String, Object> params = new HashMap<>();
+		if(StringUtils.isNotBlank(name))params.put("name", name);
+		if(pageNo==null||pageNo<1)pageNo=1;
+		if(pageSize==null||pageSize<1)pageSize=10;
+		return (Pagination<JtCollectSearch>) findPage("globalSearchList", "globalSearchCount", params, pageNo,
+				pageSize);
+		
+	}
+
+}

+ 2 - 0
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -87,5 +87,7 @@ public interface DemandService {
 	Pagination<DemandListBo>listInterestedDemand(Integer pageNo,Integer pageSize);
 
 	Pagination<MyCollection> myCollectionDemand(Integer pageNo, Integer pageSize);
+
+	int addJtCollectSearch(Demand d);
 	
 }

+ 39 - 1
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -13,6 +13,7 @@ import java.util.UUID;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import com.goafanti.common.bo.MyCollection;
@@ -29,6 +30,7 @@ import com.goafanti.common.dao.DemandKeywordMapper;
 import com.goafanti.common.dao.DemandMapper;
 import com.goafanti.common.dao.DemandPublishMapper;
 import com.goafanti.common.dao.FieldGlossoryMapper;
+import com.goafanti.common.dao.JtCollectSearchMapper;
 import com.goafanti.common.dao.NewsInterestMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
@@ -46,11 +48,13 @@ import com.goafanti.common.enums.InterestType;
 import com.goafanti.common.enums.NoticeReadStatus;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.UserType;
+import com.goafanti.common.enums.collectType;
 import com.goafanti.common.model.AchievementDemand;
 import com.goafanti.common.model.AchievementDemandCount;
 import com.goafanti.common.model.Demand;
 import com.goafanti.common.model.DemandKeyword;
 import com.goafanti.common.model.DemandPublish;
+import com.goafanti.common.model.JtCollectSearch;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
@@ -109,6 +113,11 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	BranchInformationMapper		branchInformationMapper;
 	@Autowired
 	DemandPublishMapper demandPublishMapper;
+	@Autowired
+	JtCollectSearchMapper	jtCollectSearchMapper;
+	
+	@Value(value="${collect_flag}")
+	private Boolean collectFlag ;
 
 
 	@Override
@@ -177,6 +186,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		d.setAuditStatus(DemandAuditStatus.REVOKE.getCode());
 		int i=0;
 		i=demandMapper.updateByPrimaryKeySelective(d);
+		if(collectFlag)jtCollectSearchMapper.deleteByrowId(d.getId());
 		demandKeywordMapper.batchDeleteByDemandId(d.getId());
 		achievementDemandMapper.deleteByDemandId(d.getId());
 		if (StringUtils.isNotBlank(d.getEmployerId())) {
@@ -583,7 +593,21 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 
 	@Override
 	public int updateByPrimaryKeySelective(Demand d) {
-		return demandMapper.updateByPrimaryKeySelective(d);
+		int i=demandMapper.updateByPrimaryKeySelective(d);
+		if(collectFlag){
+			if (d.getAuditStatus()==2) {
+				JtCollectSearch r=new JtCollectSearch();
+				r.setFromTable(collectType.DMAND.getDesc());
+				r.setKeyword(d.getKeyword());
+				r.setTitle(d.getName());
+				r.setRowId(d.getId());
+				jtCollectSearchMapper.insertSelective(r);				
+			}
+			if (d.getAuditStatus()==4) {
+				if(collectFlag)jtCollectSearchMapper.deleteByrowId(d.getId());
+			}
+		}
+		return i; 
 	}
 	
 	@Override
@@ -924,6 +948,20 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 //		 params.put("uid", "1180fa62-7c42-44be-bc41-5583814d69f4");
 		return (Pagination<MyCollection>) findPage("MyCollectionDemandList", "MyCollectionDemandCount", params, pageNo, pageSize);
 	}
+
+	@Override
+	public int addJtCollectSearch(Demand d) {
+		int i=0;
+		if(collectFlag){
+			JtCollectSearch r=new JtCollectSearch();
+			r.setFromTable(collectType.DMAND.getDesc());
+			r.setKeyword(d.getKeyword());
+			r.setTitle(d.getName());
+			r.setRowId(d.getId());
+			i=jtCollectSearchMapper.insertSelective(r);
+		}
+		return i;
+	}
 	
 	
 	}

+ 10 - 0
src/main/java/com/goafanti/news/bo/InputNews.java

@@ -70,6 +70,8 @@ public class InputNews {
 	 */
 	private Integer hotspot;
 	
+	private String keyword;
+	
 	
 
 	public Date getReleaseDate() {
@@ -216,4 +218,12 @@ public class InputNews {
 		this.hotspot = hotspot;
 	}
 
+	public String getKeyword() {
+		return keyword;
+	}
+
+	public void setKeyword(String keyword) {
+		this.keyword = keyword;
+	}
+
 }

+ 11 - 2
src/main/java/com/goafanti/news/controller/AdminNewsApiController.java

@@ -166,8 +166,17 @@ public Result apply(InputNews news,BindingResult bindingResult,String[] publishP
 					return result;
 				}
 				news.setReleaseDate(new Date());}
-			if(auditStatus!=null) {news.setAuditStatus(auditStatus); 
-			if(auditStatus ==2)news.setReleaseDate(new Date());}
+			if(auditStatus!=null) {
+				news.setAuditStatus(auditStatus); 
+			if(auditStatus ==2){
+				news.setReleaseDate(new Date());
+				
+				newsService.addJtCollectSearch(news);
+				}
+			if(auditStatus ==4){
+				newsService.updateJtCollectSearch(news);
+				}
+			}
 			
 			result.setData(newsService.updateSelectivelyWithoutPages(news));  
 			return result;

+ 10 - 2
src/main/java/com/goafanti/news/controller/AdminPolicyApiController.java

@@ -174,8 +174,16 @@ public class AdminPolicyApiController extends BaseApiController {
 							return result;
 						}
 						policy.setReleaseDate(new Date());}
-					if(auditStatus!=null) {policy.setAuditStatus(auditStatus); 
-					if(auditStatus ==2)policy.setReleaseDate(new Date());}
+					if(auditStatus!=null) {
+						policy.setAuditStatus(auditStatus); 
+					if(auditStatus ==2){
+						policy.setReleaseDate(new Date());
+						policyService.addJtCollectSearch(policy);
+						}
+					if (auditStatus==4) {
+						policyService.updateJtCollectSearch(policy);
+					}
+					}
 					
 					result.setData(policyService.updateSelectivelyWithoutPages(policy));  
 					return result;

+ 33 - 1
src/main/java/com/goafanti/news/service/NewsService.java

@@ -22,8 +22,11 @@ import org.springframework.transaction.annotation.Transactional;
 import com.goafanti.app.bo.AppDiscoveryBo;
 import com.goafanti.common.bo.PolicyEntity;
 import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.JtCollectSearchMapper;
 import com.goafanti.common.dao.NewsMapper;
 import com.goafanti.common.dao.NewsPublishMapper;
+import com.goafanti.common.enums.collectType;
+import com.goafanti.common.model.JtCollectSearch;
 import com.goafanti.common.model.News;
 import com.goafanti.common.model.NewsPublish;
 import com.goafanti.common.model.NewsPublishExample;
@@ -43,8 +46,13 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 	NewsMapper newsMapper;
 	@Autowired
 	NewsPublishMapper newsPublishMapper;
+	@Autowired
+	JtCollectSearchMapper	jtCollectSearchMapper;
 	@Value("${spring.profiles.active}")
 	private String env;
+	@Value(value="${collect_flag}")
+	private Boolean collectFlag ;
+	
 	private static final Logger logger = LoggerFactory.getLogger(NewsService.class);
 
 	@Cacheable(value = "IndexNewsListCache", key = "'NewsList:Page:'+#pageNo+'Type:'+#type+'Size:'+#pageSize")
@@ -100,6 +108,9 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 	}
 	
 	public News save(News news,List<String>webPages,List<String>appPages) {
+		if (null!=news &&news.getAuditStatus()!=null&& news.getAuditStatus()==2) {
+			addJtCollectSearch( news);
+		}
 		newsMapper.insert(news);
 		NewsPublish newsPublish=null;
 		if(webPages!=null && webPages.size()>0)
@@ -147,6 +158,10 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 		return newsMapper.updateByPrimaryKeySelective(news);
 	}
 	public int updateSelectively(News news,List<String>webPages,List<String>appPages) {
+		if(collectFlag){
+			if(news!=null&&news.getAuditStatus()==2)addJtCollectSearch(news);
+			if(news!=null&&news.getAuditStatus()==4)updateJtCollectSearch(news);
+		}
 		newsPublishMapper.deleteByNewsId(news.getId());
 		NewsPublish newsPublish=null;
 		if(webPages!=null && webPages.size()>0)
@@ -360,7 +375,24 @@ public class NewsService extends BaseMybatisDao<NewsMapper> {
 		return newsMapper.selectByPrimaryKey(id);
 	}
 
+	public void addJtCollectSearch(News news) {
+		if(collectFlag){
+			JtCollectSearch r=new JtCollectSearch();
+			r.setFromTable(collectType.NEWS.getDesc());
+			r.setKeyword(news.getKeyword());
+			r.setTitle(news.getTitle());
+			r.setRowId(news.getId().toString());
+			jtCollectSearchMapper.insertSelective(r);
+		}
+		
+	}
+
+	public void updateJtCollectSearch(News news) {
+		if(collectFlag)jtCollectSearchMapper.deleteByrowId(news.getId().toString());
+		
+	}
+
 	
 
 	
-}
+}

+ 26 - 2
src/main/java/com/goafanti/news/service/PolicyService.java

@@ -7,13 +7,15 @@ import java.util.Map;
 import java.util.UUID;
 
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import org.springframework.util.IdGenerator;
-import org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor;
 
 import com.goafanti.app.bo.AppDiscoveryBo;
+import com.goafanti.common.dao.JtCollectSearchMapper;
 import com.goafanti.common.dao.PolicyMapper;
 import com.goafanti.common.dao.PolicyPublishMapper;
+import com.goafanti.common.enums.collectType;
+import com.goafanti.common.model.JtCollectSearch;
 import com.goafanti.common.model.Policy;
 import com.goafanti.common.model.PolicyPublish;
 import com.goafanti.core.mybatis.BaseMybatisDao;
@@ -26,8 +28,15 @@ public class PolicyService extends BaseMybatisDao<PolicyMapper> {
 PolicyMapper policyMapper;
 @Autowired
 PolicyPublishMapper policyPublishMapper;
+@Autowired
+JtCollectSearchMapper	jtCollectSearchMapper;
+@Value(value="${collect_flag}")
+private Boolean collectFlag ;
 
 public Policy saveNewPolicy(Policy policy,List<String>webPages,List<String>appPages) {
+	if (null!=policy&&policy.getAuditStatus()!=null&&policy.getAuditStatus()==2) {
+		addJtCollectSearch(policy);
+	}
 policyMapper.insertSelective(policy);
 PolicyPublish pp=null;
 if(webPages!=null)
@@ -162,4 +171,19 @@ public Pagination<PolicyResult> searchPolicyAndNewsList(Policy policy, Integer p
 	params.put("policy", policy);
 	return (Pagination<PolicyResult>) findPage("searchPolicyAndNewsList","searchPolicyAndNewsCount",params, pageNo, pageSize); 
 }
+public void addJtCollectSearch(Policy policy) {
+	if(collectFlag){
+		JtCollectSearch r=new JtCollectSearch();
+		r.setFromTable(collectType.POLICY.getDesc());
+		r.setKeyword(policy.getKeyword());
+		r.setTitle(policy.getTitle());
+		r.setRowId(policy.getId().toString());
+		jtCollectSearchMapper.insertSelective(r);
+	}
+	
+}
+
+public void updateJtCollectSearch(Policy policy) {
+	if(collectFlag)jtCollectSearchMapper.deleteByrowId(policy.getId().toString());
+	}
 }

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

@@ -12,6 +12,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.stereotype.Service;
 
@@ -23,6 +24,7 @@ import com.goafanti.common.bo.fieldGlossoryBo;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.DistrictGlossoryMapper;
 import com.goafanti.common.dao.IndustryCategoryMapper;
+import com.goafanti.common.dao.JtCollectSearchMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
 import com.goafanti.common.dao.UserInterestMapper;
@@ -33,7 +35,10 @@ import com.goafanti.common.enums.CertifySubmitType;
 import com.goafanti.common.enums.IdentityAuditStatus;
 import com.goafanti.common.enums.NoticeReadStatus;
 import com.goafanti.common.enums.NoticeStatus;
+import com.goafanti.common.enums.SocietyTagStatus;
 import com.goafanti.common.enums.UserLevel;
+import com.goafanti.common.enums.collectType;
+import com.goafanti.common.model.JtCollectSearch;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserIdentity;
@@ -67,6 +72,11 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 	IndustryCategoryMapper industryCategoryMapper;
 	@Autowired
 	UserInterestMapper	userInterestMapper;
+	@Autowired
+	JtCollectSearchMapper	jtCollectSearchMapper;
+	@Value(value="${collect_flag}")
+	private Boolean collectFlag ;
+	
 
 	private static final Logger	logger	= LoggerFactory.getLogger(UserIdentityServiceImpl.class);
 
@@ -582,8 +592,29 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 		}
 		else auditStatus=AchievementAuditStatus.AUDITED.getCode().intValue();
 		identity.setAuditStatus(auditStatus);*/
+		if(collectFlag){
+		ExpertsListBo u=userIdentityMapper.selectByIdentityId(identity.getId());
+		if (identity.getAuditStatus()==2) {
+				JtCollectSearch r=new JtCollectSearch();
+				if(u.getExpert()==1){
+					r.setFromTable(collectType.EXPERT.getDesc());
+				}
+				if(u.getExpert()==2){
+					r.setFromTable(collectType.ADVISER.getDesc());
+				}
+				r.setKeyword(SocietyTagStatus.getStatus(u.getKeyword()).getDesc());
+				r.setTitle(u.getUsername());
+				r.setRowId(u.getUid());
+				jtCollectSearchMapper.insertSelective(r);
+			}
+		
+		if (identity.getAuditStatus()==4) {
+			if(collectFlag)jtCollectSearchMapper.deleteByrowId(u.getUid());
+			}
+		}
 		return userIdentityMapper.updateAuditing(identity);
 	}
+	
 
 	@Override
 	public Integer updateUserIdentityDetail(InputUserIdentity identity) {

+ 1 - 0
src/main/resources/props/config_local.properties

@@ -80,3 +80,4 @@ jiguang.appKey=dbcea43366e038073452a04e
 jiguang.masterSecret=59792298288e4f635c737def
 jiguang.pushUrl=https://api.jpush.cn/v3/push
 
+collect_flag=true

+ 3 - 1
src/main/resources/props/config_test.properties

@@ -77,4 +77,6 @@ easemob.client.secret=YXA61NHE0renI5N8gEgizoI5ivM9SYE
 
 jiguang.appKey=dbcea43366e038073452a04e
 jiguang.masterSecret=59792298288e4f635c737def
-jiguang.pushUrl=https://api.jpush.cn/v3/push
+jiguang.pushUrl=https://api.jpush.cn/v3/push
+
+collect_flag=true

+ 63 - 0
src/main/webapp/WEB-INF/views/portal/adviser.html

@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>知识产权顾问首页</title>
+<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet">
+<link th:href="${portalHost+'/newMenu/adviser.css'}" rel="stylesheet"></head>
+<body>
+     <div th:replace="common::nav('','adviserDetail')"></div>  
+    <!-- 公共头部  省略 -->
+    <div class="banner">
+        <img th:src="${portalHost+'/img/newMenu/adviserBanner.png'}" alt="">
+    </div>
+    <!-- 中间内容开始 -->
+    <div class="container">
+        <div class="indexSearch">
+            <div class="search-inp">
+                <div class="input-group">
+                    <input type="text" class="form-control demandSearch" placeholder="搜索您要找的顾问。。">
+                    <span class="input-group-btn">
+                        <button class="btn btn-default searchBtn" type="button">
+                            <img th:src="${portalHost+'/img/newMenu/search-icon.jpg'}" alt=""> 搜索
+                        </button>
+                    </span>
+                </div>
+            </div>
+        </div>
+        <div class="adviserIndexList">
+            <div class="listHead listOne">
+                <ul>
+                   
+                </ul>
+            </div>
+            <div class="listMid">
+                <div class="listMidLeft" onclick="openZoosUrl('chatwin');"></div>
+                <div class="listHead listMidRight">
+                    <ul>
+                        
+                    </ul>
+                </div>
+            </div>
+            <div class="listHead listBottom">
+                <ul>
+                    
+                </ul>
+            </div>
+            <a href="/portal/adviser/adviserList">查看更多</a>
+        </div>
+    </div>
+    <!-- 中间内容结束 -->
+    <!-- 公共底部  省略 -->
+    <footer>
+        <div th:replace="common::copyright"></div>
+		<div th:replace="common::login"></div>
+    </footer>
+    <div th:replace="common::footer(~{::script})">
+	<script type="text/javascript" th:src="${portalHost+'/vendors.js'}"></script>
+	<script type="text/javascript" th:src="${portalHost+'/newMenu/adviser.js'}"></script>
+	</div>
+	</body>
+</html>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 4 - 6
src/main/webapp/WEB-INF/views/portal/adviser/adviserDetail.html


+ 68 - 0
src/main/webapp/WEB-INF/views/portal/adviser/adviserList.html

@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>知识产权顾问</title>
+  
+<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet">
+<link th:href="${portalHost+'/newMenu/adviserList.css'}" rel="stylesheet"></head>
+<body>
+      <div th:replace="common::nav('','adviserDetail')"></div>
+    <!-- 中间内容开始 -->
+    <div class="container">
+        <div class="indexSearch">
+            <div class="search-inp">
+                <div class="input-group">
+                    <input type="text" class="form-control demandSearch" placeholder="搜索您要找的顾问。。">
+                    <span class="input-group-btn">
+                        <button class="btn btn-default searchBtn" type="button">
+                            <img th:src="${portalHost+'/img/newMenu/search-icon.jpg'}" alt=""> 搜索
+                        </button>
+                    </span>
+                </div>
+            </div>
+        </div>
+        <div class="sort">
+            <a class="relTime">发布时间</a><a class="colNumber">关注量</a>
+        </div>
+        <div class="adviserList">
+            <ul>
+                
+            </ul>
+        </div>
+        <div class="pagination_box">
+                <nav aria-label="Page navigation" class="clearfix">
+                    <ul class="pagination">
+                        <li class="pagePre">
+                            <a href="#" aria-label="Previous">
+                                <span aria-hidden="true">首页</span>
+                            </a>
+                        </li>
+                        <li class="pageNumber"><a href="#" value="1">1</a></li>
+                        <li class="pageNext">
+                            <a href="#" aria-label="Next">
+                                <span aria-hidden="true">末页</span>
+                            </a>
+                        </li>
+                    </ul>
+                    <div class="inp">
+                        <input type="text" class=""><button class="btn btn-default">跳转</button>
+                    </div>
+                    <span class="totalCount">共0条数据</span>
+                </nav>
+            </div>
+    </div>
+    <!-- 中间内容结束 -->
+    <!-- 公共底部  省略 -->
+    <footer>
+        <div th:replace="common::copyright"></div>
+		<div th:replace="common::login"></div>
+    </footer>
+    <div th:replace="common::footer(~{::script})">
+		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${portalHost + '/newMenu/adviserList.js'}"></script>
+	</div>
+</body>
+</html>

+ 2 - 2
src/main/webapp/WEB-INF/views/portal/index.html

@@ -211,13 +211,13 @@
 		</div>
 		
 		<div class="indexSearch">
-			<ul class="jumpType">
+			<!-- <ul class="jumpType">
 				<li class="active">成果</li>
 				<li>需求</li>
 				<li>专利</li>
 				<li>政策</li>
 				<li>项目</li>
-			</ul>
+			</ul> -->
 			<div class="search-inp">
 				<div class="input-group">
 					<input type="text" class="form-control demandSearch" placeholder="输入你感兴趣的内容">

+ 31 - 0
src/main/webapp/WEB-INF/views/portal/search.html

@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+	<head>
+		 <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>搜索页</title>
+<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet">
+<link th:href="${portalHost+'/search.css'}" rel="stylesheet"></head>
+	</head>
+	<body>
+	<div th:replace="common::nav('','adviserDetail')"></div>  
+		 <div class="carousel">
+	        <img th:src="${portalHost+'/img/patent/patent_banner.jpg'}" alt="First slide">
+	    </div>
+	    <div class="title">
+	    	为您找到下列符合条件的信息:
+	    </div>
+		<div class="cont">
+			
+		</div>
+		<footer>
+        <div th:replace="common::copyright"></div>
+		<div th:replace="common::login"></div>
+    </footer>
+    <div th:replace="common::footer(~{::script})">
+	<script type="text/javascript" th:src="${portalHost+'/vendors.js'}"></script>
+	<script type="text/javascript" th:src="${portalHost+'/search.js'}"></script>
+	</div>
+	</body>
+</html>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
src/main/webapp/WEB-INF/views/portal/service/serviceIndex.html