lizhen_gitee 1 سال پیش
والد
کامیت
9dffd9aa2d
1فایلهای تغییر یافته به همراه17 افزوده شده و 1 حذف شده
  1. 17 1
      application/api/controller/Eggnew.php

+ 17 - 1
application/api/controller/Eggnew.php

@@ -292,10 +292,26 @@ class Eggnew extends Api
         $this->success("获取成功!",$list);
     }
 
+    //手气榜单
+    public function getRankList(){
+        $today = strtotime(date("Y-m-d"));
+        $where = [];
+        $where["a.createtime"] = ["gt",$today];
+
+        $ranklist = \app\common\model\EggDo::alias("a")->field("a.user_id,a.image,a.price as money,a.createtime,u.nickname")
+            ->join("hx_user u","u.id = a.user_id","inner")
+            ->where($where)
+//            ->group("a.user_id")
+            ->order("money","desc")
+            ->limit(20)
+            ->select();
+        $this->success("获取成功!",$ranklist);
+    }
+
     /**
      * 获取排行榜
      */
-    public function getRankList() {
+    public function getRankList_old() {
         $time = $this->request->request("time"); // 1=今天,2=昨天
         if(!in_array($time,[1,2])) {
             $this->error("参数缺失!");