where('companyId','<>',21898)->where('isDel',0)->select()->toArray(); $authorization = 'OE7kh6Dsw_0SqqH1FTAPCB2ewCQDhx7VvPw6PrsE_p9tcRKbtlFsZau8kjk2NQ829Yah90KhTh0C_35ek569uRQgM_gC0NtKzfRPDDoqMIUE5mI6AO_hm0dm-xDJqhAFYkXHCdXnJYzQZxWS5dleJCIwtQxgRuIzIbr-_G_5C-7DeLEOSt2vi1oGPleLt00QGQ1WYVYqoHYrbPGMghMQpWIbgk5qNcUCeANlLJ_s7QFC3QzArU95_YiK0HlhU81hZqr8kI_5lmdrRBoR-yNIlyhySLRCmEZYGzOxCiUHL3uFHYZA1VnLBAVbryNj5DElZjMgwA'; // 设置请求头 $headerData = ['client:system']; $header = setHeader($headerData, $authorization, 'json'); foreach ($ddd as $key => $value) { $data = []; // 发送请求获取公司账号列表 $result = requestCurl('https://s2.siyuguanli.com:9991/api/Reply/listReply?groupId='.$value['id'], '', 'GET', $header,'json'); $response = handleApiResponse($result); foreach ($response as $k => $v) { $data[] = [ 'groupId' => $v['groupId'], 'userId' => $value['userId'], 'title' => $v['title'], 'msgType' => $v['msgType'], 'content' => $v['content'], 'createTime' => strtotime($v['createTime']), 'lastUpdateTime' => strtotime($v['lastUpdateTime']), 'sortIndex' => 50 ]; } $Reply = new Reply(); $Reply->insertAll($data); } exit_data(11111); } }