|
|
@@ -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>
|