wupengfei 1 năm trước cách đây
mục cha
commit
6e7988c9d1
2 tập tin đã thay đổi với 6 bổ sung3 xóa
  1. 1 1
      .idea/workspace.xml
  2. 5 2
      application/api/controller/Recruit.php

+ 1 - 1
.idea/workspace.xml

@@ -387,7 +387,7 @@
       <workItem from="1690764472148" duration="16055000" />
       <workItem from="1690851419503" duration="20529000" />
       <workItem from="1690938001930" duration="13294000" />
-      <workItem from="1691040879419" duration="5857000" />
+      <workItem from="1691040879419" duration="6022000" />
     </task>
     <servers />
   </component>

+ 5 - 2
application/api/controller/Recruit.php

@@ -507,8 +507,11 @@ class Recruit extends Base
         $recruits = \app\common\model\Recruit::where(['user_id'=>$this->user_id,'is_deleted'=>0])->column('id');
         $recruit_ids  = RecruitResume::where('recruit_id','in',$recruits)->where('is_deleted',0)->where('to_deleted',0)->group('recruit_id')->column('recruit_id');
         $ids_str = implode(',',$recruit_ids);
-        $list =   \app\common\model\Recruit::where(['r.user_id'=>$this->user_id,'r.is_deleted'=>0,])->where('r.id','in',$ids_str)->alias('r')
-            ->field('r.id,IFNULL( (SELECT count( s.id) FROM dd_recruit_resume as s WHERE r.id=s.recruit_id ),0) as re_num')
+        $list =   \app\common\model\Recruit::where(['r.user_id'=>$this->user_id,'r.is_deleted'=>0,])
+            //->where('r.id','in',$ids_str)
+            ->alias('r')
+            ->field('r.id,IFNULL( (SELECT count( s.id) FROM dd_recruit_resume as s WHERE r.id=s.recruit_id ),0) as re_num,IFNULL( (SELECT max(y.id) FROM dd_recruit_resume as y WHERE r.id=y.recruit_id ),0) as max_id')
+            ->order('max_id desc')
             ->select()->toArray();
         var_dump( $list);