|
@@ -1147,5 +1147,25 @@ class MyController extends Controller
|
|
return $this->error(ErrorCode::OPERATION_FAILED);
|
|
return $this->error(ErrorCode::OPERATION_FAILED);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+// 发私信
|
|
|
|
+ public function letterCreate(Request $request)
|
|
|
|
+ {
|
|
|
|
+ $id = $request->id;
|
|
|
|
+ $validator = \Validator::make($request->all(),
|
|
|
|
+ [
|
|
|
|
+ 'id' => 'required',
|
|
|
|
+ ],
|
|
|
|
+ [
|
|
|
|
+ 'id.required' => '银行账号不存在',
|
|
|
|
+ ]
|
|
|
|
+ );
|
|
|
|
+ if($validator->fails()) return $this->validatorError($validator->messages()->all(),ErrorCode::CLIENT_WRONG_PARAMS);
|
|
|
|
+ $ok =UserBank::destroy($id);
|
|
|
|
+ if ($ok) {
|
|
|
|
+ return $this->api('');
|
|
|
|
+ }else{
|
|
|
|
+ return $this->error(ErrorCode::OPERATION_FAILED);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|