Quellcode durchsuchen

专利提醒开发

anderx vor 6 Jahren
Ursprung
Commit
fea02f4283
22 geänderte Dateien mit 3690 neuen und 119 gelöschten Zeilen
  1. 2 1
      GeneratorConfig.xml
  2. 5 0
      src/main/java/com/goafanti/common/bo/EmailBo.java
  3. 75 0
      src/main/java/com/goafanti/common/dao/PatentNewLogMapper.java
  4. 77 0
      src/main/java/com/goafanti/common/dao/PatentNewMapper.java
  5. 12 1
      src/main/java/com/goafanti/common/enums/PatentCategoryStatus.java
  6. 271 0
      src/main/java/com/goafanti/common/mapper/PatentNewLogMapper.xml
  7. 492 0
      src/main/java/com/goafanti/common/mapper/PatentNewMapper.xml
  8. 4 2
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  9. 2 2
      src/main/java/com/goafanti/common/mapper/UserLockReleaseMapper.xml
  10. 376 0
      src/main/java/com/goafanti/common/model/PatentNew.java
  11. 1320 0
      src/main/java/com/goafanti/common/model/PatentNewExample.java
  12. 99 0
      src/main/java/com/goafanti/common/model/PatentNewLog.java
  13. 512 0
      src/main/java/com/goafanti/common/model/PatentNewLogExample.java
  14. 205 107
      src/main/java/com/goafanti/common/task/PatentTask.java
  15. 2 0
      src/main/java/com/goafanti/common/utils/DateUtils.java
  16. 1 1
      src/main/java/com/goafanti/common/utils/FileUtils.java
  17. 7 3
      src/main/java/com/goafanti/common/utils/SendEmailUtil.java
  18. 43 0
      src/main/java/com/goafanti/patent/bo/PatentNewBo.java
  19. 94 0
      src/main/java/com/goafanti/patent/controller/AdminPatentNewApiController.java
  20. 23 0
      src/main/java/com/goafanti/patent/service/PatentNewService.java
  21. 66 0
      src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java
  22. 2 2
      src/main/resources/props/config_local.properties

+ 2 - 1
GeneratorConfig.xml

@@ -9,6 +9,7 @@
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
     <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="kede-server" type="XMLMAPPER" />
-    <table schema="aft" tableName="t_order_log"/> 
+    <table schema="aft" tableName="patent_new_log"/>
+    <table schema="aft" tableName="patent_new"/>  
   </context>
 </generatorConfiguration>

+ 5 - 0
src/main/java/com/goafanti/common/bo/EmailBo.java

@@ -78,4 +78,9 @@ public class EmailBo {
         		+ "<div>" + this.content + "</div>"
         		+ "<div>" + this.end + "</div>";
     }
+
+	public void SetEnd(String end) {
+		this.end = end;
+	}
+	
 }

+ 75 - 0
src/main/java/com/goafanti/common/dao/PatentNewLogMapper.java

