Browse Source

Merge branch 'master' of https://git.coding.net/aft/AFT.git

Administrator 8 years ago
parent
commit
f4b680cc08

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

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

@@ -23,14 +23,14 @@
   </select>
   <select id="countMyTech" parameterType="String" resultType="org.springframework.ui.ModelMap">
   	select 
-	(select count(1) from achievement a left join achievement_demand ad on a.id=ad.achievement_id where a.owner_id=#{uid,jdbcType=VARCHAR}) as `match`,
-	(select count(1) from achievement a left join achievement_order ao on a.id=ao.achievement_id where a.owner_id=#{uid,jdbcType=VARCHAR} and ao.status>5 and (ao.service_money>0 or ao.commission>0 or ao.intention_money>0)) as `deal`,
-	(select count(1) from achievement a left join achievement_interest ai on a.id=ai.achievement_id where a.owner_id=#{uid,jdbcType=VARCHAR}) as `intention`
+	(select count(1) from achievement a left join achievement_demand ad on a.id=ad.achievement_id where ad.demand_id is not null and a.owner_id=#{uid,jdbcType=VARCHAR}) as `match`,
+	(select count(1) from achievement a left join achievement_order ao on a.id=ao.achievement_id where a.owner_id=#{uid,jdbcType=VARCHAR} and ao.status  <![CDATA[ > ]]>  5 and (ao.service_money  <![CDATA[ > ]]> 0 or ao.commission <![CDATA[ > ]]> 0 or ao.intention_money <![CDATA[ > ]]> 0)) as `deal`,
+	(select count(1) from achievement a left join achievement_order iao on a.id=iao.achievement_id where a.owner_id=#{uid,jdbcType=VARCHAR} and iao.status  <![CDATA[ < ]]> 6) as `intention`
   </select>
   <select id="countMyDemand" parameterType="String" resultType="org.springframework.ui.ModelMap">
 	select 
-	(select count(1) from demand d left join achievement_demand ad on d.id=ad.demand_id where d.employer_id=#{uid,jdbcType=VARCHAR}) as `match`,
-	(select count(1) from demand d left join demand_order `do` on d.id=`do`.demand_id where d.employer_id=#{uid,jdbcType=VARCHAR} and `do`.status>5 and (`do`.service_money>0 or `do`.commission>0 or `do`.intention_money>0)) as `deal`,
-	(select count(1) from demand d left join demand_interest di on d.id=di.demand_id where d.employer_id=#{uid,jdbcType=VARCHAR}) as `intention`
+	(select count(1) from demand d left join achievement_demand ad on d.id=ad.demand_id where ad.demand_id is not null and d.employer_id=#{uid,jdbcType=VARCHAR}) as `match`,
+	(select count(1) from demand d left join demand_order `do` on d.id=`do`.demand_id where d.employer_id=#{uid,jdbcType=VARCHAR} and `do`.status <![CDATA[ > ]]> 5 and (`do`.service_money <![CDATA[ > ]]> 0 or `do`.commission <![CDATA[ > ]]> 0 or `do`.intention_money <![CDATA[ > ]]> 0)) as `deal`,
+	(select count(1) from demand d left join demand_order `ido` on d.id=`ido`.demand_id where d.employer_id=#{uid,jdbcType=VARCHAR} and `ido`.status <![CDATA[ < ]]> 6) as `intention`
   </select>
 </mapper>

File diff suppressed because it is too large
+ 8 - 8
src/main/webapp/WEB-INF/views/common.html