zoujiajian 2 лет назад
Родитель
Сommit
f3a06f3c07
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      netflix-dao/src/main/resources/mapper/GroupRelationMapper.xml

+ 2 - 2
netflix-dao/src/main/resources/mapper/GroupRelationMapper.xml

@@ -250,7 +250,7 @@
     </select>
 
     <select id="selectSpecialGroupsRelationAvailable" resultType="java.lang.Integer">
-        select a1+(#{extractNum}-t1) from
+        select sum(a1+(#{extractNum}-t1)) from
                                          (select gt.id,
         (select count(*)
         from groups_relation gr2
@@ -267,6 +267,6 @@
         inner join `groups_trips` gt on gt.account_id = a.id
         and gt.`status` = 'validity'
         and gt.sku_id = #{skuId}
-        and a.expiry_time >= #{tenExpiry}) s where t1 != 5 and a1 = 0
+        and a.expiry_time >= #{tenExpiry}) s where (t1=5 and a1=0) = 0
     </select>
 </mapper>