ソースを参照

成果、需求、项目审核通过、撤销时新增数据插入

anderx 7 年 前
コミット
370f28318b

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

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

@@ -259,7 +259,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 
@@ -487,6 +495,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);
+		
+	}
 	
 
 }

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

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

@@ -0,0 +1,61 @@
+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顾问
+	DMAND(1, "demand"),
+	PATENT(2,"patent"),
+	POLICY(3,"policy"),
+	PROJECT(4,"jt_business_project"),
+	EXPERT(5,"user"),//expert
+	ADVISER(6,"user"),//adviser
+	OTHER(7, "");
+	
+	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;
+	
+	
+
+}

+ 20 - 5
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,jbdcType=VARHCAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -564,7 +578,8 @@
       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">

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

@@ -0,0 +1,290 @@
+<?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>
+</mapper>

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

@@ -124,6 +124,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,6 +548,14 @@ 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);
+        }
+    }
+}

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

@@ -164,6 +164,7 @@ public class AdminDemandApiController extends CertifyApiController {
 		if(AFTConstants.YES == auditResult){
 			d.setAuditStatus(DemandAuditStatus.AUDITED.getCode());
 			d.setReleaseDate(new Date());
+			demandService.addJtCollectSearch(d);
 		}else if(AFTConstants.NO == auditResult){
 			d.setAuditStatus(DemandAuditStatus.UNAUDITED.getCode());
 		}

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

+ 27 - 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,9 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 
 	@Override
 	public int updateByPrimaryKeySelective(Demand d) {
-		return demandMapper.updateByPrimaryKeySelective(d);
+		int i=demandMapper.updateByPrimaryKeySelective(d);
+		
+		return i; 
 	}
 	
 	@Override
@@ -924,6 +936,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;
+	}
 	
 	
 	}

+ 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