外呼
This commit is contained in:
30
app/api/controller/Hujiao.php
Normal file
30
app/api/controller/Hujiao.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use app\api\model\User;
|
||||
use app\manager\model\FollowRecord;
|
||||
|
||||
class Hujiao
|
||||
{
|
||||
public function callback() {
|
||||
$data = json_decode(file_get_contents("php://input"), true);
|
||||
|
||||
$telstarttime = $data['starttime'];
|
||||
$druation = $data['druation'];
|
||||
|
||||
$follow_model = new FollowRecord;
|
||||
$user_model = new User;
|
||||
|
||||
$user_info = $user_model->getOne(['LoginCode' => $data['telB']],'Id,ManagerId');
|
||||
|
||||
$add_data = [
|
||||
'user_id' => $user_info['Id'],
|
||||
'op_user' => $user_info['ManagerId'],
|
||||
'telstarttime' => $telstarttime,
|
||||
'druation' => $druation.'s',
|
||||
];
|
||||
|
||||
$follow_model->add($add_data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user