anderx 1 год назад
Родитель
Сommit
18059da359
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      src/main/java/com/goafanti/common/mapper/RestrictProjectMapper.xml

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

@@ -208,10 +208,10 @@
         </if>
         </if>
     </select>
     </select>
     <select id="selectPrivateByAid" resultType="java.lang.Integer">
     <select id="selectPrivateByAid" resultType="java.lang.Integer">
-            select count(*)
-            from restrict_project
-            where type=1
-              and aid = #{aid,jdbcType=VARCHAR}
+        select sum(if(a.aid=b.aid ,0,1))counts
+        from restrict_project a left join user b on a.uid =b.id
+        where a.type=1
+          and a.aid = #{aid,jdbcType=VARCHAR}
     </select>
     </select>