Commit 0fb1c773 by zhufx

扫描rpc连接池配置

parents 181722c0 106a31a8
......@@ -43,7 +43,7 @@ interface AgencyInterface{
* @return mixed
* @author Administrator
*/
public function getTeam(string $token,int $pid,int $page);
// public function getTeam(string $token,int $pid,int $page);
/**
* 保存分销账单
......@@ -61,4 +61,43 @@ interface AgencyInterface{
* @author Administrator
*/
public function addSellerFreezeMoney(string $token,int $money);
/**
* 获取买家佣金数据
* @param string $token
* @return mixed
* @author Administrator
*/
public function getBuyerCommission(string $token);
/**
* 获取卖家资金数据
* @param string $token
* @return mixed
* @author Administrator
*/
public function getSellerFund(string $token);
/**
* 保存账单数据
* @param string $token
* @param int $order_id
* @param int $buyer_id
* @param int $store_id
* @param string $order_sn
* @param int $money
* @return mixed
* @author Administrator
*/
public function saveBill(
string $token,
int $order_id,
int $buyer_id,
int $store_id,
string $order_sn,
int $money
);
public function getBillList(string $token,array $condition, int $page, int $limit = 15);
}
\ No newline at end of file
<?php
namespace Hdll\Services\Common\Controller;
// use Swoft\Http\Message\Server\Request;
/**
* 活动啦啦Controller基类
*
*/
class BaseController
{
/**
* 业务层-错误时响应
*
* @param integer $errorCode
* @param string $msg
* @param mixed $data
* @return array
*/
public static function error(int $errorCode, string $msg, $data=null) {
return [
'error_code' => $errorCode,
'msg' => $msg,
'data' => $data,
];
}
/**
* 业务层-正确时响应
*
* @param mixed $data
* @param string $msg
* @return void
*/
public static function success($data, string $msg='') {
return [
'data' => $data,
'msg' => $msg,
'error_code' => 0,
];
}
}
\ No newline at end of file
<?php
namespace Hdll\Services\Common\Exception;
use Swoft\Exception\Exception;
class BaseException extends Exception
{
// HTTP 状态码 404,200
public $code = 500;
// 错误具体信息
public $message = '服务器异常';
// 业务错误码
public $errorCode = -1;
public function __construct($params = [])
{
if(isset($params['code'])){
$this->code = $params['code'];
}
if(isset($params['msg'])){
$this->message = $params['msg'];
}
if(isset($params['error_code'])){
$this->errorCode = $params['error_code'];
}
parent::__construct($this->message, $this->code);
}
public function getErrcode(){
return $this->errorCode;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment