Commit 4de2f7d3 authored by luhongguang's avatar luhongguang

update:异常错误码整理

parent 363dc8cd
......@@ -30,10 +30,16 @@ class BaseException extends \Exception
$this->msg = $params['msg'] ?? Registry::get('config')->exception->user->msg;
if (isset($params['cus']) && $this->cus && isset($this->cus[intval($params['cus'])]) && $this->base_code) {
//每个服务都有自己的codePrefix
$appid = \Yaf\Application::app()->getConfig()->get("appid");
$codePrefix = \Yaconf::get('bizcode.prefix.' . $appid);
$codePrefix = intval($codePrefix);
$cus_code = intval($params['cus']);
$base_code = intval($this->base_code);
$this->code = $base_code + $cus_code;
$this->code = $codePrefix + $base_code + $cus_code;
$this->msg = $this->cus[$cus_code];
}
}
......
......@@ -13,10 +13,10 @@ class Code
{
const PARAM = 101000;
const SIGN = 102000;
const GOODS = 108000;
const SHOP = 109000;
const DISTRIBUTOR = 110000;
const DISTRIBUTION = 111000;
const MARKETING = 112000;
const GOODS = 110000;
const SHOP = 120000;
const DISTRIBUTOR = 130000;
const DISTRIBUTION = 140000;
const MARKETING = 150000;
}
\ 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