Antiloveg лет назад: 8
Родитель
Сommit
8858a967d1

+ 6 - 0
schema/2017-06-20.sql

@@ -0,0 +1,6 @@
+alter TABLE `achievement` 
+  modify column `maturity_picture_url` longtext  NULL
+  COMMENT '成熟度资料--图片URL';
+  
+alter table `demand`
+modify column `picture_url` longtext null comment '需求文件--图片URL';

+ 1 - 1
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -144,7 +144,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 
 	@Override
 	public int deleteByPrimaryKey(List<String> id) {
-		achievementKeywordMapper.batchDeleteByDemandIds(id);
+		achievementKeywordMapper.batchDeleteByAchievementIds(id);
 		achievementDemandMapper.batchDeleteByAchievementIds(id);
 		return achievementMapper.batchDeleteByPrimaryKey(id);
 	}

+ 2 - 2
src/main/java/com/goafanti/common/dao/AchievementKeywordMapper.java

@@ -20,11 +20,11 @@ public interface AchievementKeywordMapper {
 
 	void insertBatch(List<AchievementKeyword> list);
 
-	int batchDeleteByDemandIds(List<String> id);
-
 	List<AchievementDemand> selectAchievementDemand(List<String> keywords);
 
 	List<AchievementKeyword> selectKeywordsByAchievementId(String id);
 
 	void batchDeleteByAchievementId(String achievementiId);
+
+	int batchDeleteByAchievementIds(List<String> id);
 }

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

@@ -857,10 +857,10 @@
 		and  status = #{status,jdbcType=INTEGER}
 	</if>
 	<if test="rStart != null">
-       and	release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
+       and	release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rEnd != null">
-	   and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	   and release_date <![CDATA[ <= ]]> #{rEnd,jdbcType=TIMESTAMP}
 	</if>
 	<if test="releaseStatus != null">
 	   and  release_status = #{releaseStatus,jdbcType=INTEGER}
@@ -898,10 +898,10 @@
 		and  status = #{status,jdbcType=INTEGER}
 	</if>
 	<if test="rStart != null">
-       and	release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
+       and	release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rEnd != null">
-	   and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	   and release_date <![CDATA[ <= ]]> #{rEnd,jdbcType=TIMESTAMP}
 	</if>
 	<if test="releaseStatus != null">
 	   and  release_status = #{releaseStatus,jdbcType=INTEGER}

+ 18 - 14
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -14,7 +14,7 @@
     <result column="demand_type" property="demandType" jdbcType="INTEGER" />
     <result column="problem_des" property="problemDes" jdbcType="VARCHAR" />
     <result column="technical_requirements" property="technicalRequirements" jdbcType="VARCHAR" />
-    <result column="picture_url" property="pictureUrl" jdbcType="VARCHAR" />
+    <result column="picture_url" property="pictureUrl" jdbcType="LONGVARCHAR" />
     <result column="text_file_url" property="textFileUrl" jdbcType="VARCHAR" />
     <result column="video_url" property="videoUrl" jdbcType="VARCHAR" />
     <result column="fixed_budget" property="fixedBudget" jdbcType="DECIMAL" />
@@ -76,7 +76,7 @@
       #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{infoSources,jdbcType=INTEGER}, 
       #{industryCategoryA,jdbcType=INTEGER}, #{industryCategoryB,jdbcType=INTEGER}, #{industryCategoryC,jdbcType=INTEGER}, 
       #{demandType,jdbcType=INTEGER}, #{problemDes,jdbcType=VARCHAR}, #{technicalRequirements,jdbcType=VARCHAR}, 
-      #{pictureUrl,jdbcType=VARCHAR}, #{textFileUrl,jdbcType=VARCHAR}, #{videoUrl,jdbcType=VARCHAR}, 
+      #{pictureUrl,jdbcType=LONGVARCHAR}, #{textFileUrl,jdbcType=VARCHAR}, #{videoUrl,jdbcType=VARCHAR}, 
       #{fixedBudget,jdbcType=DECIMAL}, #{fixedCycle,jdbcType=VARCHAR}, #{peopleNumber,jdbcType=INTEGER}, 
       #{fixedScheme,jdbcType=VARCHAR}, #{costEscrow,jdbcType=DECIMAL}, #{budgetCost,jdbcType=DECIMAL}, 
       #{validityPeriod,jdbcType=TIMESTAMP}, #{employerId,jdbcType=VARCHAR}, #{employerName,jdbcType=VARCHAR}, 
@@ -239,7 +239,7 @@
         #{technicalRequirements,jdbcType=VARCHAR},
       </if>
       <if test="pictureUrl != null" >
-        #{pictureUrl,jdbcType=VARCHAR},
+        #{pictureUrl,jdbcType=LONGVARCHAR},
       </if>
       <if test="textFileUrl != null" >
         #{textFileUrl,jdbcType=VARCHAR},
@@ -352,7 +352,7 @@
         technical_requirements = #{technicalRequirements,jdbcType=VARCHAR},
       </if>
       <if test="pictureUrl != null" >
-        picture_url = #{pictureUrl,jdbcType=VARCHAR},
+        picture_url = #{pictureUrl,jdbcType=LONGVARCHAR},
       </if>
       <if test="textFileUrl != null" >
         text_file_url = #{textFileUrl,jdbcType=VARCHAR},
@@ -442,7 +442,7 @@
       demand_type = #{demandType,jdbcType=INTEGER},
       problem_des = #{problemDes,jdbcType=VARCHAR},
       technical_requirements = #{technicalRequirements,jdbcType=VARCHAR},
-      picture_url = #{pictureUrl,jdbcType=VARCHAR},
+      picture_url = #{pictureUrl,jdbcType=LONGVARCHAR},
       text_file_url = #{textFileUrl,jdbcType=VARCHAR},
       video_url = #{videoUrl,jdbcType=VARCHAR},
       fixed_budget = #{fixedBudget,jdbcType=DECIMAL},
@@ -824,16 +824,16 @@
 		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
 	</if>
 	<if test="vStart != null">
-	   and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="vEnd != null">
-	   and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	   and d.validity_period <![CDATA[ <= ]]> #{vEnd,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rStart != null">
-       and	d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rEnd != null">
-	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	   and d.release_date <![CDATA[ <= ]]> #{rEnd,jdbcType=TIMESTAMP}
 	</if>
   	order by d.serial_number desc
   	<if test="page_sql!=null">
@@ -844,10 +844,14 @@
   <select id="findDemandCount" parameterType="String" resultType="java.lang.Integer">
   		select count(1)
 	from  demand d 
-	where d.deleted_sign = 0 and d.data_category = 1 
+	where d.deleted_sign = 0 
+	and d.employer_id = #{employerId, jdbcType=VARCHAR}
 	<if test="serialNumber != null">
 		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
 	</if>
+	<if test="auditStatus != null">
+		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
 	<if test="name != null">
 		and  d.name = #{name,jdbcType=VARCHAR}
 	</if>
@@ -864,16 +868,16 @@
 		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
 	</if>
 	<if test="vStart != null">
-	   and d.validity_veriod <![CDATA[ > ]]> #{vStart,jdbcType=TIMESTAMP}
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="vEnd != null">
-	   and d.validity_veriod <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	   and d.validity_period <![CDATA[ <= ]]> #{vEnd,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rStart != null">
-       and	d.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
 	</if>
 	<if test="rEnd != null">
-	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	   and  d.release_date <![CDATA[ <= ]]> #{rEnd,jdbcType=TIMESTAMP}
 	</if>
   </select>