WIN-2308041133\Administrator 5 months ago
parent
commit
eb7887e556
1 changed files with 7 additions and 1 deletions
  1. 7 1
      app/common/dao/user/AwardIntegralPriceDao.php

+ 7 - 1
app/common/dao/user/AwardIntegralPriceDao.php

@@ -39,7 +39,13 @@ class AwardIntegralPriceDao extends BaseDao
 
     public function search($where)
     {
-        return $this->getModel()::getDB()->where($where);
+//        return $this->getModel()::getDB()->where($where);
+        $query = $this->getModel()::getDB()
+            ->when(isset($where['day']) && $where['day'] !== '',function($query) use($where){
+                $query->where('day',$where['day']);
+            });
+        $query->order('create_time DESC');
+        return $query;
     }
 
 }