albertshaw 8 éve%!(EXTRA string=óta)
szülő
commit
3b1e7036de

+ 2 - 0
schema/20170911-achievement-intro-length.sql

@@ -0,0 +1,2 @@
+ALTER TABLE `achievement` 
+CHANGE COLUMN `introduction` `introduction` LONGTEXT NULL DEFAULT NULL COMMENT '成果简介' ;

+ 0 - 6
src/main/java/com/goafanti/admin/controller/AdminAchievementApiController.java

@@ -609,12 +609,6 @@ public class AdminAchievementApiController extends CertifyApiController {
 				return res;
 			}
 
-			if (bo.getIntroduction().length() > 298) {
-				res.getError().add(buildError(ErrorConstants.PARAM_SIZE_ERROR, "",
-						AchievementImportFields.INTRODUCTION.getDesc()));
-				return res;
-			}
-
 			if (bo.getKeyword().length() > 44) {
 				res.getError().add(
 						buildError(ErrorConstants.PARAM_SIZE_ERROR, "", AchievementImportFields.KEYWORD.getDesc()));

+ 6 - 6
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -9,7 +9,7 @@
     <result column="keyword" jdbcType="VARCHAR" property="keyword" />
     <result column="category" jdbcType="INTEGER" property="category" />
     <result column="summary" jdbcType="VARCHAR" property="summary" />
-    <result column="introduction" jdbcType="VARCHAR" property="introduction" />
+    <result column="introduction" jdbcType="LONGVARCHAR" property="introduction" />
     <result column="technical_picture_url" jdbcType="VARCHAR" property="technicalPictureUrl" />
     <result column="field_a" jdbcType="INTEGER" property="fieldA" />
     <result column="field_b" jdbcType="INTEGER" property="fieldB" />
@@ -100,7 +100,7 @@
       country_name_zh,international_flag,jmrh_flag)
     values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER}, 
       #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{category,jdbcType=INTEGER}, 
-      #{summary,jdbcType=VARCHAR}, #{introduction,jdbcType=VARCHAR}, #{technicalPictureUrl,jdbcType=VARCHAR}, 
+      #{summary,jdbcType=VARCHAR}, #{introduction,jdbcType=LONGVARCHAR}, #{technicalPictureUrl,jdbcType=VARCHAR}, 
       #{fieldA,jdbcType=INTEGER}, #{fieldB,jdbcType=INTEGER}, #{fieldC,jdbcType=INTEGER}, 
       #{maturity,jdbcType=INTEGER}, #{maturityPictureUrl,jdbcType=LONGVARCHAR}, #{maturityTextFileUrl,jdbcType=VARCHAR}, 
       #{maturityVideoUrl,jdbcType=VARCHAR}, #{innovation,jdbcType=INTEGER}, #{ownerId,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR},
@@ -309,7 +309,7 @@
         #{summary,jdbcType=VARCHAR},
       </if>
       <if test="introduction != null">
-        #{introduction,jdbcType=VARCHAR},
+        #{introduction,jdbcType=LONGVARCHAR},
       </if>
       <if test="technicalPictureUrl != null">
         #{technicalPictureUrl,jdbcType=VARCHAR},
@@ -476,7 +476,7 @@
         summary = #{summary,jdbcType=VARCHAR},
       </if>
       <if test="introduction != null">
-        introduction = #{introduction,jdbcType=VARCHAR},
+        introduction = #{introduction,jdbcType=LONGVARCHAR},
       </if>
       <if test="technicalPictureUrl != null">
         technical_picture_url = #{technicalPictureUrl,jdbcType=VARCHAR},
@@ -630,7 +630,7 @@
       keyword = #{keyword,jdbcType=VARCHAR},
       category = #{category,jdbcType=INTEGER},
       summary = #{summary,jdbcType=VARCHAR},
-      introduction = #{introduction,jdbcType=VARCHAR},
+      introduction = #{introduction,jdbcType=LONGVARCHAR},
       technical_picture_url = #{technicalPictureUrl,jdbcType=VARCHAR},
       field_a = #{fieldA,jdbcType=INTEGER},
       field_b = #{fieldB,jdbcType=INTEGER},
@@ -1054,7 +1054,7 @@
       	#{item.name,jdbcType=VARCHAR}, #{item.keyword,jdbcType=VARCHAR}, #{item.category,jdbcType=INTEGER},
       	#{item.ownerName,jdbcType=VARCHAR}, #{item.ownerType,jdbcType=VARCHAR}, #{item.ownerIdNumber,jdbcType=VARCHAR},
       	#{item.ownerMobile,jdbcType=VARCHAR}, #{item.ownerEmail,jdbcType=VARCHAR}, #{item.ownerPostalAddress,jdbcType=VARCHAR},
-      	#{item.cooperationMode,jdbcType=INTEGER}, #{item.introduction,jdbcType=VARCHAR}
+      	#{item.cooperationMode,jdbcType=INTEGER}, #{item.introduction,jdbcType=LONGVARCHAR}
       )
     </foreach>
   </insert>