|
@@ -48,7 +48,7 @@ class ProjectAssociationController extends BaseController |
|
@@ -48,7 +48,7 @@ class ProjectAssociationController extends BaseController |
|
48
|
$image = request()->post('image', '');
|
48
|
$image = request()->post('image', '');
|
|
49
|
$data = compact('project_id', 'user_id', 'friend_id', 'nickname', 'user_name', 'image');
|
49
|
$data = compact('project_id', 'user_id', 'friend_id', 'nickname', 'user_name', 'image');
|
|
50
|
$this->ProjectAssociationLogic->saveWeChatData($data);
|
50
|
$this->ProjectAssociationLogic->saveWeChatData($data);
|
|
51
|
- $this->response('success');
|
51
|
+ $this->response('绑定成功');
|
|
52
|
}
|
52
|
}
|
|
53
|
|
53
|
|
|
54
|
/**
|
54
|
/**
|
|
@@ -67,18 +67,25 @@ class ProjectAssociationController extends BaseController |
|
@@ -67,18 +67,25 @@ class ProjectAssociationController extends BaseController |
|
67
|
$isRes = $this->ProjectAssociationLogic->normal($project_id);
|
67
|
$isRes = $this->ProjectAssociationLogic->normal($project_id);
|
|
68
|
// 当数据不存在时并开启状态,自动添加一条数据
|
68
|
// 当数据不存在时并开启状态,自动添加一条数据
|
|
69
|
if (is_null($isRes) && (!is_null($status) && $status)) {
|
69
|
if (is_null($isRes) && (!is_null($status) && $status)) {
|
|
70
|
- $bool = $this->ProjectAssociationLogic->saveProject($project_id, $status);
|
|
|
|
71
|
- if (empty($bool)) {
|
70
|
+ $isRes = $this->ProjectAssociationLogic->saveProject($project_id, $status);
|
|
|
|
71
|
+ if (is_null($isRes)) {
|
|
72
|
// 保存数据失败
|
72
|
// 保存数据失败
|
|
73
|
- $this->response('error', Code::SERVER_ERROR);
|
73
|
+ $this->response('绑定AICC数据失败!', Code::SERVER_ERROR);
|
|
74
|
}
|
74
|
}
|
|
75
|
} // 关闭状态
|
75
|
} // 关闭状态
|
|
76
|
elseif (!is_null($isRes) && (!is_null($status) && empty($status))) {
|
76
|
elseif (!is_null($isRes) && (!is_null($status) && empty($status))) {
|
|
77
|
- $res = $this->ProjectAssociationLogic->closedState($isRes, $status);
|
|
|
|
78
|
- $this->response($res['message'], $res['code']);
|
|
|
|
79
|
- } elseif (is_null($isRes)) {
|
77
|
+ $bool = $this->ProjectAssociationLogic->closedState($isRes, $status);
|
|
|
|
78
|
+ if ($bool) {
|
|
|
|
79
|
+ // 关闭aicc绑定成功
|
|
|
|
80
|
+ $this->response('关闭aicc绑定 - 成功!');
|
|
|
|
81
|
+ }else{
|
|
|
|
82
|
+ // 关闭aicc绑定失败
|
|
|
|
83
|
+ $this->response('关闭aicc绑定 - 失败!');
|
|
|
|
84
|
+ }
|
|
|
|
85
|
+ }
|
|
|
|
86
|
+ if (is_null($isRes)) {
|
|
80
|
// 请开启AICC绑定
|
87
|
// 请开启AICC绑定
|
|
81
|
- $this->response('error', Code::SERVER_ERROR);
|
88
|
+ $this->response('success', Code::SERVER_ERROR);
|
|
82
|
}
|
89
|
}
|
|
83
|
$cache = isset($cache);
|
90
|
$cache = isset($cache);
|
|
84
|
$result = $this->ProjectAssociationLogic->getAiccWechatLists($isRes, $cache);
|
91
|
$result = $this->ProjectAssociationLogic->getAiccWechatLists($isRes, $cache);
|