Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
979ff219
Commit
979ff219
authored
Nov 08, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询重号
parent
418817b5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
6 deletions
+32
-6
AAgents.php
application/model/AAgents.php
+10
-0
AAgentsPhone.php
application/model/AAgentsPhone.php
+11
-0
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+11
-6
No files found.
application/model/AAgents.php
View file @
979ff219
...
@@ -745,6 +745,16 @@ class AAgents extends BaseModel
...
@@ -745,6 +745,16 @@ class AAgents extends BaseModel
return
$this
->
where
(
$where
)
->
value
(
$fields
);
return
$this
->
where
(
$where
)
->
value
(
$fields
);
}
}
/**
* @param $where
* @param $fields
* @return mixed
*/
public
function
getAgentsByWhereColumn
(
$where
,
$fields
)
{
return
$this
->
where
(
$where
)
->
column
(
$fields
);
}
/**
/**
* @param $where
* @param $where
* @param $fields
* @param $fields
...
...
application/model/AAgentsPhone.php
View file @
979ff219
...
@@ -73,4 +73,14 @@ class AAgentsPhone extends BaseModel
...
@@ -73,4 +73,14 @@ class AAgentsPhone extends BaseModel
{
{
return
$this
->
where
(
$where
)
->
value
(
$fields
);
return
$this
->
where
(
$where
)
->
value
(
$fields
);
}
}
/**
* @param $where
* @param $fields
* @return mixed
*/
public
function
getAgentsByWhereColumn
(
$where
,
$fields
)
{
return
$this
->
where
(
$where
)
->
column
(
$fields
);
}
}
}
\ No newline at end of file
application/task/controller/PrivacyNumber.php
View file @
979ff219
...
@@ -145,6 +145,7 @@ class PrivacyNumber
...
@@ -145,6 +145,7 @@ class PrivacyNumber
$m_bind
=
new
BindingPhone
();
$m_bind
=
new
BindingPhone
();
$m_agent
=
new
AAgents
();
$m_agent
=
new
AAgents
();
$m_agent_phone
=
new
AAgentsPhone
();
$m_agent_phone
=
new
AAgentsPhone
();
$m_secret_report
=
new
AliYunSecretReport
();
$date
=
date
(
'Y-m-d'
)
.
' 23:59:59'
;
$date
=
date
(
'Y-m-d'
)
.
' 23:59:59'
;
$fields
=
'a.id,aliYun_phone_id,expiry_date,phone_x,phone_a,phone_b,subsId,a.type,a.mappingId'
;
$fields
=
'a.id,aliYun_phone_id,expiry_date,phone_x,phone_a,phone_b,subsId,a.type,a.mappingId'
;
$where
[
'a.status'
]
=
1
;
$where
[
'a.status'
]
=
1
;
...
@@ -164,9 +165,9 @@ class PrivacyNumber
...
@@ -164,9 +165,9 @@ class PrivacyNumber
$bind
=
new
BindingPhone
();
$bind
=
new
BindingPhone
();
$redis
=
RedisExt
::
getRedis
();
$redis
=
RedisExt
::
getRedis
();
foreach
(
$bind_data
[
'data'
]
as
$k
=>
$v
)
{
foreach
(
$bind_data
[
'data'
]
as
$k
=>
$v
)
{
$agent_id
=
$m_agent
->
getAgentsByWhere
([
'status'
=>
0
,
'phone'
=>
$v
[
'phone_a'
]],
'id'
);
$agent_id
=
$m_agent
->
getAgentsByWhere
Column
([
'status'
=>
0
,
'phone'
=>
$v
[
'phone_a'
]],
'id'
);
if
(
empty
(
$agent_id
))
{
if
(
empty
(
$agent_id
))
{
$agent_id
=
$m_agent_phone
->
getAgentsByWhere
([
'status'
=>
0
,
'phone'
=>
$v
[
'phone_a'
]],
'agents_id'
);
$agent_id
=
$m_agent_phone
->
getAgentsByWhere
Column
([
'status'
=>
0
,
'phone'
=>
$v
[
'phone_a'
]],
'agents_id'
);
}
}
//解除绑定
//解除绑定
...
@@ -182,8 +183,10 @@ class PrivacyNumber
...
@@ -182,8 +183,10 @@ class PrivacyNumber
$phone_id
[
$k
]
=
$v
[
'aliYun_phone_id'
];
$phone_id
[
$k
]
=
$v
[
'aliYun_phone_id'
];
}
}
$call_key
=
'call_'
.
$agent_id
.
'_'
.
$v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_1'
;
foreach
(
$agent_id
as
$value
)
{
$redis
->
del
(
$call_key
);
$call_key
=
'call_'
.
$value
.
'_'
.
$v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_1'
;
$redis
->
del
(
$call_key
);
}
}
elseif
(
$v
[
'type'
]
==
2
&&
!
empty
(
$v
[
'mappingId'
]))
{
}
elseif
(
$v
[
'type'
]
==
2
&&
!
empty
(
$v
[
'mappingId'
]))
{
//释放容联云隐私号码
//释放容联云隐私号码
$tong_xun
=
new
RongDemo
();
$tong_xun
=
new
RongDemo
();
...
@@ -206,8 +209,10 @@ class PrivacyNumber
...
@@ -206,8 +209,10 @@ class PrivacyNumber
}
}
}
}
$call_key
=
'call_'
.
$agent_id
.
'_'
.
$v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_2'
;
foreach
(
$agent_id
as
$value
)
{
$redis
->
del
(
$call_key
);
$call_key
=
'call_'
.
$value
.
'_'
.
$v
[
'phone_a'
]
.
'_'
.
$v
[
'phone_b'
]
.
'_2'
;
$redis
->
del
(
$call_key
);
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment