|
...
|
...
|
@@ -31,19 +31,20 @@ class ProjectAssociationController extends BaseController |
|
|
|
if (empty($project_id)) {
|
|
|
|
$this->fail('请选择项目!', Code::USER_PARAMS_ERROE);
|
|
|
|
}
|
|
|
|
$status = (bool)request()->post('status', 1); # 1 - 正常, 0 - 禁用
|
|
|
|
$wx_user_id = (int)request()->post('user_id', 0);
|
|
|
|
if (empty($wx_user_id) && $status) {
|
|
|
|
$status = (bool)request()->post('status', 1); # 1 - 正常, 0 - 禁用
|
|
|
|
|
|
|
|
$user_id = (int)request()->post('user_id', 0);
|
|
|
|
if (empty($user_id) && $status) {
|
|
|
|
$this->fail('请选择要绑定的AICC用户!', Code::USER_PARAMS_ERROE);
|
|
|
|
}
|
|
|
|
$wx_id = (int)request()->post('wx_id', 0);
|
|
|
|
if (empty($wx_id) && $status) {
|
|
|
|
$this->fail('请选择要绑定的AICC项目!', Code::USER_PARAMS_ERROE);
|
|
|
|
$friend_id = (int)request()->post('friend_id', 0);
|
|
|
|
if (empty($friend_id) && $status) {
|
|
|
|
$this->fail('请选择要绑定的AICC用户列表!', Code::USER_PARAMS_ERROE);
|
|
|
|
}
|
|
|
|
$wx_nickname = request()->post('nickname', '');
|
|
|
|
$wx_user_name = request()->post('user_name', '');
|
|
|
|
$wx_image = request()->post('image', '');
|
|
|
|
$data = compact('project_id', 'wx_id', 'wx_nickname', 'wx_user_id', 'wx_user_name', 'wx_image');
|
|
|
|
$nickname = request()->post('nickname', '');
|
|
|
|
$user_name = request()->post('user_name', '');
|
|
|
|
$image = request()->post('image', '');
|
|
|
|
$data = compact('project_id', 'user_id', 'friend_id', 'nickname', 'user_name', 'image');
|
|
|
|
$this->ProjectAssociationLogic->saveWeChatData($data);
|
|
|
|
$this->response('success');
|
|
|
|
}
|
...
|
...
|
|