Files
juipphp/app/api/controller/Hujiao.php
“wanyongkang” ea2fb7b318 外呼
2023-09-13 18:14:48 +08:00

31 lines
726 B
PHP

<?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);
}
}