|
@@ -38,11 +38,26 @@ class resumelogic extends baselogic
|
|
|
'getinfobyopenid' => [
|
|
|
['name' => 'openid', 'title' => 'openid', 'require' => true, 'type' => 'string'],
|
|
|
],
|
|
|
- 'sendinvent' => [
|
|
|
+ 'sendresume' => [
|
|
|
['name' => 'openid', 'title' => 'openid', 'require' => true, 'type' => 'string'],
|
|
|
['name' => 'inventid', 'title' => 'inventid', 'require' => true, 'type' => 'numeric'],
|
|
|
['name' => 'partyid', 'title' => 'partyid', 'type' => 'numeric'],
|
|
|
],
|
|
|
+ 'getsendedresumebywhere'=>[
|
|
|
+ ['name' => 'openid', 'title' => 'companyid', 'require' => true, 'type' => 'string'],
|
|
|
+ ['name' => 'status', 'title' => 'status', 'type' => 'numeric', 'regex' => '/[0|1|2]{1}/'],
|
|
|
+ ['name' => 'page', 'title' => 'page', 'type' => 'numeric'],
|
|
|
+ ['name' => 'size', 'title' => 'size', 'type' => 'numeric'],
|
|
|
+ ],
|
|
|
+ 'getinfobyid'=>[
|
|
|
+ ['name' => 'id', 'title' => 'id', 'require' => true, 'type' => 'numeric'],
|
|
|
+ ],
|
|
|
+ 'getinfobyuserid'=>[
|
|
|
+ ['name' => 'userid', 'title' => 'userid', 'require' => true, 'type' => 'numeric'],
|
|
|
+ ],
|
|
|
+ 'getallinfobyid'=>[
|
|
|
+ ['name' => 'id', 'title' => 'id', 'require' => true, 'type' => 'numeric'],
|
|
|
+ ]
|
|
|
];
|
|
|
return $list;
|
|
|
}
|
|
@@ -175,6 +190,95 @@ class resumelogic extends baselogic
|
|
|
$rinfo['welist'] = $welist;
|
|
|
return backarr(1, "查询成功", $rinfo);
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 根据id获取简历
|
|
|
+ * 20220119
|
|
|
+ * wj
|
|
|
+ */
|
|
|
+ public function getinfobyid($arr)
|
|
|
+ {
|
|
|
+ $result = $this->checkparam(__FUNCTION__, $arr);
|
|
|
+ if (1 != $result['status']) {
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+ $id = $arr['id'];
|
|
|
+ $m_r = new resumemodel();
|
|
|
+ $rinfo = $m_r->getinfobyid($id);
|
|
|
+ if (empty($rinfo)) {
|
|
|
+ return backarr(0, "简历不存在");
|
|
|
+ }
|
|
|
+ $resumeid = $rinfo['id'];
|
|
|
+ $m_eb = new educationbackgroundemodel();
|
|
|
+ $eblist = $m_eb->getList(['resume_id' => $resumeid], '*', 1, 0);
|
|
|
+ $rinfo['eblist'] = $eblist;
|
|
|
+ $m_we = new workexperiencemodel();
|
|
|
+ $welist = $m_we->getList(['resume_id' => $resumeid], '*', 1, 0);
|
|
|
+ $rinfo['welist'] = $welist;
|
|
|
+ return backarr(1, "查询成功", $rinfo);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 根据id获取简历、用户信息
|
|
|
+ * 20220119
|
|
|
+ * wj
|
|
|
+ */
|
|
|
+ public function getallinfobyid($arr){
|
|
|
+ $result = $this->checkparam(__FUNCTION__, $arr);
|
|
|
+ if (1 != $result['status']) {
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+ $id = $arr['id'];
|
|
|
+ $m_r = new resumemodel();
|
|
|
+ $rinfo = $m_r->getinfobyid($id);
|
|
|
+ if (empty($rinfo)) {
|
|
|
+ return backarr(0, "简历不存在");
|
|
|
+ }
|
|
|
+ $resumeid = $rinfo['id'];
|
|
|
+ $m_eb = new educationbackgroundemodel();
|
|
|
+ $eblist = $m_eb->getList(['resume_id' => $resumeid], '*', 1, 0);
|
|
|
+ $rinfo['eblist'] = $eblist;
|
|
|
+ $m_we = new workexperiencemodel();
|
|
|
+ $welist = $m_we->getList(['resume_id' => $resumeid], '*', 1, 0);
|
|
|
+ $rinfo['welist'] = $welist;
|
|
|
+ $userid = $rinfo['user_id'];
|
|
|
+ $m_u = new usermodel();
|
|
|
+ $uinfo = $m_u->getfieldbyid($userid);
|
|
|
+ if (empty($uinfo)) {
|
|
|
+ return backarr(0, "用户信息不存在");
|
|
|
+ }
|
|
|
+ $rinfo['userinfo'] = $uinfo;
|
|
|
+ return backarr(1, "查询成功", $rinfo);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 根据id获取简历
|
|
|
+ * 20220119
|
|
|
+ * wj
|
|
|
+ */
|
|
|
+ public function getinfobyuserid($arr)
|
|
|
+ {
|
|
|
+ $result = $this->checkparam(__FUNCTION__, $arr);
|
|
|
+ if (1 != $result['status']) {
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+ $userid = $arr['userid'];
|
|
|
+ $m_u = new usermodel();
|
|
|
+ $uinfo = $m_u->getinfobyid($userid);
|
|
|
+ if (empty($uinfo)) {
|
|
|
+ return backarr(0, "用户信息不存在");
|
|
|
+ }
|
|
|
+ $m_r = new resumemodel();
|
|
|
+ $rinfo = $m_r->getinfobyuserid($userid);
|
|
|
+ if (empty($rinfo)) {
|
|
|
+ return backarr(0, "简历不存在");
|
|
|
+ }
|
|
|
+ $resumeid = $rinfo['id'];
|
|
|
+ $m_eb = new educationbackgroundemodel();
|
|
|
+ $eblist = $m_eb->getList(['resume_id' => $resumeid], '*', 1, 0);
|
|
|
+ $rinfo['eblist'] = $eblist;
|
|
|
+ $m_we = new workexperiencemodel();
|
|
|
+ $welist = $m_we->getList(['resume_id' => $resumeid], '*', 1, 0);
|
|
|
+ $rinfo['welist'] = $welist;
|
|
|
+ return backarr(1, "查询成功", $rinfo);
|
|
|
+ }
|
|
|
/**
|
|
|
* 简历投递
|
|
|
* 20220119
|
|
@@ -217,6 +321,7 @@ class resumelogic extends baselogic
|
|
|
$arr['company_id'] = $iinfo['company_id'];
|
|
|
$arr['resume_id'] = $rinfo['id'];
|
|
|
$arr['invent_id'] = $iinfo['id'];
|
|
|
+ //未判断重复投递
|
|
|
$m_s = new sendrecordmodel();
|
|
|
$id = $m_s->insertData($arr);
|
|
|
if (empty($id)) {
|
|
@@ -224,4 +329,41 @@ class resumelogic extends baselogic
|
|
|
}
|
|
|
return backarr(1, "投递成功", ['id' => $id]);
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 根据条件获取简历投地记录
|
|
|
+ * 企业用户返回 向企业投递的简历 根据 company_id 查
|
|
|
+ * 非企业用户返回 投递过的简历 根据 send_user_id 查
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function getsendedresumebywhere($arr){
|
|
|
+ $result = $this->checkparam(__FUNCTION__, $arr);
|
|
|
+ if (1 != $result['status']) {
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+ $openid = $arr['openid'];
|
|
|
+ $m_u = new usermodel();
|
|
|
+ $uinfo = $m_u->getinfobyopenid($openid);
|
|
|
+ if (empty($uinfo)) {
|
|
|
+ return backarr(0, "用户信息不存在");
|
|
|
+ }
|
|
|
+ $where = [];
|
|
|
+ if(isset($arr['status'])){
|
|
|
+ $where['status'] = $arr['status'];
|
|
|
+ }
|
|
|
+ if(1!=$uinfo['is_company']){
|
|
|
+ $where['send_user_id'] = $uinfo['id'];
|
|
|
+ }else{
|
|
|
+ $where['company_id'] = $uinfo['company_id'];
|
|
|
+ }
|
|
|
+ $m_s = new sendrecordmodel();
|
|
|
+ $count = $m_s->getlist($where,'count');
|
|
|
+ if($count<0){
|
|
|
+ return backarr(0,"无数据");
|
|
|
+ }
|
|
|
+ $page = isset($arr['page']) && !empty($arr['page']) ? $arr['page'] : 1;
|
|
|
+ $size = isset($arr['size']) && !empty($arr['size']) ? $arr['size'] : 10;
|
|
|
+ $list = $m_s->getList($where, '*', $page, $size);
|
|
|
+ return backarr(1, "查询成功", $list);
|
|
|
+ }
|
|
|
}
|