|
@@ -67,19 +67,23 @@ class ProjectAssociationController extends BaseController |
|
@@ -67,19 +67,23 @@ 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('绑定AICC数据失败!', 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
|
$bool = $this->ProjectAssociationLogic->closedState($isRes, $status);
|
77
|
$bool = $this->ProjectAssociationLogic->closedState($isRes, $status);
|
|
78
|
- if (empty($bool)) {
|
78
|
+ if ($bool) {
|
|
|
|
79
|
+ // 关闭aicc绑定成功
|
|
|
|
80
|
+ $this->response('关闭aicc绑定 - 成功!');
|
|
|
|
81
|
+ }else{
|
|
79
|
// 关闭aicc绑定失败
|
82
|
// 关闭aicc绑定失败
|
|
80
|
- $this->response('关闭aicc绑定失败!', Code::SERVER_ERROR);
|
83
|
+ $this->response('关闭aicc绑定 - 失败!', Code::SERVER_ERROR);
|
|
81
|
}
|
84
|
}
|
|
82
|
- } elseif (is_null($isRes)) {
|
85
|
+ }
|
|
|
|
86
|
+ if (is_null($isRes)) {
|
|
83
|
// 请开启AICC绑定
|
87
|
// 请开启AICC绑定
|
|
84
|
$this->response('success');
|
88
|
$this->response('success');
|
|
85
|
}
|
89
|
}
|