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
bddd8497
Commit
bddd8497
authored
Nov 07, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐私号码回调
parent
8e993356
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+20
-8
No files found.
application/task/controller/PrivacyNumber.php
View file @
bddd8497
...
...
@@ -36,9 +36,9 @@ class PrivacyNumber
unset
(
$post_data
[
0
][
'id'
]);
//阿里大于返回是的id改为report_id
if
(
$post_data
[
0
][
'phone_no'
])
{
$agents_id
=
Db
::
table
(
'a_agents'
)
->
where
(
"phone='
{
$post_data
[
0
][
'phone_no'
]
}
' AND password IS NOT NULL"
)
->
value
(
'id'
);
$agents_id
=
Db
::
table
(
'a_agents'
)
->
where
(
"phone='
{
$post_data
[
0
][
'phone_no'
]
}
' AND password IS NOT NULL
AND status=0
"
)
->
value
(
'id'
);
if
(
empty
(
$agents_id
))
{
$agents_id
=
Db
::
table
(
'a_agents_phone'
)
->
where
(
'phone'
,
$post_data
[
0
][
'phone_no'
])
->
value
(
'agents_id'
);
$agents_id
=
Db
::
table
(
'a_agents_phone'
)
->
where
(
[
'phone'
=>
$post_data
[
0
][
'phone_no'
],
'status'
=>
0
])
->
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'
);
...
...
@@ -56,8 +56,14 @@ class PrivacyNumber
->
count
(
'id'
);
if
(
empty
(
$num
))
{
$m_service
=
new
ClientService
();
$m_service
->
saveCallNumByUserId
(
$post_data
[
0
][
'users_id'
]);
if
(
!
empty
(
$agents_id
))
{
$site_id
=
Db
::
table
(
'a_agents'
)
->
where
(
'id'
,
$agents_id
)
->
value
(
'site_id'
);
}
if
(
!
empty
(
$site_id
))
{
$m_service
=
new
ClientService
(
$site_id
);
$m_service
->
saveCallNumByUserId
(
$post_data
[
0
][
'users_id'
]);
}
}
}
...
...
@@ -242,9 +248,9 @@ class PrivacyNumber
];
if
(
$phone_a
)
{
$agents_id
=
Db
::
table
(
'a_agents'
)
->
where
(
'phone'
,
$phone_a
)
->
value
(
'id'
);
$agents_id
=
Db
::
table
(
'a_agents'
)
->
where
(
[
'phone'
=>
$phone_a
,
'status'
=>
0
]
)
->
value
(
'id'
);
if
(
empty
(
$agents_id
))
{
$agents_id
=
Db
::
table
(
'a_agents_phone'
)
->
where
(
'phone'
,
$phone_a
)
->
value
(
'agents_id'
);
$agents_id
=
Db
::
table
(
'a_agents_phone'
)
->
where
(
[
'phone'
=>
$phone_a
,
'status'
=>
0
]
)
->
value
(
'agents_id'
);
}
$date
[
'agents_id'
]
=
$agents_id
;
$date
[
'users_id'
]
=
Db
::
table
(
'u_users'
)
->
where
(
'user_phone'
,
$phone_b
)
->
value
(
'id'
);
...
...
@@ -255,8 +261,14 @@ class PrivacyNumber
$str
=
date
(
'Y-m-d h:i:s'
)
.
' 容联云话单'
.
var_export
(
$params
,
true
);
if
(
$params
[
'duration'
]
>
0
&&
$date
[
'users_id'
])
{
$m_service
=
new
ClientService
();
$m_service
->
saveCallNumByUserId
(
$date
[
'users_id'
]);
if
(
!
empty
(
$agents_id
))
{
$site_id
=
Db
::
table
(
'a_agents_phone'
)
->
where
(
'id'
,
$agents_id
)
->
value
(
'site_id'
);
}
if
(
!
empty
(
$site_id
))
{
$m_service
=
new
ClientService
(
$site_id
);
$m_service
->
saveCallNumByUserId
(
$date
[
'users_id'
]);
}
}
Log
::
write
(
$str
,
'rongBilledInformUrl'
);
//记录日志
return
json_encode
([
"statusCode"
=>
'000000'
,
'msg'
=>
'接收成功'
]);
...
...
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