mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
3.2.0
This commit is contained in:
23
sop-sdk/sdk-python/response/BaseResponse.py
Normal file
23
sop-sdk/sdk-python/response/BaseResponse.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: UTF-8 -*-
|
||||
from UserDict import UserDict
|
||||
|
||||
|
||||
class BaseResponse(UserDict):
|
||||
"""返回类"""
|
||||
request_id = None
|
||||
code = None
|
||||
msg = None
|
||||
sub_code = None
|
||||
sub_msg = None
|
||||
|
||||
def __init__(self, _dict=None, **kwargs):
|
||||
UserDict.__init__(self, _dict, **kwargs)
|
||||
|
||||
def is_success(self):
|
||||
"""是否成功
|
||||
|
||||
:return: True,成功
|
||||
:rtype: bool
|
||||
"""
|
||||
return self.sub_code is None
|
Reference in New Issue
Block a user