|
|
@@ -22,7 +22,7 @@ public interface GroupsMapper extends BaseMapper<GroupsTrips> {
|
|
|
@Select("select count(*) from groups_trips where sku_id = #{skuId} and num = available_num")
|
|
|
Integer selectEmptyNetfilxTrips(Long skuId);
|
|
|
|
|
|
- @Select("select gt.* from (select a.account,t.account_id,t.id as groups_id,t.sku_id,t.num from account a inner join groups_trips t on a.id = t.account_id where t.sku_id in (select id from goods_don_sku where goods_id = #{goodsId} and status is true) and t.num > 1 and a.api_secret = '' and a.created_time > '2023-05-11') gt" +
|
|
|
+ @Select("select gt.* from (select a.account,t.account_id,t.id as groups_id,t.sku_id,t.num from account a inner join groups_trips t on a.id = t.account_id where t.sku_id in (select id from goods_don_sku where goods_id = #{goodsId} and status is true) and t.num > 1 and a.api_secret = '') gt" +
|
|
|
" where gt.num = (select count(*) from groups_relation gr where gr.groups_id = gt.groups_id and gr.`status` = 'validity')" +
|
|
|
" and not EXISTS (select account_id from account_double_verify_record where account_id = gt.account_id and deleted is true)" +
|
|
|
" and DATE_SUB(now(),INTERVAL 3 day) >= (select max(update_time) from groups_relation gr where gr.groups_id = gt.groups_id and gr.`status` = 'validity')")
|