You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
namespace App\JsonRpc;
use App\Constants\ErrorCode;use App\Service\SeparateAccountsServiceInterface;use Hyperf\RpcServer\Annotation\RpcService;use Hyperf\Di\Annotation\Inject;
/** * @RpcService(name="OrderService", protocol="jsonrpc-http", server="jsonrpc-http", publishTo="") */class OrderService implements OrderServiceInterface{
/** * @Inject * @var SeparateAccountsServiceInterface */ protected $separateAccService;
public function onlineComplete($global_order_id) { $data = $this->separateAccService->orderOnlineCompleted($global_order_id); return [ "status" => 200, "code" => $data ? 0 : ErrorCode::SEPARATE_ACCOUNTS_ERROR, "result" => [], "message" => $data ? '调用成功' : ErrorCode::getMessage(ErrorCode::SEPARATE_ACCOUNTS_ERROR) ]; }
}
|