Browse Source

pc端所有列表都倒叙

lizhen_gitee 7 months ago
parent
commit
598d954f3f

+ 1 - 1
application/company/controller/Caozuoguifan.php

@@ -22,7 +22,7 @@ class Caozuoguifan extends Apic
             $where['type_id'] = $type_id;
         }
 
-        $list = Db::name($this->table)->field('content',true)->where('company_id',$this->auth->company_id)->where($where)->paginate();
+        $list = Db::name($this->table)->field('content',true)->where('company_id',$this->auth->company_id)->where($where)->order('id desc')->paginate();
         $total = $list->total();
         $list = $list->items();
         $list = list_domain_image($list,['image','videofile']);

+ 1 - 1
application/company/controller/Caozuoguifantype.php

@@ -15,7 +15,7 @@ class Caozuoguifantype extends Apic
     protected $table = 'caozuoguifan_type';
    
     public function index(){
-        $list = Db::name($this->table)->where('company_id',$this->auth->company_id)->select();
+        $list = Db::name($this->table)->where('company_id',$this->auth->company_id)->order('id desc')->select();
 
         $this->success(1,$list);
     }

+ 1 - 1
application/company/controller/Dongtai.php

@@ -15,7 +15,7 @@ class Dongtai extends Apic
     protected $table = 'dongtai';
 
     public function index(){
-        $list = Db::name($this->table)->field('content',true)->where('company_id',$this->auth->company_id)->paginate();
+        $list = Db::name($this->table)->field('content',true)->where('company_id',$this->auth->company_id)->order('id desc')->paginate();
         $total = $list->total();
         $list = $list->items();
         $list = list_domain_image($list,['image']);

+ 1 - 0
application/company/controller/Jiance.php

@@ -38,6 +38,7 @@ class Jiance extends Apic
             ->where('jiance.company_id',$this->auth->company_id)
             ->where('jiance.deletetime',NULL)
             ->where($search)
+            ->order('jiance.id desc')
             ->paginate();
 
         $total = $list->total();

+ 1 - 1
application/company/controller/Jianceproject.php

@@ -18,7 +18,7 @@ class Jianceproject extends Apic
     public function index(){
         $lists = Db::name('jiance_project')->field('id,pid as parentId,title,createtime')
             ->where('company_id',$this->auth->company_id)
-            ->where('deletetime',NULL)->order('weigh asc')->select();
+            ->where('deletetime',NULL)->order('weigh asc,id asc')->select();
 
         $this->success(1,$lists);
     }

+ 1 - 1
application/company/controller/Jishuguifan.php

@@ -16,7 +16,7 @@ class Jishuguifan extends Apic
     protected $table = 'jishuguifan';
    
     public function index(){
-        $list = Db::name($this->table)->field('id,pid,name,createtime')->where('company_id',$this->auth->company_id)->select();
+        $list = Db::name($this->table)->field('id,pid,name,createtime')->where('company_id',$this->auth->company_id)->order('id asc')->select();
 
         /*$tree = Tree::instance()->init($list);
         $tree->icon = ['','',''];

+ 1 - 1
application/company/controller/Password.php

@@ -15,7 +15,7 @@ class Password extends Apic
     protected $table = 'password';
 
     public function index(){
-        $list = Db::name($this->table)->where('company_id',$this->auth->company_id)->paginate();
+        $list = Db::name($this->table)->where('company_id',$this->auth->company_id)->order('id desc')->paginate();
         $total = $list->total();
         $list = $list->items();
         $list = list_domain_image($list,['logo_image']);

+ 1 - 0
application/company/controller/Tiaoshiweixiu.php

@@ -26,6 +26,7 @@ class Tiaoshiweixiu extends Apic
             ->join('tiaoshiweixiu_logo logo','a.logo_id = logo.id','LEFT')
             ->where('a.company_id',$this->auth->company_id)
             ->where($search)
+            ->order('a.id desc')
             ->paginate();
         $total = $list->total();
         $list = $list->items();

+ 1 - 1
application/company/controller/Tiaoshiweixiulogo.php

@@ -15,7 +15,7 @@ class Tiaoshiweixiulogo extends Apic
     protected $table = 'tiaoshiweixiu_logo';
    
     public function index(){
-        $list = Db::name($this->table)->where('company_id',$this->auth->company_id)->select();
+        $list = Db::name($this->table)->where('company_id',$this->auth->company_id)->order('id desc')->select();
         $list = list_domain_image($list,['image']);
 
         $this->success(1,$list);

+ 1 - 0
application/company/controller/Usercompany.php

@@ -41,6 +41,7 @@ class Usercompany extends Apic
             ->where('a.company_id',$this->auth->company_id)
             ->where('a.deletetime',NULL)
             ->where($search)
+            ->order('a.id desc')
             ->paginate();
         $total = $list->total();
         $list = $list->items();

+ 1 - 0
application/company/controller/Wentihuizong.php

@@ -27,6 +27,7 @@ class Wentihuizong extends Apic
             ->field('hz.*,uc.projectname')
             ->where('hz.company_id',$this->auth->company_id)
             ->where($map)
+            ->order('hz.id desc')
             ->paginate();
         $total = $list->total();
         $list = $list->items();

+ 1 - 1
application/company/controller/Worker.php

@@ -16,7 +16,7 @@ class Worker extends Apic
     protected $table = 'worker';
 
     public function index(){
-        $list = Db::name($this->table)->where('company_id',$this->auth->company_id)->where('deletetime',NULL)->select();
+        $list = Db::name($this->table)->where('company_id',$this->auth->company_id)->where('deletetime',NULL)->order('id desc')->select();
         $list = list_domain_image($list,['avatar']);
 
         $this->success(1,$list);

+ 1 - 1
application/company/controller/Zhengce.php

@@ -15,7 +15,7 @@ class Zhengce extends Apic
     protected $table = 'zhengce';
 
     public function index(){
-        $list = Db::name($this->table)->field('content',true)->where('company_id',$this->auth->company_id)->paginate();
+        $list = Db::name($this->table)->field('content',true)->where('company_id',$this->auth->company_id)->order('id desc')->paginate();
         $total = $list->total();
         $list = $list->items();
         $list = list_domain_image($list,['image']);