@@ -0,0 +1,75 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.PatentNewLog;
+import com.goafanti.common.model.PatentNewLogExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface PatentNewLogMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	long countByExample(PatentNewLogExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int deleteByExample(PatentNewLogExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int insert(PatentNewLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int insertSelective(PatentNewLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	List<PatentNewLog> selectByExample(PatentNewLogExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	PatentNewLog selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int updateByExampleSelective(@Param("record") PatentNewLog record, @Param("example") PatentNewLogExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int updateByExample(@Param("record") PatentNewLog record, @Param("example") PatentNewLogExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int updateByPrimaryKeySelective(PatentNewLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int updateByPrimaryKey(PatentNewLog record);
+}

+ 77 - 0
src/main/java/com/goafanti/common/dao/PatentNewMapper.java

@@ -0,0 +1,77 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.PatentNew;
+import com.goafanti.common.model.PatentNewExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface PatentNewMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	long countByExample(PatentNewExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int deleteByExample(PatentNewExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int insert(PatentNew record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int insertSelective(PatentNew record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	List<PatentNew> selectByExample(PatentNewExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	PatentNew selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int updateByExampleSelective(@Param("record") PatentNew record, @Param("example") PatentNewExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int updateByExample(@Param("record") PatentNew record, @Param("example") PatentNewExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int updateByPrimaryKeySelective(PatentNew record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	int updateByPrimaryKey(PatentNew record);
+
+	List<PatentNew> AllselectPatentNew();
+}

+ 12 - 1
src/main/java/com/goafanti/common/enums/PatentCategoryStatus.java

@@ -6,10 +6,21 @@ import java.util.Map;
 import org.apache.commons.lang3.StringUtils;
 
 public enum PatentCategoryStatus {
-	
+	/**
+	 * 其他
+	 */
 	OTHER(0, "其他"),
+	/**
+	 * 实用新型专利
+	 */
 	UTILITY(1, "实用新型专利"),
+	/**
+	 * 外观设计型专利
+	 */
 	DESIGN(2, "外观设计型专利"),
+	/**
+	 * 发明型专利
+	 */
 	INVENTION(3, "发明型专利");
 
 	private PatentCategoryStatus(Integer code, String desc) {

+ 271 - 0
src/main/java/com/goafanti/common/mapper/PatentNewLogMapper.xml

@@ -0,0 +1,271 @@
+<?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.PatentNewLogMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.PatentNewLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="content" jdbcType="VARCHAR" property="content" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="pid" jdbcType="INTEGER" property="pid" />
+  </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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    <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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    <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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    id, content, create_time, pid
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.PatentNewLogExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from patent_new_log
+    <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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from patent_new_log
+    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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    delete from patent_new_log
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.PatentNewLogExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    delete from patent_new_log
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.PatentNewLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    insert into patent_new_log (id, content, create_time, 
+      pid)
+    values (#{id,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{pid,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.PatentNewLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    insert into patent_new_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="pid != null">
+        pid,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pid != null">
+        #{pid,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.PatentNewLogExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    select count(*) from patent_new_log
+    <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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    update patent_new_log
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.pid != null">
+        pid = #{record.pid,jdbcType=INTEGER},
+      </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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    update patent_new_log
+    set id = #{record.id,jdbcType=INTEGER},
+      content = #{record.content,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      pid = #{record.pid,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PatentNewLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    update patent_new_log
+    <set>
+      <if test="content != null">
+        content = #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pid != null">
+        pid = #{pid,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PatentNewLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    update patent_new_log
+    set content = #{content,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      pid = #{pid,jdbcType=INTEGER}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 492 - 0
src/main/java/com/goafanti/common/mapper/PatentNewMapper.xml

@@ -0,0 +1,492 @@
+<?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.PatentNewMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.PatentNew">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="patent_no" jdbcType="VARCHAR" property="patentNo" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="apply_date" jdbcType="DATE" property="applyDate" />
+    <result column="authorization_date" jdbcType="DATE" property="authorizationDate" />
+    <result column="patent_amount" jdbcType="DECIMAL" property="patentAmount" />
+    <result column="applicant" jdbcType="VARCHAR" property="applicant" />
+    <result column="province" jdbcType="INTEGER" property="province" />
+    <result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
+    <result column="email" jdbcType="VARCHAR" property="email" />
+    <result column="certificate_url" jdbcType="VARCHAR" property="certificateUrl" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+  </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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    <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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    <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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    id, patent_no, name, type, status, apply_date, authorization_date, patent_amount, 
+    applicant, province, contact_mobile, email, certificate_url, create_time, update_time, 
+    aid
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.PatentNewExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from patent_new
+    <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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from patent_new
+    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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    delete from patent_new
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.PatentNewExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    delete from patent_new
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.PatentNew">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    insert into patent_new (id, patent_no, name, 
+      type, status, apply_date, 
+      authorization_date, patent_amount, applicant, 
+      province, contact_mobile, email, 
+      certificate_url, create_time, update_time, 
+      aid)
+    values (#{id,jdbcType=INTEGER}, #{patentNo,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{applyDate,jdbcType=DATE}, 
+      #{authorizationDate,jdbcType=DATE}, #{patentAmount,jdbcType=DECIMAL}, #{applicant,jdbcType=VARCHAR}, 
+      #{province,jdbcType=INTEGER}, #{contactMobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, 
+      #{certificateUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{aid,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.PatentNew">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    insert into patent_new
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="patentNo != null">
+        patent_no,
+      </if>
+      <if test="name != null">
+        name,
+      </if>
+      <if test="type != null">
+        type,
+      </if>
+      <if test="status != null">
+        status,
+      </if>
+      <if test="applyDate != null">
+        apply_date,
+      </if>
+      <if test="authorizationDate != null">
+        authorization_date,
+      </if>
+      <if test="patentAmount != null">
+        patent_amount,
+      </if>
+      <if test="applicant != null">
+        applicant,
+      </if>
+      <if test="province != null">
+        province,
+      </if>
+      <if test="contactMobile != null">
+        contact_mobile,
+      </if>
+      <if test="email != null">
+        email,
+      </if>
+      <if test="certificateUrl != null">
+        certificate_url,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="patentNo != null">
+        #{patentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="applyDate != null">
+        #{applyDate,jdbcType=DATE},
+      </if>
+      <if test="authorizationDate != null">
+        #{authorizationDate,jdbcType=DATE},
+      </if>
+      <if test="patentAmount != null">
+        #{patentAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="applicant != null">
+        #{applicant,jdbcType=VARCHAR},
+      </if>
+      <if test="province != null">
+        #{province,jdbcType=INTEGER},
+      </if>
+      <if test="contactMobile != null">
+        #{contactMobile,jdbcType=VARCHAR},
+      </if>
+      <if test="email != null">
+        #{email,jdbcType=VARCHAR},
+      </if>
+      <if test="certificateUrl != null">
+        #{certificateUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.PatentNewExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    select count(*) from patent_new
+    <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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    update patent_new
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.patentNo != null">
+        patent_no = #{record.patentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.type != null">
+        type = #{record.type,jdbcType=INTEGER},
+      </if>
+      <if test="record.status != null">
+        status = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.applyDate != null">
+        apply_date = #{record.applyDate,jdbcType=DATE},
+      </if>
+      <if test="record.authorizationDate != null">
+        authorization_date = #{record.authorizationDate,jdbcType=DATE},
+      </if>
+      <if test="record.patentAmount != null">
+        patent_amount = #{record.patentAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="record.applicant != null">
+        applicant = #{record.applicant,jdbcType=VARCHAR},
+      </if>
+      <if test="record.province != null">
+        province = #{record.province,jdbcType=INTEGER},
+      </if>
+      <if test="record.contactMobile != null">
+        contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
+      </if>
+      <if test="record.email != null">
+        email = #{record.email,jdbcType=VARCHAR},
+      </if>
+      <if test="record.certificateUrl != null">
+        certificate_url = #{record.certificateUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.aid != null">
+        aid = #{record.aid,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 Wed Apr 24 13:38:43 CST 2019.
+    -->
+    update patent_new
+    set id = #{record.id,jdbcType=INTEGER},
+      patent_no = #{record.patentNo,jdbcType=VARCHAR},
+      name = #{record.name,jdbcType=VARCHAR},
+      type = #{record.type,jdbcType=INTEGER},
+      status = #{record.status,jdbcType=INTEGER},
+      apply_date = #{record.applyDate,jdbcType=DATE},
+      authorization_date = #{record.authorizationDate,jdbcType=DATE},
+      patent_amount = #{record.patentAmount,jdbcType=DECIMAL},
+      applicant = #{record.applicant,jdbcType=VARCHAR},
+      province = #{record.province,jdbcType=INTEGER},
+      contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
+      email = #{record.email,jdbcType=VARCHAR},
+      certificate_url = #{record.certificateUrl,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      aid = #{record.aid,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PatentNew">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    update patent_new
+    <set>
+      <if test="patentNo != null">
+        patent_no = #{patentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        status = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="applyDate != null">
+        apply_date = #{applyDate,jdbcType=DATE},
+      </if>
+      <if test="authorizationDate != null">
+        authorization_date = #{authorizationDate,jdbcType=DATE},
+      </if>
+      <if test="patentAmount != null">
+        patent_amount = #{patentAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="applicant != null">
+        applicant = #{applicant,jdbcType=VARCHAR},
+      </if>
+      <if test="province != null">
+        province = #{province,jdbcType=INTEGER},
+      </if>
+      <if test="contactMobile != null">
+        contact_mobile = #{contactMobile,jdbcType=VARCHAR},
+      </if>
+      <if test="email != null">
+        email = #{email,jdbcType=VARCHAR},
+      </if>
+      <if test="certificateUrl != null">
+        certificate_url = #{certificateUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PatentNew">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Apr 24 13:38:43 CST 2019.
+    -->
+    update patent_new
+    set patent_no = #{patentNo,jdbcType=VARCHAR},
+      name = #{name,jdbcType=VARCHAR},
+      type = #{type,jdbcType=INTEGER},
+      status = #{status,jdbcType=INTEGER},
+      apply_date = #{applyDate,jdbcType=DATE},
+      authorization_date = #{authorizationDate,jdbcType=DATE},
+      patent_amount = #{patentAmount,jdbcType=DECIMAL},
+      applicant = #{applicant,jdbcType=VARCHAR},
+      province = #{province,jdbcType=INTEGER},
+      contact_mobile = #{contactMobile,jdbcType=VARCHAR},
+      email = #{email,jdbcType=VARCHAR},
+      certificate_url = #{certificateUrl,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      aid = #{aid,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+  <select id="selectPatentNewList" resultType="com.goafanti.patent.bo.PatentNewBo">
+	  select a.id,a.patent_no as patentNo,a.name,a.type,a.status,
+	  date_format(a.apply_date,'%Y-%m-%d') as applyDates,
+	  date_format(a.authorization_date ,'%Y-%m-%d ')as authorizationDates,a.patent_amount as patentAmount,a.province,
+	a.applicant,a.contact_mobile as contactMobile,a.email,a.certificate_url as certificateUrl,
+	date_format(a.create_time,'%Y-%m-%d %H:%I:%S') as createTimeS,a.apply_date as applyDate,
+	date_format(a.update_time,'%Y-%m-%d %H:%I:%S') as updateTimeS,b.name as aname
+	from patent_new a left join admin b on a.aid=b.id
+	where 1=1
+ 	<if test="aid != null">
+     and  a.aid = #{aid,jdbcType=VARCHAR}
+    </if>
+	order by status ,applyDate
+	<if test="page_sql!=null">
+			${page_sql}
+		</if>
+  </select>
+    <select id="selectPatentNewCount" resultType="java.lang.Integer">
+	  select count(*)
+	from patent_new a
+	where 1=1
+	<if test="aid != null">
+	     and  a.aid = #{aid,jdbcType=VARCHAR}
+	</if>
+	</select>
+	
+	<select id="AllselectPatentNew" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from patent_new where status !=1</select>
+</mapper>

+ 4 - 2
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1125,7 +1125,8 @@
   	left join admin f on e.initiate=f.id
   	</if>
   	<if test="specially == 4">
-  	left join t_order_task  e on e.order_no=a.order_no
+  	left join (select * from t_order_task
+where super_id is null )  e on e.order_no=a.order_no
   	left join admin f on e.task_receiver=f.id
   	</if>
   	where a.delete_sign = 0 
@@ -1207,7 +1208,8 @@
   	left join admin f on e.initiate=f.id
   	</if>
   	<if test="specially == 4">
-  	left join t_order_task e on e.order_no=a.order_no
+  	left join (select * from t_order_task
+where super_id is null ) e on e.order_no=a.order_no
   	left join admin f on e.task_receiver=f.id
   	</if>
   	where a.delete_sign = 0 

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

@@ -366,7 +366,7 @@
 	left join 
 		(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
 	on t0.uid = t1.uid 
-	where datediff(now(),if(t0.lock_time &lt; t1.last_follow_time,t1.last_follow_time,t1.t0.lock_time))>30
+	where datediff(now(),if(t1.t0.lock_time &lt; t1.last_follow_time,t1.last_follow_time,t1.t0.lock_time))>30 or datediff(now(),t0.lock_time)>270
   </select>
   
   <select id="selectWaitReleaseBusiness"  resultType="com.goafanti.customer.bo.LockingReleaseBo">
@@ -381,7 +381,7 @@
 	left join 
 		(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
 	on t0.uid = t1.uid 
-	where datediff(t1.last_follow_time,lock_time)>270 or datediff(now(),t0.lock_time)>270
+	where datediff(t1.last_follow_time,lock_time)>360 or datediff(now(),t0.lock_time)>900
   </select>
   
   <update id="updateReleaseLock" parameterType="java.lang.String">

+ 376 - 0
src/main/java/com/goafanti/common/model/PatentNew.java

@@ -0,0 +1,376 @@
+package com.goafanti.common.model;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class PatentNew {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.id
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.patent_no
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private String patentNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.name
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private String name;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.type
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Integer type;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.status
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Integer status;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.apply_date
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Date applyDate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.authorization_date
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Date authorizationDate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.patent_amount
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private BigDecimal patentAmount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.applicant
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private String applicant;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.province
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Integer province;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.contact_mobile
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private String contactMobile;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.email
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private String email;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.certificate_url
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private String certificateUrl;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.create_time
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.update_time
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Date updateTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new.aid
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private String aid;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.id
+	 * @return  the value of patent_new.id
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.id
+	 * @param id  the value for patent_new.id
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.patent_no
+	 * @return  the value of patent_new.patent_no
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public String getPatentNo() {
+		return patentNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.patent_no
+	 * @param patentNo  the value for patent_new.patent_no
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setPatentNo(String patentNo) {
+		this.patentNo = patentNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.name
+	 * @return  the value of patent_new.name
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.name
+	 * @param name  the value for patent_new.name
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.type
+	 * @return  the value of patent_new.type
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Integer getType() {
+		return type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.type
+	 * @param type  the value for patent_new.type
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setType(Integer type) {
+		this.type = type;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.status
+	 * @return  the value of patent_new.status
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Integer getStatus() {
+		return status;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.status
+	 * @param status  the value for patent_new.status
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.apply_date
+	 * @return  the value of patent_new.apply_date
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Date getApplyDate() {
+		return applyDate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.apply_date
+	 * @param applyDate  the value for patent_new.apply_date
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setApplyDate(Date applyDate) {
+		this.applyDate = applyDate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.authorization_date
+	 * @return  the value of patent_new.authorization_date
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Date getAuthorizationDate() {
+		return authorizationDate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.authorization_date
+	 * @param authorizationDate  the value for patent_new.authorization_date
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setAuthorizationDate(Date authorizationDate) {
+		this.authorizationDate = authorizationDate;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.patent_amount
+	 * @return  the value of patent_new.patent_amount
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public BigDecimal getPatentAmount() {
+		return patentAmount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.patent_amount
+	 * @param patentAmount  the value for patent_new.patent_amount
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setPatentAmount(BigDecimal patentAmount) {
+		this.patentAmount = patentAmount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.applicant
+	 * @return  the value of patent_new.applicant
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public String getApplicant() {
+		return applicant;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.applicant
+	 * @param applicant  the value for patent_new.applicant
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setApplicant(String applicant) {
+		this.applicant = applicant;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.province
+	 * @return  the value of patent_new.province
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Integer getProvince() {
+		return province;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.province
+	 * @param province  the value for patent_new.province
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setProvince(Integer province) {
+		this.province = province;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.contact_mobile
+	 * @return  the value of patent_new.contact_mobile
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public String getContactMobile() {
+		return contactMobile;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.contact_mobile
+	 * @param contactMobile  the value for patent_new.contact_mobile
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setContactMobile(String contactMobile) {
+		this.contactMobile = contactMobile;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.email
+	 * @return  the value of patent_new.email
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public String getEmail() {
+		return email;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.email
+	 * @param email  the value for patent_new.email
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setEmail(String email) {
+		this.email = email;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.certificate_url
+	 * @return  the value of patent_new.certificate_url
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public String getCertificateUrl() {
+		return certificateUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.certificate_url
+	 * @param certificateUrl  the value for patent_new.certificate_url
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setCertificateUrl(String certificateUrl) {
+		this.certificateUrl = certificateUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.create_time
+	 * @return  the value of patent_new.create_time
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.create_time
+	 * @param createTime  the value for patent_new.create_time
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.update_time
+	 * @return  the value of patent_new.update_time
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.update_time
+	 * @param updateTime  the value for patent_new.update_time
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new.aid
+	 * @return  the value of patent_new.aid
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public String getAid() {
+		return aid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new.aid
+	 * @param aid  the value for patent_new.aid
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 1320 - 0
src/main/java/com/goafanti/common/model/PatentNewExample.java


+ 99 - 0
src/main/java/com/goafanti/common/model/PatentNewLog.java

@@ -0,0 +1,99 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class PatentNewLog {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new_log.id
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new_log.content
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private String content;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new_log.create_time
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column patent_new_log.pid
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	private Integer pid;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new_log.id
+	 * @return  the value of patent_new_log.id
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new_log.id
+	 * @param id  the value for patent_new_log.id
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new_log.content
+	 * @return  the value of patent_new_log.content
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public String getContent() {
+		return content;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new_log.content
+	 * @param content  the value for patent_new_log.content
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new_log.create_time
+	 * @return  the value of patent_new_log.create_time
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new_log.create_time
+	 * @param createTime  the value for patent_new_log.create_time
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column patent_new_log.pid
+	 * @return  the value of patent_new_log.pid
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public Integer getPid() {
+		return pid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column patent_new_log.pid
+	 * @param pid  the value for patent_new_log.pid
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setPid(Integer pid) {
+		this.pid = pid;
+	}
+}

+ 512 - 0
src/main/java/com/goafanti/common/model/PatentNewLogExample.java

@@ -0,0 +1,512 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class PatentNewLogExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public PatentNewLogExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	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 patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	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 patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	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 andContentIsNull() {
+			addCriterion("content is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentIsNotNull() {
+			addCriterion("content is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentEqualTo(String value) {
+			addCriterion("content =", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentNotEqualTo(String value) {
+			addCriterion("content <>", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentGreaterThan(String value) {
+			addCriterion("content >", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentGreaterThanOrEqualTo(String value) {
+			addCriterion("content >=", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentLessThan(String value) {
+			addCriterion("content <", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentLessThanOrEqualTo(String value) {
+			addCriterion("content <=", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentLike(String value) {
+			addCriterion("content like", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentNotLike(String value) {
+			addCriterion("content not like", value, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentIn(List<String> values) {
+			addCriterion("content in", values, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentNotIn(List<String> values) {
+			addCriterion("content not in", values, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentBetween(String value1, String value2) {
+			addCriterion("content between", value1, value2, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andContentNotBetween(String value1, String value2) {
+			addCriterion("content not between", value1, value2, "content");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIsNull() {
+			addCriterion("create_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIsNotNull() {
+			addCriterion("create_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeEqualTo(Date value) {
+			addCriterion("create_time =", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotEqualTo(Date value) {
+			addCriterion("create_time <>", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeGreaterThan(Date value) {
+			addCriterion("create_time >", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+			addCriterion("create_time >=", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeLessThan(Date value) {
+			addCriterion("create_time <", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+			addCriterion("create_time <=", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIn(List<Date> values) {
+			addCriterion("create_time in", values, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotIn(List<Date> values) {
+			addCriterion("create_time not in", values, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeBetween(Date value1, Date value2) {
+			addCriterion("create_time between", value1, value2, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+			addCriterion("create_time not between", value1, value2, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidIsNull() {
+			addCriterion("pid is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidIsNotNull() {
+			addCriterion("pid is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidEqualTo(Integer value) {
+			addCriterion("pid =", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidNotEqualTo(Integer value) {
+			addCriterion("pid <>", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidGreaterThan(Integer value) {
+			addCriterion("pid >", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidGreaterThanOrEqualTo(Integer value) {
+			addCriterion("pid >=", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidLessThan(Integer value) {
+			addCriterion("pid <", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidLessThanOrEqualTo(Integer value) {
+			addCriterion("pid <=", value, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidIn(List<Integer> values) {
+			addCriterion("pid in", values, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidNotIn(List<Integer> values) {
+			addCriterion("pid not in", values, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidBetween(Integer value1, Integer value2) {
+			addCriterion("pid between", value1, value2, "pid");
+			return (Criteria) this;
+		}
+
+		public Criteria andPidNotBetween(Integer value1, Integer value2) {
+			addCriterion("pid not between", value1, value2, "pid");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table patent_new_log
+	 * @mbg.generated  Wed Apr 24 13:38:43 CST 2019
+	 */
+	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);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table patent_new_log
+     *
+     * @mbg.generated do_not_delete_during_merge Mon Apr 22 10:59:42 CST 2019
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 205 - 107
src/main/java/com/goafanti/common/task/PatentTask.java

@@ -1,134 +1,232 @@
 package com.goafanti.common.task;
 
+import java.io.UnsupportedEncodingException;
+import java.math.BigDecimal;
+import java.text.DateFormat;
 import java.text.ParseException;
-import java.util.ArrayList;
+import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import javax.annotation.Resource;
+import javax.mail.MessagingException;
 
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.time.DateFormatUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
-
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.model.PatentCost;
-import com.goafanti.common.utils.DateUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import com.goafanti.admin.service.AdminService;
+import com.goafanti.common.bo.EmailBo;
+import com.goafanti.common.enums.PatentCategoryStatus;
+import com.goafanti.common.model.Admin;
+import com.goafanti.common.model.PatentNew;
+import com.goafanti.common.model.PatentNewLog;
 import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.common.utils.MobileMessageUtils;
-import com.goafanti.patent.bo.PatentAnnualFeeTaskBo;
-import com.goafanti.patent.bo.PatentExpireBo;
-import com.goafanti.patent.service.PatentCostService;
-import com.goafanti.patent.service.PatentInfoService;
-
-@Component
-public class PatentTask {
-	@Resource
-	private PatentInfoService	patentInfoService;
-	@Resource
-	private PatentCostService	patentCostService;
+import com.goafanti.common.utils.SendEmailUtil;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.patent.service.PatentNewService;
 
-	@Value(value = "${accessKey}")
-	private String				accessKey		= null;
 
-	@Value(value = "${accessSecret}")
-	private String				accessSecret	= null;
 
-	@Value(value = "${patentTemplate}")
-	private String				patentTemplate	= null;
 
-	private static final String	LEAP_DAY		= "02-29";
-
-	private static final String	LEAP_DAY_ADD	= "03-01";
-
-	/**
-	 * "0 0 0 * * ?" 每天0点触发一次
-	 */
-
-	@Scheduled(cron = "0 0 0 * * ?")
-	public void exprireRun() {
-		LoggerUtils.debug(getClass(), "开始检查专利到期");
-		Calendar now = Calendar.getInstance();
-		disposeExprireRecord(now);// 短信
-		disposeAnnualFee(now);// 年费状态
-	}
-
-	private void disposeExprireRecord(Calendar now) {
-		List<PatentExpireBo> peb = patentInfoService.selectExpireRecord();
-		if (null != peb && peb.size() > 0) {
-			for (PatentExpireBo p : peb) {
-				String mobile = p.getMobile();
-				if (StringUtils.isNotBlank(mobile) && StringUtils.isNumeric(mobile)
-						&& null != p.getPatentApplicationDate()) {
-					try {
-						if (disposeExprire(p, now)) {
-							//sendMessage(p);
+//@Component
+@Controller
+public class PatentTask {
+	@Resource
+	private PatentNewService patentNewService;
+	@Resource
+	private AdminService adminService;
+	
+	
+	
+
+    
+    
+    private static final String regEx_script = "<script[^>]*?>[\\s\\S]*?<\\/script>"; // 定义script的正则表达式
+    private static final String regEx_style = "<style[^>]*?>[\\s\\S]*?<\\/style>"; // 定义style的正则表达式
+    private static final String regEx_html = "<[^>]+>"; // 定义HTML标签的正则表达式
+    private static final String regEx_space = "\\s*|\t|\r|\n";//定义空格回车换行符
+	
+
+	
+	
+	
+	
+//	@Scheduled(cron = "0 0 0  * * ?") 
+	@RequestMapping(value = "/open/patentRemind", method = RequestMethod.GET)
+	public void patentRemind() {
+		LoggerUtils.debug(getClass(), "开始检查专利提醒");
+		List<PatentNew> l=patentNewService.AllselectPatentNew();
+		for (PatentNew p : l) {
+			 Calendar cst =Calendar.getInstance();
+			 Calendar ced =Calendar.getInstance();
+			 Calendar ted =Calendar.getInstance();
+			 cst.setTime(p.getApplyDate());
+			 ced.setTime(new Date());
+			 //获得累计年限   2019-2018=1
+			 int y=ced.getWeekYear()-cst.getWeekYear();
+			//获得提醒日期
+			 ted.setTime(p.getApplyDate());
+			 cst.add(Calendar.YEAR, y);
+			 cst.add(Calendar.MONTH, -3);
+			 String content = null;
+			 Admin a=adminService.selectByPrimaryKey(p.getAid());
+			 //计算出年费金额,然后存入数据库
+			 BigDecimal Money=countMoney(y,p.getType());
+			 //如果今天是提醒日,则发送邮件
+			 if(isSameDate(new Date(), cst.getTime())) {
+				 if(StringUtils.isNotBlank(p.getEmail())){
+					  content = "<div>专利名称: "+ p.getName() +"</div><div>客户名称: " + p.getApplicant() + "</div>"
+							  + "<div>专利编号: "+ p.getPatentNo() + "<div>金额: "+ Money +"</div><div>你的专利将在三个月即将到期</div>";
+						EmailBo emailBo = new EmailBo("专利提醒", p.getEmail(), "客户", "科德集团", a.getName(), content);
+						emailBo.SetEnd("详情请联系相关办理人员,谢谢!");
+						try {
+							SendEmailUtil.getInstance().send(emailBo);
+						} catch (UnsupportedEncodingException e) {
+							LoggerUtils.debug(getClass(), "=====================专利提醒失败======================");
+							e.printStackTrace();
+						} catch (MessagingException e) {
+							LoggerUtils.debug(getClass(), "=====================专利提醒失败======================");
+							e.printStackTrace();
 						}
-					} catch (ParseException e) {
 					}
-				}
+				 p.setPatentAmount(Money);
+				 p.setStatus(1);//提醒中
+				 patentNewService.updatePatenNew(p);
+				 PatentNewLog pl=new PatentNewLog();
+				 pl.setContent(getTextFromHtml(content));
+				 pl.setCreateTime(new Date());
+				 pl.setPid(p.getId());
+				 patentNewService.addPatenNewLog(pl);
 			}
 		}
+		LoggerUtils.debug(getClass(), "=====================专利提醒结束======================");
 	}
-
-	private Boolean disposeExprire(PatentExpireBo peb, Calendar now) throws ParseException {
-		Date addYear = disposeAddYear(peb.getPatentApplicationDate());// 申请日5年后
-		if (addYear.getTime() - now.getTime().getTime() >= 0) {
-			now.add(Calendar.MONTH, +3);// 提前三个月
-			return disposeExprireDate(peb.getPatentApplicationDate(), now.getTime());
-		}
-		return Boolean.FALSE;
-	}
-
-	private Boolean disposeExprireDate(Date apd, Date now) {
-		String sApd = DateFormatUtils.format(apd, AFTConstants.MMDD);
-		String sNow = DateFormatUtils.format(now, AFTConstants.MMDD);
-		if (LEAP_DAY.equals(sApd)) {
-			if (LEAP_DAY_ADD.equals(sNow)) {
-				return Boolean.TRUE;
+	
+	/**
+	 * 
+	 * @param 年份
+	 * @param 分类
+	 * @return 金额
+	 */
+	
+	private static BigDecimal countMoney(Integer y, Integer type) {
+		int money=0;
+		if (type==PatentCategoryStatus.INVENTION.getCode()) {
+			if (y>0&&y<4) {
+				money=900;
+			}else if (y>3&&y<7) {
+				money=1200;
+			}else if (y>6&&y<10) {
+				money=2000;
+			}else if (y>9&&y<13) {
+				money=4000;
+			}else if (y>12&&y<16) {
+				money=6000;
+			}else if (y>15&&y<21) {
+				money=8000;
 			}
 		} else {
-			if (sApd.equals(sNow)) {
-				return Boolean.TRUE;
-			}
-		}
-		return Boolean.FALSE;
-	}
-
-	private Date disposeAddYear(Date s) throws ParseException {
-		return DateUtils.parseDate((Integer.parseInt(DateFormatUtils.format(s, AFTConstants.YYYY)) + 5) + "-"
-				+ DateFormatUtils.format(s, AFTConstants.MMDD), AFTConstants.YYYYMMDD);
-	}
-
-	private void disposeAnnualFee(Calendar now) {
-		List<PatentAnnualFeeTaskBo> af = patentInfoService.findAnnualFeeTaskBo();
-		if (af.isEmpty()) {
-			return;
-		}
-		List<PatentCost> list = new ArrayList<>();
-		for (PatentAnnualFeeTaskBo bo : af) {
-			PatentCost cost = null;
-			if (disposeExprireDate(bo.getPatentApplicationDate(), now.getTime())) {
-				cost = new PatentCost();
-				cost.setId(bo.getId());
-				list.add(cost);
+			if (y>0&&y<4) {
+				money=600;
+			}else if (y>3&&y<6) {
+				money=900;
+			}else if (y>5&&y<9) {
+				money=1200;
+			}else if (y>8&&y<11) {
+				money=2000;
 			}
 		}
-		if (list.isEmpty()) {
-			return;
-		}
-		patentCostService.batchUpdateByPrimaryKey(list);
-
-	}
-
-	@SuppressWarnings("unused")
-	private void sendMessage(PatentExpireBo p) {
-		String paramString = "{\"patentName\":\"" + p.getPatentName() + "\",\"patentNumber\":\"" + p.getPatentNumber()
-				+ "\"}";
-		MobileMessageUtils.sendMessage(patentTemplate, paramString, p.getMobile(), accessKey, accessSecret);
+		
+		return new BigDecimal(money);
 	}
-
-}
+	
+	
+
+
+
+	public static final int calculationYear(Date early) { 
+	     
+        Calendar calst =Calendar.getInstance();   
+       Calendar caled =Calendar.getInstance();   
+        calst.setTime(early);   
+         caled.setTime(new Date());   
+         //设置时间为0时   
+        int y=caled.getWeekYear()-calst.getWeekYear();
+        
+		
+        return y;   
+   } 
+	
+	  /**
+     * 判断两个日期是否是同一天
+     * 
+     * @param date1
+     *            date1
+     * @param date2
+     *            date2
+     * @return
+     */
+    private static boolean isSameDate(Date date1, Date date2) {
+        Calendar cal1 = Calendar.getInstance();
+        cal1.setTime(date1);
+
+        Calendar cal2 = Calendar.getInstance();
+        cal2.setTime(date2);
+
+        boolean isSameYear = cal1.get(Calendar.YEAR) == cal2
+                .get(Calendar.YEAR);
+        boolean isSameMonth = isSameYear
+                && cal1.get(Calendar.MONTH) == cal2.get(Calendar.MONTH);
+        boolean isSameDate = isSameMonth
+                && cal1.get(Calendar.DAY_OF_MONTH) == cal2
+                        .get(Calendar.DAY_OF_MONTH);
+
+        return isSameDate;
+    }
+
+
+
+           
+        /**
+         * @param htmlStr
+         * @return
+         *  删除Html标签
+         */
+        public static String delHTMLTag(String htmlStr) {
+            Pattern p_script = Pattern.compile(regEx_script, Pattern.CASE_INSENSITIVE);
+            Matcher m_script = p_script.matcher(htmlStr);
+            htmlStr = m_script.replaceAll(""); // 过滤script标签
+       
+            Pattern p_style = Pattern.compile(regEx_style, Pattern.CASE_INSENSITIVE);
+            Matcher m_style = p_style.matcher(htmlStr);
+            htmlStr = m_style.replaceAll(""); // 过滤style标签
+       
+            Pattern p_html = Pattern.compile(regEx_html, Pattern.CASE_INSENSITIVE);
+            Matcher m_html = p_html.matcher(htmlStr);
+            htmlStr = m_html.replaceAll(""); // 过滤html标签
+       
+            Pattern p_space = Pattern.compile(regEx_space, Pattern.CASE_INSENSITIVE);
+            Matcher m_space = p_space.matcher(htmlStr);
+            htmlStr = m_space.replaceAll(""); // 过滤空格回车标签
+            return htmlStr.trim(); // 返回文本字符串
+        }
+           
+        public static String getTextFromHtml(String htmlStr){
+            htmlStr = delHTMLTag(htmlStr);
+            htmlStr = htmlStr.replaceAll("&nbsp;", "");
+            return htmlStr;
+        }
+           
+       /* public static void main(String[] args) {
+            String str = "<div style='text-align:center;'> 整治“四风”   清弊除垢<br/><span style='font-size:14px;'> </span><span style='font-size:18px;'>公司召开党的群众路线教育实践活动动员大会</span><br/><title>我是标题</title><desc>我是desc里的内容</desc></div>";
+            System.out.println(getTextFromHtml(str));
+        }*/
+    
+}

+ 2 - 0
src/main/java/com/goafanti/common/utils/DateUtils.java

@@ -455,5 +455,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
 		setMidnight(c);
 		return c.getTime();
 	}
+	
+
 
 }

+ 1 - 1
src/main/java/com/goafanti/common/utils/FileUtils.java

@@ -109,7 +109,7 @@ public class FileUtils {
 				|| sign.indexOf("news") != -1||sign.indexOf("customer_sys_file") != -1 || sign.indexOf("order_refund_file") != -1
 				||sign.indexOf("business_project_max_picture") != -1||sign.indexOf("business_project_min_picture") != -1
 				||sign.indexOf("varieties_picture") != -1  || sign.indexOf("organization_application") != -1
-				||sign.indexOf("order_task_file") != -1) {
+				||sign.indexOf("order_task_file") != -1||sign.indexOf("patent_certificate") != -1) {
 			uniq = true;
 		}
 		String fileName = "";

+ 7 - 3
src/main/java/com/goafanti/common/utils/SendEmailUtil.java

@@ -116,12 +116,16 @@ public class SendEmailUtil {
 //		BigDecimal b = new BigDecimal("1.2");
 //		System.out.println(b.add(new BigDecimal(0.0000)).toString());
 //		System.out.println(b.add(new BigDecimal("0")).toString());
-		String content = "<div>客户名称: 旺旺</div><div>订单编号: 0001</div>";
+		/*String content = "<div>客户名称: 旺旺</div><div>订单编号: 0001</div>";
 		content +="<div>催收时间: " + 123456 +"</div><div>催收科目: " + "??" +"</div><div>催收情况: " + "???" +"</div>";
 //		EmailBo bo =new EmailBo("催收通知","3298921364@qq.com,","管理员,","平台超管中心","管理员","<div>客户名称: 国防湖南</div><div>订单编号: 273822676366036992</div><div>催收时间: 273822676366036992</div><div>催收科目: 273822676366036992</div><div>催收情况: 273822676366036992</div>");
 //		send(bo);
+		EmailBo bo = new EmailBo("奖金信息", "3298921364@qq.com,", "limim,", "财务部", "财务专员彭晓丽", content);*/
 		SendEmailUtil emailUtil = SendEmailUtil.getInstance();
-		EmailBo bo = new EmailBo("奖金信息", "3298921364@qq.com,", "limim,", "财务部", "财务专员彭晓丽", content);
-		emailUtil.send(bo);
+		String content = "<div>专利缴费提醒: "+ "专利1号" +"</div><div>客户名称: " + "湖南明和" + "</div>";
+		 content += "<div>专利编号: "+ "zl0001" +"</div>";
+			EmailBo emailBo = new EmailBo("专利提醒","2304089483@qq.com", "客户", "科德集团", "技术员", content);
+			emailBo.SetEnd("详情请联系相关办理人员,谢谢!");
+			emailUtil.send(emailBo);
 	}
 }

+ 43 - 0
src/main/java/com/goafanti/patent/bo/PatentNewBo.java

@@ -0,0 +1,43 @@
+package com.goafanti.patent.bo;
+
+import java.util.Date;
+
+import com.goafanti.common.model.PatentNew;
+
+public class PatentNewBo extends PatentNew{
+	private String applyDates;
+	private String authorizationDates;
+	private String aname;
+	private String createTimes;
+	private String updateTimes;
+	public String getApplyDates() {
+		return applyDates;
+	}
+	public void setApplyDates(String applyDates) {
+		this.applyDates = applyDates;
+	}
+	public String getAuthorizationDates() {
+		return authorizationDates;
+	}
+	public void setAuthorizationDates(String authorizationDates) {
+		this.authorizationDates = authorizationDates;
+	}
+	public String getAname() {
+		return aname;
+	}
+	public void setAname(String aname) {
+		this.aname = aname;
+	}
+	public String getCreateTimes() {
+		return createTimes;
+	}
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
+	public String getUpdateTimes() {
+		return updateTimes;
+	}
+	public void setUpdateTimes(String updateTimes) {
+		this.updateTimes = updateTimes;
+	}
+}

+ 94 - 0
src/main/java/com/goafanti/patent/controller/AdminPatentNewApiController.java

@@ -0,0 +1,94 @@
+package com.goafanti.patent.controller;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.patent.bo.PatentNewBo;
+import com.goafanti.patent.service.PatentNewService;
+
+
+@Controller
+@RequestMapping(value = "/api/admin/patentNew")
+public class AdminPatentNewApiController extends CertifyApiController {
+
+	@Resource
+	private PatentNewService patentNewService;
+ 
+	
+	/**
+	 * 新增专利信息
+	 */
+	@RequestMapping(value = "/addPatentNew", method = RequestMethod.POST)
+	public Result addPatentNew(PatentNewBo p){
+		Result res = new Result();
+		if (StringUtils.isBlank(p.getPatentNo())|| StringUtils.isBlank(p.getName())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "专利", "专利"));
+			return res;
+		}
+		if ( StringUtils.isBlank(p.getApplyDates())|| StringUtils.isBlank(p.getAuthorizationDates())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "时间", "时间"));
+			return res;
+		}else {
+			 SimpleDateFormat sdf = new SimpleDateFormat( AFTConstants.YYYYMMDD);
+		        
+			 try {
+				p.setApplyDate(sdf.parse(p.getApplyDates()));
+				p.setAuthorizationDate(sdf.parse(p.getAuthorizationDates()));
+			} catch (ParseException e) {
+				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "时间", "时间"));
+				return res;
+			}
+		}
+		return res.data(patentNewService.addPatenNew(p));
+	}
+	/**
+	 * 修改专利信息
+	 */
+	@RequestMapping(value = "/updatePatentNew", method = RequestMethod.POST)
+	public Result updatePatentNew(PatentNewBo p){
+		Result res = new Result();
+		if (StringUtils.isBlank(p.getPatentNo())|| StringUtils.isBlank(p.getName())||StringUtils.isBlank(p.getCertificateUrl())) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "专利", "专利"));
+			return res;
+		}
+		SimpleDateFormat sdf = new SimpleDateFormat( AFTConstants.YYYYMMDD);
+		try {
+			p.setApplyDate(sdf.parse(p.getApplyDates()));
+			p.setAuthorizationDate(sdf.parse(p.getAuthorizationDates()));
+		} catch (ParseException e) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "时间", "时间"));
+			return res;
+		}
+		return res.data(patentNewService.updatePatenNew(p));
+	}
+	/**
+	 * 专利列表
+	 */
+	@RequestMapping(value = "/selectPatentNew", method = RequestMethod.GET)
+	public Result selectPatentNew(Integer pageSize,Integer pageNo){
+		Result res = new Result();
+		return res.data(patentNewService.selectPatentNew(pageSize,pageNo));
+	}
+	/** 证件上传 **/
+	@RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
+	public Result uploadRefundOrderFile(HttpServletRequest req,String sign){
+		Result res = new Result();
+		//order_refund_file
+		res.setData(handleFile(res, "/patent_certificate/", false, req, sign));
+		return res;
+	}
+	
+}

+ 23 - 0
src/main/java/com/goafanti/patent/service/PatentNewService.java

@@ -0,0 +1,23 @@
+package com.goafanti.patent.service;
+
+import java.util.List;
+
+import com.goafanti.common.model.PatentNew;
+import com.goafanti.common.model.PatentNewLog;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.patent.bo.PatentNewBo;
+
+public interface PatentNewService {
+
+	int addPatenNew(PatentNew p);
+
+	int updatePatenNew(PatentNew p);
+
+	Pagination<PatentNewBo> selectPatentNew(Integer pageSize, Integer pageNo);
+	
+	List<PatentNew> AllselectPatentNew();
+	
+	
+	int addPatenNewLog(PatentNewLog pl);
+
+}

+ 66 - 0
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -0,0 +1,66 @@
+package com.goafanti.patent.service.impl;
+
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.PatentNewLogMapper;
+import com.goafanti.common.dao.PatentNewMapper;
+import com.goafanti.common.model.PatentNew;
+import com.goafanti.common.model.PatentNewLog;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.patent.bo.PatentNewBo;
+import com.goafanti.patent.service.PatentNewService;
+@Service
+public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> implements PatentNewService {
+	@Autowired
+	private PatentNewMapper patentNewMapper;
+	@Autowired
+	private PatentNewLogMapper patentNewLogMapper;
+
+	@Override
+	public int addPatenNew(PatentNew p) {
+		p.setStatus(0);//
+		p.setAid(TokenManager.getAdminId());
+		return patentNewMapper.insertSelective(p);
+	}
+
+	@Override
+	public int updatePatenNew(PatentNew p) {
+		return patentNewMapper.updateByPrimaryKeySelective(p);
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<PatentNewBo> selectPatentNew(Integer pageSize, Integer pageNo) {
+		Map<String, Object> params = new HashMap<>();
+		if (pageNo == null || pageNo < 0) pageNo = 1;
+		if (pageSize == null || pageSize < 0)	pageSize = 10;
+		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN))params.put("aid", TokenManager.getAdminId());
+		
+		return (Pagination<PatentNewBo>) findPage("selectPatentNewList", "selectPatentNewCount", params, pageNo,
+				pageSize);
+	}
+
+	@Override
+	public List<PatentNew> AllselectPatentNew() {
+
+		return patentNewMapper.AllselectPatentNew();
+	}
+
+	@Override
+	public int addPatenNewLog(PatentNewLog pl) {
+		return patentNewLogMapper.insertSelective(pl);
+	}
+
+	
+	
+	
+}

+ 2 - 2
src/main/resources/props/config_local.properties

@@ -60,12 +60,12 @@ template.cacheable=false
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
 #连接开发
-static.host=//sb.jishutao.com/1.0.53
+static.host=//sb.jishutao.com/1.0.98
 avatar.host=//sb.jishutao.com
 
 #连生产
 #avatar.host=//static.kedexinxi.com
-#static.host=//s.kedexinxi.com/1.0.97
+#static.host=//s.kedexinxi.com/1.0.98
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload