public function getMsgById() { $must = array("id"); $params = haskey($this->params, $must); if ($params == NULL) { $re = $this->db->where($this->params)->find(); if ($re) { $this->success($re); } else { $this->failed(__FUNCTION__); } } }
public function getJobByCounty() { $must = array('county', 'level2'); $params = haskey($this->params, $must); if ($params == NULL) { $where['county'] = $this->params['county']; $where['level2'] = $this->params['level2']; $data = M('jobs')->where($where)->select(); if ($data) { $this->success($data); } else { $this->failed(__FUNCTION__); } } }
public function delCollect() { $must = array('id'); $params = haskey($this->params, $must); if ($params == NULL) { $re = M('jobs_collection')->where($this->params)->delete(); if ($re) { $this->success("success"); } else { $this->failed(__FUNCTION__); } } }
public function phoneExist() { $must = array('phone'); $params = haskey($this->params, $must); if ($params == NULL) { $where['phone'] = $this->params['phone']; $resault = array(); $re = M("user_seeker")->where($where)->find(); if ($re) { $resault['type'] = "seeker"; $resault['id'] = $re['id']; } else { $re1 = M("user_company")->where($where)->find(); if ($re1) { $resault['type'] = "company"; $resault['id'] = $re1['id']; } else { $this->error("该手机号不存在"); } } $this->success($resault); } else { $this->failed(__FUNCTION__); } }