|
...
|
...
|
@@ -55,6 +55,8 @@ class ProjectAssociationController extends BaseController |
|
|
|
{
|
|
|
|
$project_id = (int)request()->input('project_id', 0);
|
|
|
|
$status = request()->input('status');
|
|
|
|
// 重载redis缓存
|
|
|
|
$cache = request()->input('cache');
|
|
|
|
if (isset($status)) {
|
|
|
|
$status = (int)$status ? ProjectAssociation::STATUS_NORMAL : ProjectAssociation::STATUS_DISABLED;
|
|
|
|
}
|
|
...
|
...
|
@@ -90,8 +92,16 @@ class ProjectAssociationController extends BaseController |
|
|
|
if (is_null($isRes)) {
|
|
|
|
$this->response('请开启AICC绑定!', Code::USER_ERROR, []);
|
|
|
|
}
|
|
|
|
$redis_key = 'aicc_friend_lists_' . (int)env('AICC_WECHAT_USER_ID');
|
|
|
|
$result = isset($cache) ? false : redis_get($redis_key);
|
|
|
|
if (empty($result)) {
|
|
|
|
$url = env('AICC_URL') . env('AICC_WECHAT_FRIEND_API_URL');
|
|
|
|
$result = curlGet($url);
|
|
|
|
redis_set($redis_key, json_encode($result));
|
|
|
|
} else {
|
|
|
|
$result = json_decode($result, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
$result['info'] = [
|
|
|
|
'friend_id' => $isRes->friend_id ?? 0,
|
|
|
|
'nickname' => $isRes->nickname ?? '',
|
...
|
...
|
|