Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
a0c1babd
Commit
a0c1babd
authored
Aug 07, 2018
by
王召彬
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
f538efe9
3664dc3d
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
13 deletions
+18
-13
src/Buyer/Enum/BuyerError.php
+8
-7
src/Buyer/Lib/BuyerInterface.php
+1
-1
src/Common/Exception/CommonException.php
+1
-1
src/Common/Exception/ExceptionData.php
+3
-1
src/Common/Exception/ExceptionParseData.php
+3
-2
src/Common/Pool/Config/BuyerPoolConfig.php
+1
-1
src/Common/Pool/Config/OrderPoolConfig.php
+1
-0
No files found.
src/Buyer/Enum/BuyerError.php
View file @
a0c1babd
...
...
@@ -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
)
...
...
src/Buyer/Lib/BuyerInterface.php
View file @
a0c1babd
...
...
@@ -17,7 +17,7 @@ use Swoft\Core\ResultInterface;
*/
interface
BuyerInterface
{
public
function
getUser
(
int
$st
roeId
,
int
$B
uyerId
);
public
function
getUser
(
int
$st
oreId
,
int
$b
uyerId
);
public
function
updateProfile
(
string
$token
,
array
$data
);
...
...
src/Common/Exception/CommonException.php
View file @
a0c1babd
...
...
@@ -36,7 +36,7 @@ class CommonException extends Exception
}
if
(
isset
(
$params
[
'path'
])
)
{
$this
->
path
=
$params
[
'path'
];
$this
->
path
=
empty
(
$params
[
'path'
])
?
[]
:
$params
[
'path'
];
}
...
...
src/Common/Exception/ExceptionData.php
View file @
a0c1babd
...
...
@@ -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
;
}
//获取调用堆栈信息
...
...
src/Common/Exception/ExceptionParseData.php
View file @
a0c1babd
...
...
@@ -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
;
...
...
src/Common/Pool/Config/BuyerPoolConfig.php
View file @
a0c1babd
...
...
@@ -75,7 +75,7 @@ class BuyerPoolConfig extends PoolProperties
*
*/
protected
$uri
=
[
"192.168.3.100:810
6
"
"192.168.3.100:810
1
"
];
...
...
src/Common/Pool/Config/OrderPoolConfig.php
View file @
a0c1babd
...
...
@@ -14,6 +14,7 @@ use Swoft\Bean\Annotation\Bean;
use
Swoft\Pool\PoolProperties
;
/**
* @Bean()
* the config of service user
*/
class
OrderPoolConfig
extends
PoolProperties
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment