王君 3 年之前
父节点
当前提交
64eace7269

+ 3 - 1
application/index/controller/Party.php

@@ -16,7 +16,9 @@ class Party extends Base
     {
         $param = request()->param();
         $l_p = new partylogic();
-        $result = $l_p->getlistbywhere($param);
+        $time =date('Y-m-d H:i:s');
+        $param['time'] = $time;
+        $result = $l_p->getinfobytime($param);
         if (1 != $result['status']) {
             return backjson(0, $result['msg']);
         }

+ 1 - 1
application/index/controller/Resume.php

@@ -66,7 +66,7 @@ class Resume extends Base
      * 20220119
      * wj
      */
-    public function getinfobyid()
+    public function getinfobyopenid()
     {
         $param = request()->param();
         $l_r = new resumelogic();

+ 5 - 5
application/index/logic/inventlogic.php

@@ -30,7 +30,7 @@ class inventlogic extends baselogic
                 ['name' => 'companyid', 'title' => 'companyid', 'require' => true, 'type' => 'numeric'],
                 ['name' => 'passstate', 'title' => 'passstate', 'type' => 'numeric', 'regex' => '/[0|1|2]{1}/'],
                 ['name' => 'activestate', 'title' => 'activestate', 'type' => 'numeric', 'regex' => '/[0|1]{1}/'],
-                ['name' => 'title', 'title' => 'title', 'type' => 'string', 'regex' => '/*{5,}/'],
+                ['name' => 'title', 'title' => 'title', 'type' => 'string', 'regex' => '/.{2,}/'],
             ],
             'updatebyid' => [
                 ['name' => 'id', 'title' => 'companyid', 'require' => true, 'type' => 'numeric'],
@@ -91,15 +91,15 @@ class inventlogic extends baselogic
             return backarr(0, "企业信息不存在");
         }
         $m_i = new inventmodel();
-        $where = ['company_id' => $companyid];
+        $where = [['company_id' ,'=', $companyid]];
         if (isset($arr['title'])) {
-            $where['title'] = ['like' => '%' . $arr['title'] . '%'];
+            $where[] = ['title','like' , '%' . $arr['title'] . '%'];
         }
         if (isset($arr['activestate'])) {
-            $where['active_state'] = $arr['passstate'];
+            $where[] = ['active_state','=',$arr['activestate']];
         }
         if (isset($arr['passstate'])) {
-            $where['pass_state'] = $arr['passstate'];
+            $where[] = ['pass_state','=',$arr['passstate']];
         }
         $page = isset($arr['page']) && !empty($arr['page']) ? $arr['page'] : 1;
         $size = isset($arr['size']) && !empty($arr['size']) ? $arr['size'] : 10;

+ 3 - 3
application/index/logic/partylogic.php

@@ -50,9 +50,9 @@ class partylogic extends baselogic
             return $result;
         }
         $time = $arr['time'];
-        $m_i = new partymodel();
-        $info = $m_i->getinfobytime($time);
-        if (empty($row)) {
+        $m_p = new partymodel();
+        $info = $m_p->getinfobytime($time);
+        if (empty($info)) {
             return backarr(0, "无数据");
         }
         return backarr(1, "获取成功", $info);

+ 11 - 6
application/index/logic/resumelogic.php

@@ -195,20 +195,25 @@ class resumelogic extends baselogic
         $inventid = $arr['inventid'];
         $m_i = new inventmodel();
         $iinfo = $m_i->getinfobyid($inventid);
+        if(empty($iinfo)){
+            return backarr(0, "岗位不存在");
+        }
         $m_r = new resumemodel();
         $userid = $uinfo['id'];
         $rinfo = $m_r->getinfobyuserid($userid);
         if (empty($rinfo)) {
             return backarr(0, "简历不存在");
         }
-        $partyid = $arr['partyid'];
-        $m_p = new partymodel();
-        $pinfo = $m_p->getinfobyid($partyid);
-        if (empty($pinfo)) {
-            return backarr(0, "活动不存在");
+        if(isset($arr['partyid'])){
+            $partyid = $arr['partyid'];
+            $m_p = new partymodel();
+            $pinfo = $m_p->getinfobyid($partyid);
+            if (empty($pinfo)) {
+                return backarr(0, "活动不存在");
+            }
+            $arr['party_id'] = $pinfo['id'];
         }
         $arr['send_user_id'] = $userid;
-        $arr['party_id'] = $pinfo['id'];
         $arr['company_id'] = $iinfo['company_id'];
         $arr['resume_id'] = $rinfo['id'];
         $arr['invent_id'] = $iinfo['id'];

+ 3 - 3
application/index/model/partymodel.php

@@ -87,9 +87,9 @@ class partymodel extends Model
     public function getinfobytime($time)
     {
         $where = [
-            'isactive' => 1,
-            'start_time' => ['<=', $time],
-            'end_time' => ['>=', $time],
+            ['isactive' ,'=', 1],
+            ['start_time' ,'<=', $time],
+            ['end_time' ,'>=', $time],
         ];
         $order = "id asc";
         $info = $this->where($where)->order($order)->find();