|
|
@@ -5,7 +5,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 08 14:33:37 CST 2019.
|
|
|
+ This element was generated on Thu May 27 11:21:28 CST 2021.
|
|
|
-->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="patent_no" jdbcType="VARCHAR" property="patentNo" />
|
|
|
@@ -24,109 +24,23 @@
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
<result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
<result column="years" jdbcType="INTEGER" property="years" />
|
|
|
+ <result column="uid" jdbcType="VARCHAR" property="uid" />
|
|
|
</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 May 08 14:33:37 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 May 08 14:33:37 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 May 08 14:33:37 CST 2019.
|
|
|
+ This element was generated on Thu May 27 11:21:28 CST 2021.
|
|
|
-->
|
|
|
- id, patent_no, name, type, status, apply_date, authorization_date, patent_amount,
|
|
|
+ id, patent_no, `name`, `type`, `status`, apply_date, authorization_date, patent_amount,
|
|
|
applicant, province, contact_mobile, email, certificate_url, create_time, update_time,
|
|
|
- aid, years
|
|
|
+ aid, `years`, `uid`
|
|
|
</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 May 08 14:33:37 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 May 08 14:33:37 CST 2019.
|
|
|
+ This element was generated on Thu May 27 11:21:28 CST 2021.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -137,46 +51,35 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 08 14:33:37 CST 2019.
|
|
|
+ This element was generated on Thu May 27 11:21:28 CST 2021.
|
|
|
-->
|
|
|
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 May 08 14:33:37 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 May 08 14:33:37 CST 2019.
|
|
|
+ This element was generated on Thu May 27 11:21:28 CST 2021.
|
|
|
-->
|
|
|
- insert into patent_new (id, patent_no, name,
|
|
|
- type, status, apply_date,
|
|
|
+ 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, years)
|
|
|
+ aid, `years`, `uid`)
|
|
|
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}, #{years,jdbcType=INTEGER})
|
|
|
+ #{aid,jdbcType=VARCHAR}, #{years,jdbcType=INTEGER}, #{uid,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 May 08 14:33:37 CST 2019.
|
|
|
+ This element was generated on Thu May 27 11:21:28 CST 2021.
|
|
|
-->
|
|
|
insert into patent_new
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -187,13 +90,13 @@
|
|
|
patent_no,
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
- name,
|
|
|
+ `name`,
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
- type,
|
|
|
+ `type`,
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- status,
|
|
|
+ `status`,
|
|
|
</if>
|
|
|
<if test="applyDate != null">
|
|
|
apply_date,
|
|
|
@@ -229,7 +132,10 @@
|
|
|
aid,
|
|
|
</if>
|
|
|
<if test="years != null">
|
|
|
- years,
|
|
|
+ `years`,
|
|
|
+ </if>
|
|
|
+ <if test="uid != null">
|
|
|
+ `uid`,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -284,116 +190,16 @@
|
|
|
<if test="years != null">
|
|
|
#{years,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="uid != null">
|
|
|
+ #{uid,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 May 08 14:33:37 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 May 08 14:33:37 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>
|
|
|
- <if test="record.years != null">
|
|
|
- years = #{record.years,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 May 08 14:33:37 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},
|
|
|
- years = #{record.years,jdbcType=INTEGER}
|
|
|
- <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 May 08 14:33:37 CST 2019.
|
|
|
+ This element was generated on Thu May 27 11:21:28 CST 2021.
|
|
|
-->
|
|
|
update patent_new
|
|
|
<set>
|
|
|
@@ -401,13 +207,13 @@
|
|
|
patent_no = #{patentNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
- name = #{name,jdbcType=VARCHAR},
|
|
|
+ `name` = #{name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
- type = #{type,jdbcType=INTEGER},
|
|
|
+ `type` = #{type,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- status = #{status,jdbcType=INTEGER},
|
|
|
+ `status` = #{status,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="applyDate != null">
|
|
|
apply_date = #{applyDate,jdbcType=DATE},
|
|
|
@@ -443,7 +249,10 @@
|
|
|
aid = #{aid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="years != null">
|
|
|
- years = #{years,jdbcType=INTEGER},
|
|
|
+ `years` = #{years,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="uid != null">
|
|
|
+ `uid` = #{uid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -452,13 +261,13 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed May 08 14:33:37 CST 2019.
|
|
|
+ This element was generated on Thu May 27 11:21:28 CST 2021.
|
|
|
-->
|
|
|
update patent_new
|
|
|
set patent_no = #{patentNo,jdbcType=VARCHAR},
|
|
|
- name = #{name,jdbcType=VARCHAR},
|
|
|
- type = #{type,jdbcType=INTEGER},
|
|
|
- status = #{status,jdbcType=INTEGER},
|
|
|
+ `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},
|
|
|
@@ -470,18 +279,20 @@
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
aid = #{aid,jdbcType=VARCHAR},
|
|
|
- years = #{years,jdbcType=INTEGER}
|
|
|
+ `years` = #{years,jdbcType=INTEGER},
|
|
|
+ `uid` = #{uid,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,
|
|
|
+ select a.id,a.patent_no as patentNo,a.name,a.type,a.status,
|
|
|
+ date_format(a.apply_date,'%Y-%m-%d') as applyDates,a.uid,
|
|
|
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,c.name depName,
|
|
|
- date_format(a.update_time,'%Y-%m-%d %H:%I:%S') as updateTimeS,b.name as aname
|
|
|
+ date_format(a.update_time,'%Y-%m-%d %H:%I:%S') as updateTimeS,b.name as aname,u.nickname userName
|
|
|
from patent_new a left join admin b on a.aid=b.id
|
|
|
+ left join `user` u on a.uid=u.id
|
|
|
left join department c on b.department_id=c.id
|
|
|
<if test="shiro ==1">
|
|
|
left join admin e on e.department_id=c.id
|
|
|
@@ -559,7 +370,7 @@
|
|
|
<select id="AllselectStartPatentNew" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
- from patent_new where status =0
|
|
|
+ from patent_new where status < 8
|
|
|
</select>
|
|
|
<select id="AllselectEndPatentNew" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -571,4 +382,21 @@
|
|
|
update patent_new set aid= #{transferId}
|
|
|
where aid= #{aid}
|
|
|
</update>
|
|
|
+ <insert id="insertBatch">
|
|
|
+ insert into patent_new (patent_no, `name`,
|
|
|
+ `type`, `status`, apply_date,
|
|
|
+ authorization_date, patent_amount, applicant,
|
|
|
+ province, contact_mobile, email,
|
|
|
+ certificate_url, create_time, update_time,
|
|
|
+ aid, `years`, `uid`)values
|
|
|
+ <foreach item="item" index="index" collection="list" separator=",">
|
|
|
+ ( #{item.aid,jdbcType=VARCHAR}, #{item.noticeType,jdbcType=INTEGER},
|
|
|
+ #{item.content,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.readed,jdbcType=INTEGER},
|
|
|
+ #{item.uid,jdbcType=VARCHAR}, #{item.pid,jdbcType=VARCHAR}, #{item.rid,jdbcType=VARCHAR},
|
|
|
+ #{item.year,jdbcType=INTEGER}
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+
|
|
|
</mapper>
|