zoujiajian 2 years ago
parent
commit
21657e3f9a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      netflix-dao/src/main/resources/mapper/GroupsMapper.xml

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

@@ -86,14 +86,14 @@
         and gt.status = #{status}
         and gt.available_num > 0
         <if test="ip != null">
-            and not exists (select 1 from (select id, user_id from groups_relation gnr where gnr.groups_id = groups_id
+            and not exists (select 1 from (select id, user_id from groups_relation gnr where gnr.groups_id = gt.id
             and gnr.user_id != 0) gr inner join
             order_don o on o.user_id = gr.user_id and o.relation_id = gr.id
             inner join order_don_location_relate ocr on ocr.order_id = o.id where ocr.ip = #{ip} limit 1)
         </if>
         and (available_parking_num = 0 or available_parking_num > (select count(*)
         from groups_relation gr
-        where gr.groups_id = groups_trips.id
+        where gr.groups_id = gt.id
         and gr.user_id != 0 and gr.num &lt;= #{maxNum}))
         order by available_num asc
         limit 1