wupengfei 2 年之前
父节点
当前提交
4c048e7428

+ 8 - 35
.idea/workspace.xml

@@ -3,40 +3,13 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/mall/controller/Banner.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/mall/controller/Banner.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/mall/controller/GoodsCate.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/mall/controller/GoodsCate.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/mall/controller/StoreGoods.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/mall/controller/StoreGoods.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/ArticleCate.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/ArticleCate.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/ArticleItem.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/ArticleItem.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/ArticleSeriesCate.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/ArticleSeriesCate.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/DatumCate.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/DatumCate.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/DatumUrl.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/DatumUrl.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/NewsCate.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/NewsCate.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/NewsManage.php" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/NewsMaterial.php" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/OneArticle.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/OneArticle.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/OneDatum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/OneDatum.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/SeriesArticle.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/SeriesArticle.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/SeriesCate.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/SeriesCate.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/SeriesDatum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/SeriesDatum.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/UserArticle.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/UserArticle.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/UserDatum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/UserDatum.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/UserVideo.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/UserVideo.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/VideoCate.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/VideoCate.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/VideoManage.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/VideoManage.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/nutrition/controller/VideoUrl.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/nutrition/controller/VideoUrl.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/Activity.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/Activity.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/Contact.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/Contact.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/Cover.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/Cover.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/Demand.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/Demand.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/Forum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/Forum.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/PlatformDemand.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/PlatformDemand.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/Press.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/Press.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/Recruit.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/Recruit.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/RecruitCate.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/RecruitCate.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/Supplier.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/Supplier.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/SupplierCate.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/SupplierCate.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/operate/controller/SupplierGoods.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/operate/controller/SupplierGoods.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Activity.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Activity.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Forum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Forum.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Press.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Press.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Qc.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Qc.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Supplier.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Supplier.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Video.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Video.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/common/model/DatumIntro.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common/model/DatumIntro.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -231,7 +204,7 @@
       <workItem from="1669952538953" duration="9708000" />
       <workItem from="1670201125142" duration="9015000" />
       <workItem from="1670287594399" duration="11535000" />
-      <workItem from="1670461023846" duration="2499000" />
+      <workItem from="1670461023846" duration="3902000" />
     </task>
     <servers />
   </component>

+ 1 - 1
application/api/controller/Activity.php

