|
@@ -2,53 +2,53 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
|
|
<mapper namespace="cn.cslg.pas.mapper.PermissionRecordMapper">
|
|
|
-<!--插入数据-->
|
|
|
-<!--int add(PermissionRecord permissionRecord);-->
|
|
|
-<insert id="add" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into permission_record(id, patent_no, licensor, licensee, licensee_country, license_time,
|
|
|
- license_fee, license_dead_line, license_type, create_person_id,
|
|
|
- create_person_name, create_time, modified_time)
|
|
|
- values (#{id}, #{patentNo}, #{licensor}, #{licensee}, #{licenseeCountry},
|
|
|
- #{licenseTime}, #{licenseFee}, #{licenseDeadLine}, #{licenseType}, #{createPersonId},
|
|
|
- #{createPersonName}, #{createTime}, #{modifiedTime})
|
|
|
-</insert>
|
|
|
+ <!--插入数据-->
|
|
|
+ <!--int add(PermissionRecord permissionRecord);-->
|
|
|
+ <insert id="add" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into permission_record(id, patent_no, licensor, licensee, licensee_country, license_time,
|
|
|
+ license_fee, license_dead_line, license_type, create_person_id,
|
|
|
+ create_person_name, create_time, modified_time)
|
|
|
+ values (#{id}, #{patentNo}, #{licensor}, #{licensee}, #{licenseeCountry},
|
|
|
+ #{licenseTime}, #{licenseFee}, #{licenseDeadLine}, #{licenseType}, #{createPersonId},
|
|
|
+ #{createPersonName}, #{createTime}, #{modifiedTime})
|
|
|
+ </insert>
|
|
|
|
|
|
<!--根据id修改数据-->
|
|
|
-<!--int update(PermissionRecordDTO permissionRecordDTO);-->
|
|
|
-<update id="update">
|
|
|
- update permission_record
|
|
|
- <set>
|
|
|
- <if test="patentNo != null">
|
|
|
- patent_no = #{patentNo},
|
|
|
- </if>
|
|
|
- <if test="licensor != null">
|
|
|
- licensor = #{licensor},
|
|
|
- </if>
|
|
|
- <if test="licensee != null">
|
|
|
- licensee = #{licensee},
|
|
|
- </if>
|
|
|
- <if test="licenseeCountry != null">
|
|
|
- licensee_country = #{licenseeCountry},
|
|
|
- </if>
|
|
|
- <if test="licenseTime != null">
|
|
|
- license_time = #{licenseTime},
|
|
|
- </if>
|
|
|
- <if test="licenseFee != null">
|
|
|
- license_fee = #{licenseFee},
|
|
|
- </if>
|
|
|
- <if test="licenseDeadLine != null">
|
|
|
- license_dead_line = #{licenseDeadLine},
|
|
|
- </if>
|
|
|
- <if test="licenseType != null">
|
|
|
- license_type = #{licenseType},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where ID = #{id}
|
|
|
-</update>
|
|
|
+ <!--int update(PermissionRecordDTO permissionRecordDTO);-->
|
|
|
+ <update id="update">
|
|
|
+ update permission_record
|
|
|
+ <set>
|
|
|
+ <if test="patentNo != null">
|
|
|
+ patent_no = #{patentNo},
|
|
|
+ </if>
|
|
|
+ <if test="licensor != null">
|
|
|
+ licensor = #{licensor},
|
|
|
+ </if>
|
|
|
+ <if test="licensee != null">
|
|
|
+ licensee = #{licensee},
|
|
|
+ </if>
|
|
|
+ <if test="licenseeCountry != null">
|
|
|
+ licensee_country = #{licenseeCountry},
|
|
|
+ </if>
|
|
|
+ <if test="licenseTime != null">
|
|
|
+ license_time = #{licenseTime},
|
|
|
+ </if>
|
|
|
+ <if test="licenseFee != null">
|
|
|
+ license_fee = #{licenseFee},
|
|
|
+ </if>
|
|
|
+ <if test="licenseDeadLine != null">
|
|
|
+ license_dead_line = #{licenseDeadLine},
|
|
|
+ </if>
|
|
|
+ <if test="licenseType != null">
|
|
|
+ license_type = #{licenseType},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where ID = #{id}
|
|
|
+ </update>
|
|
|
|
|
|
|
|
|
-<!--根据patentNo专利号分页查询许可记录数据-->
|
|
|
-<!--;-->
|
|
|
+ <!--根据patentNo专利号分页查询许可记录数据-->
|
|
|
+ <!--;-->
|
|
|
<resultMap id="permissionRecordMap" type="cn.cslg.pas.domain.PermissionRecord">
|
|
|
<id column="id" property="id"/>
|
|
|
<result column="patent_no" property="patentNo"/>
|
|
@@ -78,10 +78,17 @@
|
|
|
<result column="license_type" property="licenseType"/>
|
|
|
</resultMap>
|
|
|
<select id="queryAllInfo" resultMap="permissionRecordVOMap">
|
|
|
- select id, patent_no, licensor, licensee, licensee_country, license_time,
|
|
|
- license_fee, license_dead_line, license_type
|
|
|
+ select id,
|
|
|
+ patent_no,
|
|
|
+ licensor,
|
|
|
+ licensee,
|
|
|
+ licensee_country,
|
|
|
+ license_time,
|
|
|
+ license_fee,
|
|
|
+ license_dead_line,
|
|
|
+ license_type
|
|
|
from permission_record
|
|
|
- where patent_no= #{patentNo}
|
|
|
+ where patent_no = #{patentNo}
|
|
|
</select>
|
|
|
|
|
|
<!--根据许可id统计数量-->
|
|
@@ -92,12 +99,12 @@
|
|
|
</select>
|
|
|
|
|
|
|
|
|
-<!--根据许可id删除数据-->
|
|
|
-<!--int delete(Integer id);-->
|
|
|
-<delete id="delete">
|
|
|
- delete
|
|
|
- from permission_record
|
|
|
- where id = #{id}
|
|
|
-</delete>
|
|
|
+ <!--根据许可id删除数据-->
|
|
|
+ <!--int delete(Integer id);-->
|
|
|
+ <delete id="delete">
|
|
|
+ delete
|
|
|
+ from permission_record
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
|
|
|
</mapper>
|