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
abe53d8a
Commit
abe53d8a
authored
Sep 20, 2018
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of
https://gitee.com/zwyjjc/tl_estate
into test
parents
2fd4675e
93cfb990
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
9 deletions
+110
-9
CallPhoneService.php
application/api_broker/service/CallPhoneService.php
+6
-5
RongDemo.php
application/api_broker/untils/RongDemo.php
+30
-0
PerformanceService.php
application/index/service/PerformanceService.php
+3
-2
BindingPhone.php
application/model/BindingPhone.php
+2
-2
TAgentTotalModel.php
application/model/TAgentTotalModel.php
+64
-0
PrivacyNumber.php
application/task/controller/PrivacyNumber.php
+5
-0
No files found.
application/api_broker/service/CallPhoneService.php
View file @
abe53d8a
...
@@ -67,7 +67,7 @@ class CallPhoneService
...
@@ -67,7 +67,7 @@ class CallPhoneService
* @param int $house_id
* @param int $house_id
* @return mixed
* @return mixed
*/
*/
public
function
bindAXB
(
$phone_a
,
$phone_b
,
$record
=
true
,
int
$user_id
,
int
$agent_id
,
string
$agent_name
,
int
$landlord
,
int
$house_id
)
public
function
bindAXB
(
$phone_a
,
$phone_b
,
$record
=
true
,
int
$user_id
,
$agent_id
,
string
$agent_name
,
int
$landlord
,
int
$house_id
)
{
{
$result
[
'status'
]
=
'failed'
;
$result
[
'status'
]
=
'failed'
;
...
@@ -264,15 +264,16 @@ class CallPhoneService
...
@@ -264,15 +264,16 @@ class CallPhoneService
/*容联云*/
/*容联云*/
$mappingId
=
$phone
->
getSubsId
(
$this
->
phone_x
,
$this
->
phone_a
,
$this
->
phone_b
,
1
,
'mappingId'
);
$mappingId
=
$phone
->
getSubsId
(
$this
->
phone_x
,
$this
->
phone_a
,
$this
->
phone_b
,
1
,
'mappingId'
);
$yun_tong_xun
=
new
RongDemo
();
$yun_tong_xun
=
new
RongDemo
();
if
(
$mappingId
)
{
if
(
$mappingId
)
{
$result
=
$yun_tong_xun
->
releaseNumber
(
$mappingId
);
/*解绑*/
$result
=
$yun_tong_xun
->
releaseNumber
(
$mappingId
);
/*解绑*/
if
(
$result
[
'statusCode'
]
==
'000000'
)
{
if
(
$result
[
'statusCode'
]
==
'000000'
)
{
$phone
->
unBind
(
$this
->
phone_x
,
$this
->
phone_a
,
$this
->
phone_b
);
$phone
->
unBind
(
$this
->
phone_x
,
$this
->
phone_a
,
$this
->
phone_b
);
}
else
{
}
else
{
$data
[
'status'
]
=
'failed'
;
$yun_result
=
$yun_tong_xun
->
getBindInfo
(
$this
->
phone_a
,
$this
->
phone_b
,
$this
->
phone_x
,
$mappingId
);
$data
[
'msg'
]
=
'解除失败,如果需要继续与客户沟通,请联系运营!'
;
if
(
empty
(
$yun_result
[
'data'
][
'mappingId'
]))
{
$phone
->
unBind
(
$this
->
phone_x
,
$this
->
phone_a
,
$this
->
phone_b
);
}
}
}
}
else
{
}
else
{
$data
[
'msg'
]
=
'没有号码绑定关系,请忽略!。'
;
$data
[
'msg'
]
=
'没有号码绑定关系,请忽略!。'
;
...
...
application/api_broker/untils/RongDemo.php
View file @
abe53d8a
...
@@ -224,4 +224,33 @@ class RongDemo
...
@@ -224,4 +224,33 @@ class RongDemo
}
}
return
$msg
;
return
$msg
;
}
}
/**
* 检查AXB绑定状态
*
* @param $aNumber
* @param $bNumber
* @param $xNumber
* @param $mappingId
* @return mixed
*/
public
function
getBindInfo
(
$aNumber
,
$bNumber
,
$xNumber
,
$mappingId
)
{
$data
=
$this
->
components
;
$time
=
date
(
'YmdHis'
,
time
());
$sign
=
$this
->
sigParameter
(
$time
);
/*签名*/
$url
=
$this
->
url
(
'axb'
,
'query'
,
'cu01'
,
$sign
);
/*url*/
$Authorization
=
$this
->
Authorization
(
$time
);
/*认证信息*/
$post_data
=
[
'appId'
=>
$data
[
'appId'
],
'mappingId'
=>
$mappingId
,
'aNumber'
=>
$aNumber
,
'xNumber'
=>
$xNumber
,
'bNumber'
=>
$bNumber
];
$result
=
json_decode
(
$this
->
sendCurl
(
$url
,
$post_data
,
$Authorization
),
true
);
$result
[
'code_msg'
]
=
$this
->
getCodeString
(
$result
[
'statusCode'
]);
return
$result
;
}
}
}
\ No newline at end of file
application/index/service/PerformanceService.php
View file @
abe53d8a
...
@@ -85,7 +85,8 @@ class PerformanceService
...
@@ -85,7 +85,8 @@ class PerformanceService
"
;
"
;
$order
=
"performance_total desc"
;
$order
=
"performance_total desc"
;
$result
=
$this
->
totalModel
->
getTotalByAgentId
(
$field
,
$where_
,
$type
,
$order
);
$result
=
$this
->
totalModel
->
getTotalByAgentIdForPcPerformance
(
$field
,
$where_
,
$type
,
$order
,
$pageSize
,
$pageNo
);
$total_result
=
$this
->
totalModel
->
getTotalByAgentIdForPcPerformanceTotal
(
$field
,
$where_
,
$type
);
$arr
=
[];
$arr
=
[];
$field
=
"a.name,a.img,b.store_name,c.district_name"
;
$field
=
"a.name,a.img,b.store_name,c.district_name"
;
...
@@ -144,7 +145,7 @@ class PerformanceService
...
@@ -144,7 +145,7 @@ class PerformanceService
}
}
}
}
//dump($arr);exit;
//dump($arr);exit;
return
[
'list'
=>
$arr
,
'total'
=>
0
];
return
[
'list'
=>
$arr
,
'total'
=>
$total_result
];
}
}
...
...
application/model/BindingPhone.php
View file @
abe53d8a
...
@@ -18,9 +18,9 @@ class BindingPhone extends BaseModel
...
@@ -18,9 +18,9 @@ class BindingPhone extends BaseModel
*
*
* @param $phone_x
* @param $phone_x
* @param $phone_a
* @param $phone_a
* @param $phone_b
* @param string $phone_b
* @param $phoneId
* @param int $status
* @param int $status
* @param string $phoneId
* @return bool|mixed
* @return bool|mixed
*/
*/
public
function
getSubsId
(
$phone_x
,
$phone_a
,
$phone_b
=
''
,
$status
=
0
,
$phoneId
=
'subsId'
)
public
function
getSubsId
(
$phone_x
,
$phone_a
,
$phone_b
=
''
,
$status
=
0
,
$phoneId
=
'subsId'
)
...
...
application/model/TAgentTotalModel.php
View file @
abe53d8a
...
@@ -183,4 +183,67 @@ class TAgentTotalModel extends Model
...
@@ -183,4 +183,67 @@ class TAgentTotalModel extends Model
->
where
(
$param
)
->
where
(
$param
)
->
select
();
->
select
();
}
}
/**
* 获取分组统计数据-pc后台业绩用
* @param $field
* @param $params
* @param $type
* @param string $order
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getTotalByAgentIdForPcPerformance
(
$field
,
$params
,
$type
,
$order
=
""
,
$pageSize
,
$pageNo
)
{
$group_
=
""
;
switch
(
$type
)
{
case
1
:
$group_
=
"agent_id"
;
break
;
case
2
:
$group_
=
"store_id"
;
break
;
case
3
:
$group_
=
"district_id"
;
break
;
}
$result
=
$this
->
db_
->
field
(
$field
)
->
where
(
$params
)
->
group
(
$group_
)
->
order
(
$order
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
//echo $this->db_->getLastSql();
return
$result
;
}
public
function
getTotalByAgentIdForPcPerformanceTotal
(
$field
,
$params
,
$type
,
$order
=
""
)
{
$group_
=
""
;
switch
(
$type
)
{
case
1
:
$group_
=
"agent_id"
;
break
;
case
2
:
$group_
=
"store_id"
;
break
;
case
3
:
$group_
=
"district_id"
;
break
;
}
$result
=
$this
->
db_
->
field
(
$field
)
->
where
(
$params
)
->
group
(
$group_
)
->
count
();
//echo $this->db_->getLastSql();
return
$result
;
}
}
}
\ No newline at end of file
application/task/controller/PrivacyNumber.php
View file @
abe53d8a
...
@@ -167,6 +167,11 @@ class PrivacyNumber
...
@@ -167,6 +167,11 @@ class PrivacyNumber
$bind
->
unBind
(
$v
[
'phone_x'
],
$v
[
'phone_a'
],
$v
[
'phone_b'
]);
$bind
->
unBind
(
$v
[
'phone_x'
],
$v
[
'phone_a'
],
$v
[
'phone_b'
]);
$binding_phone_id
[
$k
]
=
$v
[
'id'
];
$binding_phone_id
[
$k
]
=
$v
[
'id'
];
$phone_id
[
$k
]
=
$v
[
'aliYun_phone_id'
];
$phone_id
[
$k
]
=
$v
[
'aliYun_phone_id'
];
}
else
{
$yun_result
=
$tong_xun
->
getBindInfo
(
$v
[
'phone_a'
],
$v
[
'phone_b'
],
$v
[
'phone_x'
],
$v
[
'mappingId'
]);
if
(
empty
(
$yun_result
[
'data'
][
'mappingId'
]))
{
$bind
->
unBind
(
$v
[
'phone_x'
],
$v
[
'phone_a'
],
$v
[
'phone_b'
]);
}
}
}
}
}
}
}
...
...
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