allen 3 jaren geleden
bovenliggende
commit
20a52e929d
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 2 2
      app/admin/controller/Award.php
  2. 1 1
      app/index/controller/Index.php

+ 2 - 2
app/admin/controller/Award.php

@@ -40,7 +40,7 @@ class Award extends Controller
     left join awards_user_info as u on l.uid = u.uid 
     left join awards_order as o on o.uid = l.uid 
     left join awards_gift as g on o.gift_id = g.id
-where u.portrait != '' and u.portrait is not null  and l.duration > 15 group by l.uid order by l.number desc, l.duration asc limit 50");
+where u.portrait != '' and u.portrait is not null  and l.duration > 15 group by l.uid order by l.number desc, l.duration asc, l.id asc limit 50");
         $this->assign('lists', $lists);
         $this->fetch();
     }
@@ -59,7 +59,7 @@ where u.portrait != '' and u.portrait is not null  and l.duration > 15 group by
     left join awards_user_info as u on l.uid = u.uid 
     left join awards_order as o on o.uid = l.uid 
     left join awards_gift as g on o.gift_id = g.id
-where u.portrait != '' and u.portrait is not null and l.duration > 15 group by l.uid order by l.number desc, l.duration asc limit 50");
+where u.portrait != '' and u.portrait is not null and l.duration > 15 group by l.uid order by l.number desc, l.duration asc, l.id asc limit 50");
 
         //实例化
         $objExcel = new \PHPExcel();

+ 1 - 1
app/index/controller/Index.php

@@ -448,7 +448,7 @@ class Index extends Controller
     {
 
         $ranking = Db::query("select u.nickname, u.portrait, l.uid, l.duration, l.number from awards_user_task_log as l left join awards_user_info as u on l.uid = u.uid
-where u.portrait != '' and u.portrait is not null and l.duration > 15 group by l.uid order by l.number desc, l.duration asc limit 50");
+where u.portrait != '' and u.portrait is not null and l.duration > 15 group by l.uid order by l.number desc, l.duration asc, l.id asc limit 50");
 
         $userInfo = Db::table('awards_user_task_log')->alias('l')
             ->leftJoin('awards_user_info u', 'l.uid = u.uid')