validationFactory->make( $this->request->all(), [ 'user_id' => 'required|nonempty|integer', 'store_id' => 'required|nonempty|integer', ], ['*.*' => ':attribute 参数不正确'] ); if ($validator->fails()) { throw new ValidationException($validator); } $userId = $this->request->input('user_id', 0); $storeId = $this->request->input('store_id', 0); $store = Store::query()->where(['user_id' => $userId, 'id' => $storeId])->first(); if (empty($store)) { throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE); } $data['balance'] = UserBalance::query() ->where(['source_id' => $store->user_id, 'user_type' => UserType::STORE]) ->value('balance'); $data['award'] = $this->financialService->sumAmount( $store->user_id, UserType::STORE, [FinancialRecord::MONEY_TYPE_STORE_PLAT_NEW_USER, FinancialRecord::MONEY_TYPE_STORE_FIRST_ORDER] ); $data['notice'] = [ [ 'title' => '用户须知', 'content' => '
请仔细填写相关信息,如果由于您填写的信息有误导致资金流失,平台概不负责。
注意:因微信限制当前用户账户余额满1元后才可提现
' ], [ 'title' => '提现须知', 'content' => '一次提现金额最低为1元
' .'一次提现金额最高为5000元
' .'每天可提现10次
' ], ]; return $this->success($data); } public function applyByStore() { $validator = $this->validationFactory->make( $this->request->all(), [ 'user_id' => 'required|nonempty' ] ); } }