Browse Source

培训完成的判断条件

lizhen_gitee 6 months ago
parent
commit
41c9ddf535

+ 4 - 4
application/api/controller/Index.php

@@ -78,7 +78,7 @@ class Index extends Api
         }
 
         $lists = Db::name('train_active')->field('id,name as title,logo_image,starttime,endtime,pingjia_time,pingjia_uid')
-            ->where('pingjia_uid',0)
+            ->where('pingjia_time',0)
             ->where('deletetime', NULL)
             ->where($where_auth)
             ->limit(2)
@@ -88,7 +88,7 @@ class Index extends Api
         foreach($lists as $key => &$val){
             $val['logo_image'] = localpath_to_netpath($val['logo_image']);
 
-            if($val['pingjia_uid'] != 0){
+            if($val['pingjia_time'] != 0){
                 $val['show_status'] = 3;
                 $val['show_status_text'] = '已结束';
             }elseif($now < $val['starttime']){
@@ -137,7 +137,7 @@ class Index extends Api
         $where = [];
 
         if($type == 3){
-            $where['pingjia_uid'] = ['NEQ',0];
+            $where['pingjia_time'] = ['NEQ',0];
         }elseif($type == 1){
             $where['starttime'] = ['gt',$now];
         }else{
@@ -162,7 +162,7 @@ class Index extends Api
         foreach($papers as $key => &$val){
             $val['logo_image'] = localpath_to_netpath($val['logo_image']);
 
-            if($val['pingjia_uid'] != 0){ //时间或评价,都行
+            if($val['pingjia_time'] != 0){ //时间或评价,都行
                 $val['show_status'] = 3;
                 $val['show_status_text'] = '已结束';
             }elseif($now < $val['starttime']){

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

@@ -31,7 +31,7 @@ class Trainactive extends Api
         foreach($papers as $key => &$val){
             $val['logo_image'] = localpath_to_netpath($val['logo_image']);
 
-            if($val['pingjia_uid'] != 0){ //时间或评价,都行
+            if($val['pingjia_time'] != 0){ //时间或评价,都行
                 $val['show_status'] = 3;
                 $val['show_status_text'] = '已结束';
             }elseif($now < $val['starttime']){
@@ -63,7 +63,7 @@ class Trainactive extends Api
 
             $now  = time();
 
-            if($info['pingjia_uid'] != 0){ //时间或评价,都行
+            if($info['pingjia_time'] != 0){ //时间或评价,都行
                 $info['show_status'] = 3;
                 $info['show_status_text'] = '已结束';
             }elseif($now < $info['starttime']){