Prechádzať zdrojové kódy

3/14 更改架构中文路径公用组件排序代码

chenyu 2 rokov pred
rodič
commit
cf69484c58

+ 2 - 2
PAS/src/main/java/cn/cslg/pas/mapper/PermissionRecordMapper.java

@@ -17,13 +17,13 @@ public interface PermissionRecordMapper {
     /**
      * 插入数据
      *
-     * @param  permissionRecord 许可记录数据对象
+     * @param permissionRecord 许可记录数据对象
      * @return 返回受影响的行数
      */
     int add(PermissionRecord permissionRecord);
 
     /**
-     *  根据id修改数据
+     * 根据id修改数据
      *
      * @param permissionRecord 许可记录数据对象
      * @return 返回受影响的行数

+ 3 - 3
PAS/src/main/java/cn/cslg/pas/mapper/StructureMapper.java

@@ -102,11 +102,11 @@ public interface StructureMapper extends BaseMapper<Structure> {
     List<StructureVO> selectAllByProductId(Integer productId);
 
     /**
-     * 根据产品名称模糊查询数据
+     * 根据架构名称模糊查询数据
      *
-     * @param structureName
+     * @param structureName 架构名称
      * @return 返回查询到的数据
      */
-    //List<Structure> getStandardByStructureName(String structureName);
+    List<Structure> getStandardByStructureName(String structureName);
 
 }

+ 60 - 53
PAS/src/main/resources/mapper/PermissionRecordMapper.xml

@@ -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>