From 9def85f9ba8b49dca285d65936c9757e14d2fc3a Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Sun, 17 Apr 2022 12:32:28 +0800 Subject: [PATCH] organization --- internal/api/organization/organization.go | 4 ++-- pkg/base_info/organization_api_struct.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/api/organization/organization.go b/internal/api/organization/organization.go index 53542ea97..7a951e763 100644 --- a/internal/api/organization/organization.go +++ b/internal/api/organization/organization.go @@ -88,7 +88,7 @@ func UpdateDepartment(c *gin.Context) { } func GetSubDepartment(c *gin.Context) { - params := api.GetDepartmentReq{} + params := api.GetSubDepartmentReq{} if err := c.BindJSON(¶ms); err != nil { log.NewError("0", "BindJSON failed ", err.Error()) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) @@ -116,7 +116,7 @@ func GetSubDepartment(c *gin.Context) { return } - apiResp := api.GetDepartmentResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, DepartmentList: RpcResp.DepartmentList} + apiResp := api.GetSubDepartmentResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}, DepartmentList: RpcResp.DepartmentList} apiResp.Data = jsonData.JsonDataList(RpcResp.DepartmentList) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp) c.JSON(http.StatusOK, apiResp) diff --git a/pkg/base_info/organization_api_struct.go b/pkg/base_info/organization_api_struct.go index 0289b2f81..93fcfa069 100644 --- a/pkg/base_info/organization_api_struct.go +++ b/pkg/base_info/organization_api_struct.go @@ -21,11 +21,11 @@ type UpdateDepartmentResp struct { CommResp } -type GetDepartmentReq struct { +type GetSubDepartmentReq struct { OperationID string `json:"operationID" binding:"required"` DepartmentID string } -type GetDepartmentResp struct { +type GetSubDepartmentResp struct { CommResp DepartmentList []*open_im_sdk.Department `json:"-"` Data []map[string]interface{} `json:"data"`