getFind(array($this::ID => $id, $this::STATUS => 1)); if (!empty($agent)) { if ($agent[$this::STATUS] == 1) { $time = time(); //判断代理商是否过期 if ($agent[$this::BEGIN_TIME] < $time && $agent[$this::END_TIME] > $time) { $res['status'] = 1; } else { $res['status'] = 0; $res['msg'] = '代理商未在有效期内'; } } else { $res['status'] = 0; $res['msg'] = '代理商异常'; } } else { $res['status'] = 0; $res['msg'] = '代理商不存在'; } return $res; } }