Commit 6ac3a6fc authored by hujun's avatar hujun

查询经纪人新增手机号,阿里大于回调查询经纪人id

parent a1982898
...@@ -40,6 +40,8 @@ class CellPhone extends Basic ...@@ -40,6 +40,8 @@ class CellPhone extends Basic
$bind = new BindingPhone(); $bind = new BindingPhone();
$field = 'phone_x'; $field = 'phone_x';
$where['a.status'] = 1; $where['a.status'] = 1;
$where['a.phone_a'] = $phone_a;
$where['a.phone_b'] = $phone_b;
$phone_x = $bind->getPhoneX($field, $where); $phone_x = $bind->getPhoneX($field, $where);
if ($phone_x) { if ($phone_x) {
...@@ -120,10 +122,11 @@ class CellPhone extends Basic ...@@ -120,10 +122,11 @@ class CellPhone extends Basic
public function agentsUnBind() { public function agentsUnBind() {
$phone_x = $this->params['phone_x']; $phone_x = $this->params['phone_x'];
$phone_a = $this->params['phone_a']; $phone_a = $this->params['phone_a'];
$phone_b = $this->params['phone_b'];
if ($phone_x) { if ($phone_x) {
$phone = new BindingPhone(); $phone = new BindingPhone();
$subsId = $phone->getSubsId($phone_x,$phone_a,'',1); $subsId = $phone->getSubsId($phone_x,$phone_a,$phone_b,1);
if ($subsId) { if ($subsId) {
$result = PlsDemo::unbindSubscription($subsId, $phone_x); $result = PlsDemo::unbindSubscription($subsId, $phone_x);
......
...@@ -27,7 +27,11 @@ class PrivacyNumber ...@@ -27,7 +27,11 @@ class PrivacyNumber
unset($post_data[0]['id']); //阿里大于返回是的id改为report_id unset($post_data[0]['id']); //阿里大于返回是的id改为report_id
if ($post_data[0]['phone_no']) { if ($post_data[0]['phone_no']) {
$post_data[0]['agents_id'] = Db::table('agents')->where('phone',$post_data[0]['phone_no'])->value('id'); $agents_id = Db::table('agents')->where("phone='{$post_data[0]['phone_no']}' AND password IS NOT NULL")->value('id');
if (empty($agents_id)) {
$agents_id = Db::table('a_agents_phone')->where('phone',$post_data[0]['phone_no'])->value('agents_id');
}
$post_data[0]['agents_id'] = $agents_id;
$post_data[0]['users_id'] = Db::table('u_users')->where('user_phone',$post_data[0]['peer_no'])->value('id'); $post_data[0]['users_id'] = Db::table('u_users')->where('user_phone',$post_data[0]['peer_no'])->value('id');
} }
$post_data[0]['time'] = strtotime($post_data[0]['release_time']) - strtotime($post_data[0]['start_time']); $post_data[0]['time'] = strtotime($post_data[0]['release_time']) - strtotime($post_data[0]['start_time']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment