Antiloveg 8 years ago
parent
commit
34ba45cefa

+ 2 - 2
src/main/java/com/goafanti/common/mapper/AchievementDemandMapper.xml

@@ -78,7 +78,7 @@
     LEFT JOIN organization_identity oi on oi.uid = a.owner_id
 		where ad.demand_id = #{id,jdbcType=VARCHAR}
 		and a.deleted_sign = 0  
-		and a.audit_status = 4 
+		and a.audit_status = 3 
 		and a.release_status = 1
   </select>
   
@@ -94,7 +94,7 @@
   	LEFT JOIN organization_identity oi on oi.uid = d.employer_id
   	where ad.achievement_id = #{id,jdbcType=VARCHAR}
   	and d.deleted_sign = 0
-  	and d.audit_status = 4
+  	and d.audit_status = 3
   	and d.release_status = 1
   </select>
 </mapper>

+ 12 - 1
src/main/java/com/goafanti/common/mapper/AchievementInterestMapper.xml

@@ -97,10 +97,21 @@
 	</if>
   </select>
   
+  <select id="findAchievementInterestCount" parameterType="String" resultType="java.lang.Integer">
+  	select 
+  		count(1)
+  	from achievement_interest ai
+  	left join achievement a on a.id = ai.achievement_id
+  	where 1=1
+  	<if test="uid != null">
+  		ai.uid = #{uid,jdbcType=VARCHAR}
+  	</if> 
+  </select>
+  
   <select id="selectAchievementInterestByUidAndAchievementId" resultMap="BaseResultMap">
   	select  
   	<include refid="Base_Column_List" />
     from achievement_interest
-    where uid = {0} and achievement_id = #{1}
+    where uid = #{0} and achievement_id = #{1}
   </select>
 </mapper>

+ 1 - 1
src/main/java/com/goafanti/portal/controller/PortalSearchApiController.java

@@ -84,7 +84,7 @@ public class PortalSearchApiController extends BaseApiController {
 		Demand d = demandService.selectByPrimaryKey(id);
 		if (null == d || d.getDeletedSign().equals(DeleteStatus.DELETED.getCode())
 				|| !d.getAuditStatus().equals(DemandAuditStatus.AUDITED.getCode())
-				|| !d.getReleaseStatus().equals(DemandReleaseStatus.UNRELEASE.getCode())) {
+				|| !d.getReleaseStatus().equals(DemandReleaseStatus.RELEASED.getCode())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "需求ID"));
 			return res;
 		}