Commit a0c1babd by 王召彬

merge

parents f538efe9 3664dc3d
......@@ -9,13 +9,14 @@ namespace Hdll\Services\Buyer\Enum;
class BuyerError
{
const PARAMETER_ERR = ["msg" => "参数错误", "code" => 400, "errorCode" => 24001, 'rpcCode' => "PARAMETER_ERR"];
const REGISTERED = ["msg" => "用户已存在,无需创建", "code" => 400, "errorCode" => 24101, "rpcCode" => "REGISTERED"];
const DB_ERROR = ["msg" => "数据库操作错误", "code" => 500, "errorCode" => 24102, "rpcCode" => "DB_ERROR"];
const SCORE_ERR = ["msg" => "你无权创建该用户", "code" => 403, "errorCode" => 24103, "rpcCode" => "SCORE_ERR"];
const NOT_FOUND_COMMISSION = ["msg" => "获取佣金信息失败", "code" => 404, "errorCode" => 24104, "rpcCode" => "NOT_FOUND_COMMISSION"];
const INSUFFICIENT_COMMISSION = ["msg" => "可提现金额不足,无法提现", "code" => 400, "errorCode" => 24105, "rpcCode" => "INSUFFICIENT_COMMISSION"];
const NOT_FOUND_BUYER = ["msg" => "获取买家信息失败", "code" => 400, "errorCode" => 24106, "rpcCode" => "NOT_FOUND_BUYER"];
const PARAMETER_ERR = ["msg" => "参数错误", "code" => 400, "errorCode" => 24001];
const REGISTERED = ["msg" => "用户已存在,无需创建", "code" => 400, "errorCode" => 24101];
const DB_ERROR = ["msg" => "数据库操作错误", "code" => 500, "errorCode" => 24102];
const SCORE_ERR = ["msg" => "你无权创建该用户", "code" => 403, "errorCode" => 24103];
const NOT_FOUND_COMMISSION = ["msg" => "获取佣金信息失败", "code" => 404, "errorCode" => 24104];
const INSUFFICIENT_COMMISSION = ["msg" => "可提现金额不足,无法提现", "code" => 400, "errorCode" => 24105];
const NOT_FOUND_BUYER = ["msg" => "未找到用户信息", "code" => 404, "errorCode" => 24106];
public static function atranslate($message,$param)
......
......@@ -17,7 +17,7 @@ use Swoft\Core\ResultInterface;
*/
interface BuyerInterface
{
public function getUser(int $stroeId, int $BuyerId);
public function getUser(int $storeId, int $buyerId);
public function updateProfile(string $token, array $data);
......
......@@ -36,7 +36,7 @@ class CommonException extends Exception
}
if ( isset($params['path']) ) {
$this->path = $params['path'];
$this->path = empty($params['path'])?[]:$params['path'];
}
......
......@@ -37,9 +37,11 @@ class ExceptionData
'path' =>[],
];
if ( is_callable([$e,"getPath"]) ) {
if ( is_callable([$e,"getPath"]) ) {//自建异常类处理path
$data['path'] = json_decode($e->getPath(), true);
} else { //系统异常统一报500错误
$data['code'] = 500;
}
//获取调用堆栈信息
......
......@@ -21,9 +21,10 @@ class ExceptionParseData
$data = json_decode($msg,true);
} else {
$data['msg'] = $e->getMessage();
$data['code'] = $e->getCode();
$data['code'] = 500;
$data['errorCode'] = -1;
$data['file'] = $e->getFile().' '.$e->getLine();
$data['path'] = [$e->getFile().' '.$e->getLine()];
$data['path'] = ['Service:'.APP_NAME.$e->getFile().' '.$e->getLine()];
}
return $data;
......
......@@ -75,7 +75,7 @@ class BuyerPoolConfig extends PoolProperties
*
*/
protected $uri = [
"192.168.3.100:8106"
"192.168.3.100:8101"
];
......
......@@ -14,6 +14,7 @@ use Swoft\Bean\Annotation\Bean;
use Swoft\Pool\PoolProperties;
/**
* @Bean()
* the config of service user
*/
class OrderPoolConfig extends PoolProperties
......
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