Refactor code

This commit is contained in:
wenxu12345
2022-01-14 16:11:23 +08:00
parent 6f411e96ed
commit 4d172ec4f5
4 changed files with 133 additions and 130 deletions
+8 -8
View File
@@ -54,7 +54,7 @@ type GetJoinedGroupListReq struct {
}
type GetJoinedGroupListResp struct {
CommResp
GroupInfoList []*open_im_sdk.GroupInfo
GroupInfoList []*open_im_sdk.GroupInfo `json:"-"`
Data []map[string]interface{} `json:"data"`
}
@@ -66,9 +66,9 @@ type GetGroupMemberListReq struct {
}
type GetGroupMemberListResp struct {
CommResp
NextSeq int32 `json:"nextSeq"`
MemberList []*open_im_sdk.GroupMemberFullInfo
Data []map[string]interface{} `json:"data"`
NextSeq int32 `json:"nextSeq"`
MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"`
Data []map[string]interface{} `json:"data"`
}
type GetGroupAllMemberReq struct {
@@ -90,7 +90,7 @@ type CreateGroupReq struct {
}
type CreateGroupResp struct {
CommResp
GroupInfo open_im_sdk.GroupInfo
GroupInfo open_im_sdk.GroupInfo `jason:-`
Data map[string]interface{} `json:"data"`
}
@@ -100,8 +100,8 @@ type GetGroupApplicationListReq struct {
}
type GetGroupApplicationListResp struct {
CommResp
GroupRequestList []*open_im_sdk.GroupRequest
Data []map[string]interface{} `json:"data"`
GroupRequestList []*open_im_sdk.GroupRequest `json:"-"`
Data []map[string]interface{} `json:"data"`
}
type GetGroupInfoReq struct {
@@ -110,7 +110,7 @@ type GetGroupInfoReq struct {
}
type GetGroupInfoResp struct {
CommResp
GroupInfoList []*open_im_sdk.GroupInfo
GroupInfoList []*open_im_sdk.GroupInfo `json:"-"`
Data []map[string]interface{} `json:"data"`
}
+9 -17
View File
@@ -88,33 +88,25 @@ func initRotateLogs(rotationTime time.Duration, maxRemainNum uint, level string,
}
}
//Deprecated
func Info(token, OperationID, format string, args ...interface{}) {
func Info(OperationID string, args ...interface{}) {
logger.WithFields(logrus.Fields{
"PID": logger.Pid,
"OperationID": OperationID,
}).Infof(format, args...)
"PID": logger.Pid,
}).Infoln(args)
}
//Deprecated
func Error(token, OperationID, format string, args ...interface{}) {
func Error(OperationID string, args ...interface{}) {
logger.WithFields(logrus.Fields{
"PID": logger.Pid,
"OperationID": OperationID,
}).Errorf(format, args...)
"PID": logger.Pid,
}).Errorln(args)
}
//Deprecated
func Debug(token, OperationID, format string, args ...interface{}) {
func Debug(OperationID string, args ...interface{}) {
logger.WithFields(logrus.Fields{
"PID": logger.Pid,
"OperationID": OperationID,
}).Debugf(format, args...)
"PID": logger.Pid,
}).Debugln(args)
}
//Deprecated