Antiloveg 8 years ago
parent
commit
23db1ee7cc
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

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

@@ -378,12 +378,12 @@
 		LEFT JOIN organization_identity i on i.uid = p.uid
 		LEFT JOIN admin a on p.consultant = a.id 
 		LEFT JOIN admin ad on p.founder = ad.id 
-   	    LEFT JOIN tech_website w on p.department = w.id and w.deleted_sign = 0
-   	    LEFT JOIN contract c on c.id = p.contract_id
+   	LEFT JOIN tech_website w on p.department = w.id 
+    LEFT JOIN contract c on c.id = p.contract_id
     <if test="principal != null">
 		left join contract_log l on p.contract_id=l.cid
 	</if>
-	where p.deleted_sign = 0 
+	where p.deleted_sign = 0 and (w.deleted_sign is  null or w.deleted_sign = 0) 
 	<if test="principal != null">
 		and l.principal = #{principal,jdbcType=VARCHAR}
 	</if>
@@ -412,10 +412,11 @@
  	select count(1)  
 	 	FROM  tech_project p
 		LEFT JOIN organization_identity i on i.uid = p.uid
+		LEFT JOIN tech_website w on p.department = w.id 
      <if test="principal != null">
 		left join contract_log l on p.contract_id=l.cid
 	</if>
-	where p.deleted_sign = 0 
+	where p.deleted_sign = 0 and (w.deleted_sign is  null or w.deleted_sign = 0) 
 	<if test="principal != null">
 		and l.principal = #{principal,jdbcType=VARCHAR}
 	</if>