Commit b5719685 authored by hujun's avatar hujun

打电话推送

parent 1e56b458
...@@ -9,14 +9,10 @@ ...@@ -9,14 +9,10 @@
namespace app\index\controller; namespace app\index\controller;
use app\api_broker\service\CallPhoneService; use app\api_broker\service\CallPhoneService;
use app\api_broker\service\PushMessageService;
use app\index\extend\Basic; use app\index\extend\Basic;
use app\api_broker\untils\PlsDemo;
use app\model\AliYunPhone;
use app\model\BindingPhone;
use app\model\SecretReport; use app\model\SecretReport;
use Grpc\Call;
use think\Db;
class CellPhone extends Basic class CellPhone extends Basic
{ {
...@@ -136,10 +132,16 @@ class CellPhone extends Basic ...@@ -136,10 +132,16 @@ class CellPhone extends Basic
*/ */
public function bindAXB() public function bindAXB()
{ {
if (empty($this->params['user_id'])) {
return $this->response(101, '客户id为空');
}
$call_phone = new CallPhoneService(); $call_phone = new CallPhoneService();
$data = $call_phone->bindAXB($this->params['phone_a'], $this->params['phone_b']); $data = $call_phone->bindAXB($this->params['phone_a'], $this->params['phone_b']);
$result['msg'] = ''; $result['msg'] = '';
if ($data['status'] == 'success') { if ($data['status'] == 'success') {
$push = new PushMessageService();
$push->pushMessageById($this->userId, '客户详情', '后台拨打电话推送客户详情', 'user_info',$this->params['user_id']);
$result['code'] = 200; $result['code'] = 200;
$result['data']['phone'] = $data['phone']; $result['data']['phone'] = $data['phone'];
} else { } else {
......
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