@@ -113,7 +113,7 @@ class Activity extends Base
         $sort_type = input('get.sort_type',1);
         switch ($sort_type) {
             case 1:
-                $order =  ['sort'=>'desc','id'=>'asc'];
+                $order =  ['read_num'=>'desc','id'=>'asc'];
                 break;
             case 2:
                 $order =  ['id'=>'asc','sort'=>'desc'];

+ 2 - 2
application/api/controller/Forum.php

@@ -67,7 +67,7 @@ class Forum extends Base
         $app_logo = sysconf('app_logo');
         switch ($sort_type) {
             case 1:
-                $order =  ['sort'=>'desc','id'=>'asc'];
+                $order =  ['sort'=>'desc','read_num'=>'desc','id'=>'asc'];
                 break;
             case 2:
                 $order =  ['id'=>'asc','sort'=>'desc'];
@@ -109,7 +109,7 @@ class Forum extends Base
             if(!empty($search_arr)) $where_str  =  implode(' OR ',$search_arr);
             $field = ' a.id,a.title,a.content,a.label,a.level,a.browse_num,a.sort,a.create_at,IFNULL(is_recommend,0) is_recommend, u.name,u.headimg';
             $table = 'dd_user_forum';
-            $order_by_two = 'id';
+            $order_by_two = 'read_num';
             $sql = "SELECT $field FROM " .$table . " a LEFT JOIN ( SELECT id,IF(id,1,1) is_recommend FROM $table b WHERE ( $where_str )) AS c ON c.id = a.id LEFT JOIN dd_store_member as u ON a.user_id =u.id   WHERE a.is_deleted = 0 AND a.status =1 AND a.level <= $max_level ORDER BY is_recommend DESC , $order_by_two desc LIMIT {$this->off_set},{$this->page_num}";
             $list = Db::query($sql);
             array_walk($list,function (&$v,$k) use ($app_name,$app_logo){

+ 1 - 1
application/api/controller/Press.php

@@ -80,7 +80,7 @@ class Press extends Base
         $sort_type = input('get.sort_type',1);
         switch ($sort_type) {
             case 1:
-                $order =   ['sort'=>'desc','id'=>'asc'];
+                $order =   ['sort'=>'desc','read_num'=>'desc','id'=>'asc'];
                 break;
             case 2:
                 $order =   ['id'=>'asc','sort'=>'desc'];

+ 1 - 3
application/api/controller/Qc.php

@@ -14,9 +14,7 @@ class Qc extends Base {
 
     public function index()
     {
-        $order_info = \app\common\model\LevelOrder::where('id',281)->find()->toArray();
-        $res =  OrderCallback::levelOrderCallBack($order_info,1);
-        var_dump($res);
+
     }
 
 

+ 5 - 4
application/api/controller/Supplier.php

@@ -117,7 +117,7 @@ class Supplier extends Base
      * @return name:build_time type:string default:-- desc:成立时间
      * @return name:work_place type:string default:-- desc:办公地点
      * @return name:business type:string default:-- desc:业务范围
-     *
+     * @return name:total_num type:int default:-- desc:总评论数(仅一级)
      */
     public function getSupplierList(){
         $title = input('get.title');
@@ -150,7 +150,8 @@ class Supplier extends Base
             $v['label_name'] =$v['label'] ?  explode(',',trim($v['label'],',')):null;
             $v['business_arr'] = $v['business'] ? explode(',',trim($v['business'],',')) : null;
         }
-        $this->success('ok',['list'=>$list]);
+        $total_num  =\app\common\model\Supplier::where($sel_where)->count();
+        $this->success('ok',['list'=>$list,'total_num'=>$total_num]);
     }
 
     /**
@@ -266,7 +267,7 @@ class Supplier extends Base
         $sort_type = input('get.sort_type',1);
         switch ($sort_type) {
             case 1:
-                $order =  ['sort'=>'desc','id'=>'asc'];
+                $order =  ['sort'=>'desc','read_num'=>'desc','id'=>'asc'];
                 break;
             case 2:
                 $order =  ['id'=>'asc','sort'=>'desc'];
@@ -386,7 +387,7 @@ class Supplier extends Base
         $sort_type = input('get.sort_type',1);
         switch ($sort_type) {
             case 1:
-                $order =  ['g.sort'=>'desc','g.id'=>'asc'];
+                $order =  ['g.sort'=>'desc','read_num'=>'desc','g.id'=>'asc'];
                 break;
             case 2:
                 $order =  ['g.id'=>'asc','g.sort'=>'desc'];

+ 1 - 1
application/api/controller/Video.php

@@ -140,7 +140,7 @@ class Video extends Base
         if(!empty($search_arr)) $where_str  =  implode(' OR ',$search_arr);
         $field = ' a.id,a.title,a.cover,a.user_id,a.is_vip,a.create_at,a.ali_vid,a.video_id,a.duration ,IFNULL(is_recommend,0) is_recommend ';
         $table = 'dd_video_url';
-        $order_by_two = 'id';
+        $order_by_two = 'read_num';
         $sql = "SELECT $field FROM " .$table . " a LEFT JOIN ( SELECT id,IF(id,1,1) is_recommend FROM $table b WHERE ( $where_str )) AS c ON c.id = a.id Left JOIN dd_video_intro as k ON a.video_id  = k.id  WHERE a.is_deleted = 0 AND a.status =1 AND k.is_deleted = 0 AND k.status = 1 ORDER BY is_recommend DESC , $order_by_two desc LIMIT {$this->off_set},{$this->page_num}";
         $list = Db::query($sql);
         array_walk($list,function (&$v,$k)use ($app_name,$app_logo){

+ 1 - 1
application/common/model/DatumIntro.php

@@ -6,7 +6,7 @@ class DatumIntro extends Model
 {
     public function urlArr()
     {
-        return $this->hasMany('DatumUrl','datum_id')->field('id,datum_id,title,url,sort,is_vip,transmit_num,down_num,read_num')->where('is_deleted',0)->where('status',1)->order('sort desc');
+        return $this->hasMany('DatumUrl','datum_id')->field('id,datum_id,title,url,sort,is_vip,transmit_num,down_num,read_num')->where('is_deleted',0)->where('status',1)->order('sort desc,id asc');
     }
 
 }