wupengfei 2 years ago
parent
commit
6a9cf0a7a7

+ 5 - 3
.idea/workspace.xml

@@ -3,8 +3,10 @@
   <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/api/controller/Datum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Datum.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/common/model/DatumIntro.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common/model/DatumIntro.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/Demand.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Demand.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/Recruit.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Recruit.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -193,7 +195,7 @@
       <workItem from="1669597148644" duration="17061000" />
       <workItem from="1669682447842" duration="24394000" />
       <workItem from="1669769873624" duration="5352000" />
-      <workItem from="1669776182613" duration="676000" />
+      <workItem from="1669776182613" duration="1389000" />
     </task>
     <servers />
   </component>

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

@@ -170,6 +170,7 @@ class Activity extends Base
     {
         $sel_where[]  = ['id','=',input('get.id')];
         $detail = \app\common\model\Activity::where($sel_where)->find()->toArray();
+        if($detail['is_deleted'] == 1 || $detail['status'] == 0) $this->error('该活动已取消');
         $detail['cover_arr'] = $detail['cover'] ? explode('|',$detail['cover']) : null;
         $detail['label_name'] = $detail['label'] ?  explode(',',trim($detail['label'],',')): null;
         $detail['is_apply'] = ActivityApply::checkApply($this->user_id,$detail['id']);

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

@@ -211,7 +211,7 @@ class Demand extends Base
          $detail = PlatformDemand::where('id',input('get.id'))->find();
          $app_name = sysconf('app_name');
          $app_logo = sysconf('app_logo');
-         if(!$detail || $detail->is_deleted == 1) $this->error('该需求已删除');
+         if(!$detail || $detail->is_deleted == 1 || $detail->status == 0) $this->error('该需求已下架');
          $detail = $detail->toArray();
          $detail['label_name'] = $detail['label'] ? explode(',',trim($detail['label'],',')) : null;
 

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

@@ -133,7 +133,8 @@ class Press extends Base
     public function getPressDetail()
     {
         $sel_where[]  = ['id','=',input('get.id')];
-        $detail = \app\common\model\Press::field('id,images,title,content,read_num,create_at,transmit_num,user_id')->where($sel_where)->find()->toArray();
+        $detail = \app\common\model\Press::field('id,images,title,content,read_num,create_at,transmit_num,user_id,is_deleted,status')->where($sel_where)->find()->toArray();
+        if($detail['is_deleted'] == 1 || $detail['status'] == 0) $this->error('该新闻已下架');
         $detail['comment_num'] = PressComment::where(['first_id'=>$detail['id'],'type'=>1,'is_deleted'=>0])->count();
         $detail['is_collect'] = UserCollect::checkCollectByType($this->user_id,4,$detail['id']);
         $detail['collect_num'] = UserCollect::getCollectNum(4,$detail['id']);

+ 1 - 0
application/api/controller/Recruit.php

@@ -283,6 +283,7 @@ class Recruit extends Base
     {
         $sel_where[]  = ['id','=',input('get.id')];
         $detail = \app\common\model\Recruit::where($sel_where)->find()->toArray();
+        if($detail['is_deleted'] == 1 || $detail['status'] == 0) $this->error('该招聘信息已取消');
         $detail['label_name'] = explode(',',trim($detail['label'],','));
         $detail['welfare_arr'] = explode(',',trim($detail['welfare'],','));
         $detail['company_label'] = explode(',',trim($detail['company_label'],','));