mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Merge remote-tracking branch 'origin/superGroup' into superGroup
This commit is contained in:
commit
d51af59f85
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -133,7 +133,7 @@ func main() {
|
|||||||
chatGroup.POST("/pull_msg_by_seq", apiChat.PullMsgBySeqList)
|
chatGroup.POST("/pull_msg_by_seq", apiChat.PullMsgBySeqList)
|
||||||
chatGroup.POST("/del_msg", apiChat.DelMsg)
|
chatGroup.POST("/del_msg", apiChat.DelMsg)
|
||||||
chatGroup.POST("/clear_msg", apiChat.ClearMsg)
|
chatGroup.POST("/clear_msg", apiChat.ClearMsg)
|
||||||
chatGroup.POST("/send_msg", manage.ManagementSendMsg)
|
chatGroup.POST("/manage_send_msg", manage.ManagementSendMsg)
|
||||||
chatGroup.POST("/batch_send_msg", manage.ManagementBatchSendMsg)
|
chatGroup.POST("/batch_send_msg", manage.ManagementBatchSendMsg)
|
||||||
}
|
}
|
||||||
//Manager
|
//Manager
|
||||||
|
@ -28,8 +28,8 @@ mongo:
|
|||||||
dbTimeout: 60
|
dbTimeout: 60
|
||||||
dbDatabase: openIM #mongo db 默认即可
|
dbDatabase: openIM #mongo db 默认即可
|
||||||
dbSource: admin
|
dbSource: admin
|
||||||
dbUserName: #mongo用户名,建议先不设置
|
dbUserName: #mongo用户名,建议先不设置
|
||||||
dbPassword: #mongo密码,建议先不设置
|
dbPassword: #mongo密码,建议先不设置
|
||||||
dbMaxPoolSize: 100
|
dbMaxPoolSize: 100
|
||||||
dbRetainChatRecords: 3650 #mongo保存离线消息时间(天),根据需求修改
|
dbRetainChatRecords: 3650 #mongo保存离线消息时间(天),根据需求修改
|
||||||
|
|
||||||
|
@ -29,11 +29,8 @@ services:
|
|||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
# cache
|
# cache
|
||||||
- wiredTigerCacheSizeGB=1
|
- wiredTigerCacheSizeGB=1
|
||||||
# environment:
|
- MONGO_INITDB_ROOT_USERNAME=openIM
|
||||||
# - MONGO_INITDB_ROOT_USERNAME=openIM
|
- MONGO_INITDB_ROOT_PASSWORD=openIM
|
||||||
# - MONGO_INITDB_ROOT_PASSWORD=openIM
|
|
||||||
|
|
||||||
|
|
||||||
#TZ: Asia/Shanghai
|
#TZ: Asia/Shanghai
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
@ -99,6 +96,21 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
command: /usr/local/bin/etcd --name etcd0 --data-dir /etcd-data --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379 --listen-peer-urls http://0.0.0.0:2380 --initial-advertise-peer-urls http://0.0.0.0:2380 --initial-cluster etcd0=http://0.0.0.0:2380 --initial-cluster-token tkn --initial-cluster-state new
|
command: /usr/local/bin/etcd --name etcd0 --data-dir /etcd-data --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379 --listen-peer-urls http://0.0.0.0:2380 --initial-advertise-peer-urls http://0.0.0.0:2380 --initial-cluster etcd0=http://0.0.0.0:2380 --initial-cluster-token tkn --initial-cluster-state new
|
||||||
|
|
||||||
|
minio:
|
||||||
|
image: minio/minio
|
||||||
|
ports:
|
||||||
|
- 10005:9000
|
||||||
|
- 9090:9090
|
||||||
|
container_name: minio
|
||||||
|
volumes:
|
||||||
|
- /mnt/data:/data
|
||||||
|
- /mnt/config:/root/.minio
|
||||||
|
environment:
|
||||||
|
MINIO_ROOT_USER: user12345
|
||||||
|
MINIO_ROOT_PASSWORD: key12345
|
||||||
|
restart: always
|
||||||
|
command: minio server /data --console-address ':9090'
|
||||||
|
|
||||||
open_im_server:
|
open_im_server:
|
||||||
image: openim/open_im_server:v2.1.0
|
image: openim/open_im_server:v2.1.0
|
||||||
container_name: open_im_server
|
container_name: open_im_server
|
||||||
@ -114,6 +126,7 @@ services:
|
|||||||
- mongodb
|
- mongodb
|
||||||
- redis
|
- redis
|
||||||
- etcd
|
- etcd
|
||||||
|
- minio
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
logging:
|
logging:
|
||||||
driver: json-file
|
driver: json-file
|
||||||
|
@ -64,6 +64,19 @@ func DeleteUser(c *gin.Context) {
|
|||||||
log.NewInfo(req.OperationID, "DeleteUser api return", resp)
|
log.NewInfo(req.OperationID, "DeleteUser api return", resp)
|
||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 获取所有用户uid列表
|
||||||
|
// @Description 获取所有用户uid列表
|
||||||
|
// @Tags 用户相关
|
||||||
|
// @ID GetAllUsersUid
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.GetAllUsersUidReq true "请求体"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.GetAllUsersUidResp
|
||||||
|
// @Failure 500 {object} api.GetAllUsersUidResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.GetAllUsersUidResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /user/get_all_users_uid [post]
|
||||||
func GetAllUsersUid(c *gin.Context) {
|
func GetAllUsersUid(c *gin.Context) {
|
||||||
params := api.GetAllUsersUidReq{}
|
params := api.GetAllUsersUidReq{}
|
||||||
if err := c.BindJSON(¶ms); err != nil {
|
if err := c.BindJSON(¶ms); err != nil {
|
||||||
@ -79,7 +92,7 @@ func GetAllUsersUid(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,6 +119,19 @@ func GetAllUsersUid(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 检查列表账户注册状态,并且返回结果
|
||||||
|
// @Description 传入UserIDList检查列表账户注册状态,并且返回结果
|
||||||
|
// @Tags 用户相关
|
||||||
|
// @ID AccountCheck
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.AccountCheckReq true "请求体"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.AccountCheckResp
|
||||||
|
// @Failure 500 {object} api.AccountCheckResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.AccountCheckResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /user/account_check [post]
|
||||||
func AccountCheck(c *gin.Context) {
|
func AccountCheck(c *gin.Context) {
|
||||||
params := api.AccountCheckReq{}
|
params := api.AccountCheckReq{}
|
||||||
if err := c.BindJSON(¶ms); err != nil {
|
if err := c.BindJSON(¶ms); err != nil {
|
||||||
@ -121,7 +147,7 @@ func AccountCheck(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package office
|
package office
|
||||||
|
|
||||||
import (
|
import (
|
||||||
apistruct "Open_IM/pkg/base_info"
|
api "Open_IM/pkg/base_info"
|
||||||
"Open_IM/pkg/common/config"
|
"Open_IM/pkg/common/config"
|
||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
"Open_IM/pkg/common/token_verify"
|
"Open_IM/pkg/common/token_verify"
|
||||||
@ -16,10 +16,22 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// @Summary 获取用户标签信息
|
||||||
|
// @Description 用户获取自己的所有的标签
|
||||||
|
// @Tags 标签
|
||||||
|
// @ID GetUserTags
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.GetUserTagsReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.GetUserTagsResp
|
||||||
|
// @Failure 500 {object} api.GetUserTagsResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.GetUserTagsResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/get_user_tags [post]
|
||||||
func GetUserTags(c *gin.Context) {
|
func GetUserTags(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apistruct.GetUserTagsReq
|
req api.GetUserTagsReq
|
||||||
resp apistruct.GetUserTagsResp
|
resp api.GetUserTagsResp
|
||||||
reqPb pbOffice.GetUserTagsReq
|
reqPb pbOffice.GetUserTagsReq
|
||||||
respPb *pbOffice.GetUserTagsResp
|
respPb *pbOffice.GetUserTagsResp
|
||||||
)
|
)
|
||||||
@ -36,7 +48,7 @@ func GetUserTags(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,10 +79,22 @@ func GetUserTags(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 创建标签
|
||||||
|
// @Description 创建标签
|
||||||
|
// @Tags 标签
|
||||||
|
// @ID CreateTag
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.CreateTagReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.CreateTagResp
|
||||||
|
// @Failure 500 {object} api.CreateTagResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.CreateTagResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/create_tag [post]
|
||||||
func CreateTag(c *gin.Context) {
|
func CreateTag(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apistruct.CreateTagReq
|
req api.CreateTagReq
|
||||||
resp apistruct.CreateTagResp
|
resp api.CreateTagResp
|
||||||
reqPb pbOffice.CreateTagReq
|
reqPb pbOffice.CreateTagReq
|
||||||
respPb *pbOffice.CreateTagResp
|
respPb *pbOffice.CreateTagResp
|
||||||
)
|
)
|
||||||
@ -90,7 +114,7 @@ func CreateTag(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,10 +139,22 @@ func CreateTag(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 删除标签
|
||||||
|
// @Description 根据标签ID创建标签
|
||||||
|
// @Tags 标签
|
||||||
|
// @ID DeleteTag
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.DeleteTagReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.DeleteTagResp
|
||||||
|
// @Failure 500 {object} api.DeleteTagResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.DeleteTagResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/delete_tag [post]
|
||||||
func DeleteTag(c *gin.Context) {
|
func DeleteTag(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apistruct.DeleteTagReq
|
req api.DeleteTagReq
|
||||||
resp apistruct.DeleteTagResp
|
resp api.DeleteTagResp
|
||||||
reqPb pbOffice.DeleteTagReq
|
reqPb pbOffice.DeleteTagReq
|
||||||
respPb *pbOffice.DeleteTagResp
|
respPb *pbOffice.DeleteTagResp
|
||||||
)
|
)
|
||||||
@ -138,7 +174,7 @@ func DeleteTag(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,10 +199,22 @@ func DeleteTag(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 修改标签
|
||||||
|
// @Description 根据标签ID修改标签用户列表, 名称
|
||||||
|
// @Tags 标签
|
||||||
|
// @ID SetTag
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.SetTagReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.SetTagResp
|
||||||
|
// @Failure 500 {object} api.SetTagResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.SetTagResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/set_tag [post]
|
||||||
func SetTag(c *gin.Context) {
|
func SetTag(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apistruct.SetTagReq
|
req api.SetTagReq
|
||||||
resp apistruct.SetTagResp
|
resp api.SetTagResp
|
||||||
reqPb pbOffice.SetTagReq
|
reqPb pbOffice.SetTagReq
|
||||||
respPb *pbOffice.SetTagResp
|
respPb *pbOffice.SetTagResp
|
||||||
)
|
)
|
||||||
@ -211,10 +259,22 @@ func SetTag(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 发送标签消息
|
||||||
|
// @Description 对标签用户发送消息
|
||||||
|
// @Tags 标签
|
||||||
|
// @ID SendMsg2Tag
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.SendMsg2TagReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.SendMsg2TagResp
|
||||||
|
// @Failure 500 {object} api.SendMsg2TagResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.SendMsg2TagResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/send_msg_to_tag [post]
|
||||||
func SendMsg2Tag(c *gin.Context) {
|
func SendMsg2Tag(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apistruct.SendMsg2TagReq
|
req api.SendMsg2TagReq
|
||||||
resp apistruct.SendMsg2TagResp
|
resp api.SendMsg2TagResp
|
||||||
reqPb pbOffice.SendMsg2TagReq
|
reqPb pbOffice.SendMsg2TagReq
|
||||||
respPb *pbOffice.SendMsg2TagResp
|
respPb *pbOffice.SendMsg2TagResp
|
||||||
)
|
)
|
||||||
@ -234,7 +294,7 @@ func SendMsg2Tag(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,10 +319,22 @@ func SendMsg2Tag(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 获取发送历史记录
|
||||||
|
// @Description 分页获取发送历史记录
|
||||||
|
// @Tags 标签
|
||||||
|
// @ID GetTagSendLogs
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.GetTagSendLogsReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.GetTagSendLogsResp
|
||||||
|
// @Failure 500 {object} api.GetTagSendLogsResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.GetTagSendLogsResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/get_send_tag_log [post]
|
||||||
func GetTagSendLogs(c *gin.Context) {
|
func GetTagSendLogs(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apistruct.GetTagSendLogsReq
|
req api.GetTagSendLogsReq
|
||||||
resp apistruct.GetTagSendLogsResp
|
resp api.GetTagSendLogsResp
|
||||||
reqPb pbOffice.GetTagSendLogsReq
|
reqPb pbOffice.GetTagSendLogsReq
|
||||||
respPb *pbOffice.GetTagSendLogsResp
|
respPb *pbOffice.GetTagSendLogsResp
|
||||||
)
|
)
|
||||||
@ -279,7 +351,7 @@ func GetTagSendLogs(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,7 +365,7 @@ func GetTagSendLogs(c *gin.Context) {
|
|||||||
if etcdConn == nil {
|
if etcdConn == nil {
|
||||||
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
errMsg := req.OperationID + "getcdv3.GetConn == nil"
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
||||||
@ -317,10 +389,22 @@ func GetTagSendLogs(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 获取该用户的标签信息
|
||||||
|
// @Description 通过标签id获取该用户的标签信息
|
||||||
|
// @Tags 标签
|
||||||
|
// @ID GetUserTagByID
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.GetUserTagByIDReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.GetUserTagByIDResp
|
||||||
|
// @Failure 500 {object} api.GetUserTagByIDResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.GetUserTagByIDResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/get_user_tag_by_id [post]
|
||||||
func GetUserTagByID(c *gin.Context) {
|
func GetUserTagByID(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apistruct.GetUserTagByIDReq
|
req api.GetUserTagByIDReq
|
||||||
resp apistruct.GetUserTagByIDResp
|
resp api.GetUserTagByIDResp
|
||||||
reqPb pbOffice.GetUserTagByIDReq
|
reqPb pbOffice.GetUserTagByIDReq
|
||||||
respPb *pbOffice.GetUserTagByIDResp
|
respPb *pbOffice.GetUserTagByIDResp
|
||||||
)
|
)
|
||||||
@ -337,7 +421,7 @@ func GetUserTagByID(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package office
|
package office
|
||||||
|
|
||||||
import (
|
import (
|
||||||
apiStruct "Open_IM/pkg/base_info"
|
api "Open_IM/pkg/base_info"
|
||||||
"Open_IM/pkg/common/config"
|
"Open_IM/pkg/common/config"
|
||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
"Open_IM/pkg/common/token_verify"
|
"Open_IM/pkg/common/token_verify"
|
||||||
@ -15,10 +15,22 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// @Summary 创建一条工作圈
|
||||||
|
// @Description 用户创建一条工作圈
|
||||||
|
// @Tags 工作圈
|
||||||
|
// @ID CreateOneWorkMoment
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.CreateOneWorkMomentReq true "请求 atUserList likeUserList permissionGroupList permissionUserList 字段中userName可以不填"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.CreateOneWorkMomentResp
|
||||||
|
// @Failure 500 {object} api.CreateOneWorkMomentResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.CreateOneWorkMomentResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/create_one_work_moment [post]
|
||||||
func CreateOneWorkMoment(c *gin.Context) {
|
func CreateOneWorkMoment(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apiStruct.CreateOneWorkMomentReq
|
req api.CreateOneWorkMomentReq
|
||||||
resp apiStruct.CreateOneWorkMomentResp
|
resp api.CreateOneWorkMomentResp
|
||||||
reqPb pbOffice.CreateOneWorkMomentReq
|
reqPb pbOffice.CreateOneWorkMomentReq
|
||||||
respPb *pbOffice.CreateOneWorkMomentResp
|
respPb *pbOffice.CreateOneWorkMomentResp
|
||||||
)
|
)
|
||||||
@ -36,7 +48,7 @@ func CreateOneWorkMoment(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +71,7 @@ func CreateOneWorkMoment(c *gin.Context) {
|
|||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CreateOneWorkMoment rpc server failed" + err.Error()})
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "CreateOneWorkMoment rpc server failed" + err.Error()})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp.CommResp = apiStruct.CommResp{
|
resp.CommResp = api.CommResp{
|
||||||
ErrCode: respPb.CommonResp.ErrCode,
|
ErrCode: respPb.CommonResp.ErrCode,
|
||||||
ErrMsg: respPb.CommonResp.ErrMsg,
|
ErrMsg: respPb.CommonResp.ErrMsg,
|
||||||
}
|
}
|
||||||
@ -67,10 +79,22 @@ func CreateOneWorkMoment(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 删除一条工作圈
|
||||||
|
// @Description 根据用户工作圈ID删除一条工作圈
|
||||||
|
// @Tags 工作圈
|
||||||
|
// @ID DeleteOneWorkMoment
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.DeleteOneWorkMomentReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.DeleteOneWorkMomentResp
|
||||||
|
// @Failure 500 {object} api.DeleteOneWorkMomentResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.DeleteOneWorkMomentResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/delete_one_work_moment [post]
|
||||||
func DeleteOneWorkMoment(c *gin.Context) {
|
func DeleteOneWorkMoment(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apiStruct.DeleteOneWorkMomentReq
|
req api.DeleteOneWorkMomentReq
|
||||||
resp apiStruct.DeleteOneWorkMomentResp
|
resp api.DeleteOneWorkMomentResp
|
||||||
reqPb pbOffice.DeleteOneWorkMomentReq
|
reqPb pbOffice.DeleteOneWorkMomentReq
|
||||||
respPb *pbOffice.DeleteOneWorkMomentResp
|
respPb *pbOffice.DeleteOneWorkMomentResp
|
||||||
)
|
)
|
||||||
@ -88,7 +112,7 @@ func DeleteOneWorkMoment(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,10 +142,22 @@ func DeleteOneWorkMoment(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 点赞一条工作圈
|
||||||
|
// @Description 工作圈ID点赞一条工作圈
|
||||||
|
// @Tags 工作圈
|
||||||
|
// @ID LikeOneWorkMoment
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.LikeOneWorkMomentReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.LikeOneWorkMomentResp
|
||||||
|
// @Failure 500 {object} api.LikeOneWorkMomentResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.LikeOneWorkMomentResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/like_one_work_moment [post]
|
||||||
func LikeOneWorkMoment(c *gin.Context) {
|
func LikeOneWorkMoment(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apiStruct.LikeOneWorkMomentReq
|
req api.LikeOneWorkMomentReq
|
||||||
resp apiStruct.LikeOneWorkMomentResp
|
resp api.LikeOneWorkMomentResp
|
||||||
reqPb pbOffice.LikeOneWorkMomentReq
|
reqPb pbOffice.LikeOneWorkMomentReq
|
||||||
respPb *pbOffice.LikeOneWorkMomentResp
|
respPb *pbOffice.LikeOneWorkMomentResp
|
||||||
)
|
)
|
||||||
@ -168,10 +204,22 @@ func LikeOneWorkMoment(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 评论一条工作圈
|
||||||
|
// @Description 评论一条工作圈
|
||||||
|
// @Tags 工作圈
|
||||||
|
// @ID CommentOneWorkMoment
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.CommentOneWorkMomentReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.CommentOneWorkMomentResp
|
||||||
|
// @Failure 500 {object} api.CommentOneWorkMomentResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.CommentOneWorkMomentResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/comment_one_work_moment [post]
|
||||||
func CommentOneWorkMoment(c *gin.Context) {
|
func CommentOneWorkMoment(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apiStruct.CommentOneWorkMomentReq
|
req api.CommentOneWorkMomentReq
|
||||||
resp apiStruct.CommentOneWorkMomentResp
|
resp api.CommentOneWorkMomentResp
|
||||||
reqPb pbOffice.CommentOneWorkMomentReq
|
reqPb pbOffice.CommentOneWorkMomentReq
|
||||||
respPb *pbOffice.CommentOneWorkMomentResp
|
respPb *pbOffice.CommentOneWorkMomentResp
|
||||||
)
|
)
|
||||||
@ -218,10 +266,22 @@ func CommentOneWorkMoment(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 删除一条评论
|
||||||
|
// @Description 删除一条评论
|
||||||
|
// @Tags 工作圈
|
||||||
|
// @ID DeleteComment
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.DeleteCommentReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.DeleteCommentResp
|
||||||
|
// @Failure 500 {object} api.DeleteCommentResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.DeleteCommentResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/delete_comment [post]
|
||||||
func DeleteComment(c *gin.Context) {
|
func DeleteComment(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apiStruct.DeleteCommentReq
|
req api.DeleteCommentReq
|
||||||
resp apiStruct.DeleteCommentResp
|
resp api.DeleteCommentResp
|
||||||
reqPb pbOffice.DeleteCommentReq
|
reqPb pbOffice.DeleteCommentReq
|
||||||
respPb *pbOffice.DeleteCommentResp
|
respPb *pbOffice.DeleteCommentResp
|
||||||
)
|
)
|
||||||
@ -266,10 +326,22 @@ func DeleteComment(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 通过ID获取工作圈
|
||||||
|
// @Description 通过ID获取工作圈
|
||||||
|
// @Tags 工作圈
|
||||||
|
// @ID GetWorkMomentByID
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.GetWorkMomentByIDReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.GetWorkMomentByIDResp
|
||||||
|
// @Failure 500 {object} api.GetWorkMomentByIDResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.GetWorkMomentByIDResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/get_work_moment_by_id [post]
|
||||||
func GetWorkMomentByID(c *gin.Context) {
|
func GetWorkMomentByID(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apiStruct.GetWorkMomentByIDReq
|
req api.GetWorkMomentByIDReq
|
||||||
resp apiStruct.GetWorkMomentByIDResp
|
resp api.GetWorkMomentByIDResp
|
||||||
reqPb pbOffice.GetWorkMomentByIDReq
|
reqPb pbOffice.GetWorkMomentByIDReq
|
||||||
respPb *pbOffice.GetWorkMomentByIDResp
|
respPb *pbOffice.GetWorkMomentByIDResp
|
||||||
)
|
)
|
||||||
@ -311,8 +383,8 @@ func GetWorkMomentByID(c *gin.Context) {
|
|||||||
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
||||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||||
}
|
}
|
||||||
resp.Data.WorkMoment = &apiStruct.WorkMoment{LikeUserList: []*apiStruct.WorkMomentUser{}, Comments: []*apiStruct.Comment{},
|
resp.Data.WorkMoment = &api.WorkMoment{LikeUserList: []*api.WorkMomentUser{}, Comments: []*api.Comment{},
|
||||||
AtUserList: []*apiStruct.WorkMomentUser{}, PermissionUserList: []*apiStruct.WorkMomentUser{}}
|
AtUserList: []*api.WorkMomentUser{}, PermissionUserList: []*api.WorkMomentUser{}}
|
||||||
if err := utils.CopyStructFields(&resp.Data.WorkMoment, respPb.WorkMoment); err != nil {
|
if err := utils.CopyStructFields(&resp.Data.WorkMoment, respPb.WorkMoment); err != nil {
|
||||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||||
}
|
}
|
||||||
@ -320,10 +392,22 @@ func GetWorkMomentByID(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 查询用户工作圈
|
||||||
|
// @Description 查询用户工作圈
|
||||||
|
// @Tags 工作圈
|
||||||
|
// @ID GetUserWorkMoments
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.GetUserWorkMomentsReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.GetUserWorkMomentsResp
|
||||||
|
// @Failure 500 {object} api.GetUserWorkMomentsResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.GetUserWorkMomentsResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/get_user_work_moments [post]
|
||||||
func GetUserWorkMoments(c *gin.Context) {
|
func GetUserWorkMoments(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apiStruct.GetUserWorkMomentsReq
|
req api.GetUserWorkMomentsReq
|
||||||
resp apiStruct.GetUserWorkMomentsResp
|
resp api.GetUserWorkMomentsResp
|
||||||
reqPb pbOffice.GetUserWorkMomentsReq
|
reqPb pbOffice.GetUserWorkMomentsReq
|
||||||
respPb *pbOffice.GetUserWorkMomentsResp
|
respPb *pbOffice.GetUserWorkMomentsResp
|
||||||
)
|
)
|
||||||
@ -366,29 +450,26 @@ func GetUserWorkMoments(c *gin.Context) {
|
|||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserWorkMoments rpc server failed" + err.Error()})
|
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserWorkMoments rpc server failed" + err.Error()})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp.Data.WorkMoments = []*apiStruct.WorkMoment{}
|
resp.Data.WorkMoments = []*api.WorkMoment{}
|
||||||
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
||||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||||
}
|
}
|
||||||
//if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil {
|
|
||||||
// log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
|
||||||
//}
|
|
||||||
for _, v := range respPb.WorkMoments {
|
for _, v := range respPb.WorkMoments {
|
||||||
workMoment := apiStruct.WorkMoment{
|
workMoment := api.WorkMoment{
|
||||||
WorkMomentID: v.WorkMomentID,
|
WorkMomentID: v.WorkMomentID,
|
||||||
UserID: v.UserID,
|
UserID: v.UserID,
|
||||||
Content: v.Content,
|
Content: v.Content,
|
||||||
FaceURL: v.FaceURL,
|
FaceURL: v.FaceURL,
|
||||||
UserName: v.UserName,
|
UserName: v.UserName,
|
||||||
CreateTime: v.CreateTime,
|
CreateTime: v.CreateTime,
|
||||||
Comments: make([]*apiStruct.Comment, len(v.Comments)),
|
Comments: make([]*api.Comment, len(v.Comments)),
|
||||||
LikeUserList: make([]*apiStruct.WorkMomentUser, len(v.LikeUserList)),
|
LikeUserList: make([]*api.WorkMomentUser, len(v.LikeUserList)),
|
||||||
AtUserList: make([]*apiStruct.WorkMomentUser, len(v.AtUserList)),
|
AtUserList: make([]*api.WorkMomentUser, len(v.AtUserList)),
|
||||||
PermissionUserList: make([]*apiStruct.WorkMomentUser, len(v.PermissionUserList)),
|
PermissionUserList: make([]*api.WorkMomentUser, len(v.PermissionUserList)),
|
||||||
Permission: v.Permission,
|
Permission: v.Permission,
|
||||||
}
|
}
|
||||||
for i, comment := range v.Comments {
|
for i, comment := range v.Comments {
|
||||||
workMoment.Comments[i] = &apiStruct.Comment{
|
workMoment.Comments[i] = &api.Comment{
|
||||||
UserID: comment.UserID,
|
UserID: comment.UserID,
|
||||||
UserName: comment.UserName,
|
UserName: comment.UserName,
|
||||||
ReplyUserID: comment.ReplyUserID,
|
ReplyUserID: comment.ReplyUserID,
|
||||||
@ -399,19 +480,19 @@ func GetUserWorkMoments(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i, likeUser := range v.LikeUserList {
|
for i, likeUser := range v.LikeUserList {
|
||||||
workMoment.LikeUserList[i] = &apiStruct.WorkMomentUser{
|
workMoment.LikeUserList[i] = &api.WorkMomentUser{
|
||||||
UserID: likeUser.UserID,
|
UserID: likeUser.UserID,
|
||||||
UserName: likeUser.UserName,
|
UserName: likeUser.UserName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i, atUser := range v.AtUserList {
|
for i, atUser := range v.AtUserList {
|
||||||
workMoment.AtUserList[i] = &apiStruct.WorkMomentUser{
|
workMoment.AtUserList[i] = &api.WorkMomentUser{
|
||||||
UserID: atUser.UserID,
|
UserID: atUser.UserID,
|
||||||
UserName: atUser.UserName,
|
UserName: atUser.UserName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i, permissionUser := range v.PermissionUserList {
|
for i, permissionUser := range v.PermissionUserList {
|
||||||
workMoment.PermissionUserList[i] = &apiStruct.WorkMomentUser{
|
workMoment.PermissionUserList[i] = &api.WorkMomentUser{
|
||||||
UserID: permissionUser.UserID,
|
UserID: permissionUser.UserID,
|
||||||
UserName: permissionUser.UserName,
|
UserName: permissionUser.UserName,
|
||||||
}
|
}
|
||||||
@ -424,10 +505,22 @@ func GetUserWorkMoments(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 查询自己大工作圈页面
|
||||||
|
// @Description 查询用户工作圈页面
|
||||||
|
// @Tags 工作圈
|
||||||
|
// @ID GetUserFriendWorkMoments
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.GetUserFriendWorkMomentsReq true "请求"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.GetUserFriendWorkMomentsResp
|
||||||
|
// @Failure 500 {object} api.GetUserFriendWorkMomentsResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.GetUserFriendWorkMomentsResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /office/get_user_friend_work_moments [post]
|
||||||
func GetUserFriendWorkMoments(c *gin.Context) {
|
func GetUserFriendWorkMoments(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apiStruct.GetUserFriendWorkMomentsReq
|
req api.GetUserFriendWorkMomentsReq
|
||||||
resp apiStruct.GetUserFriendWorkMomentsResp
|
resp api.GetUserFriendWorkMomentsResp
|
||||||
reqPb pbOffice.GetUserFriendWorkMomentsReq
|
reqPb pbOffice.GetUserFriendWorkMomentsReq
|
||||||
respPb *pbOffice.GetUserFriendWorkMomentsResp
|
respPb *pbOffice.GetUserFriendWorkMomentsResp
|
||||||
)
|
)
|
||||||
@ -475,23 +568,23 @@ func GetUserFriendWorkMoments(c *gin.Context) {
|
|||||||
//if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil {
|
//if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil {
|
||||||
// log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
// log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||||
//}
|
//}
|
||||||
resp.Data.WorkMoments = []*apiStruct.WorkMoment{}
|
resp.Data.WorkMoments = []*api.WorkMoment{}
|
||||||
for _, v := range respPb.WorkMoments {
|
for _, v := range respPb.WorkMoments {
|
||||||
workMoment := apiStruct.WorkMoment{
|
workMoment := api.WorkMoment{
|
||||||
WorkMomentID: v.WorkMomentID,
|
WorkMomentID: v.WorkMomentID,
|
||||||
UserID: v.UserID,
|
UserID: v.UserID,
|
||||||
Content: v.Content,
|
Content: v.Content,
|
||||||
FaceURL: v.FaceURL,
|
FaceURL: v.FaceURL,
|
||||||
UserName: v.UserName,
|
UserName: v.UserName,
|
||||||
CreateTime: v.CreateTime,
|
CreateTime: v.CreateTime,
|
||||||
Comments: make([]*apiStruct.Comment, len(v.Comments)),
|
Comments: make([]*api.Comment, len(v.Comments)),
|
||||||
LikeUserList: make([]*apiStruct.WorkMomentUser, len(v.LikeUserList)),
|
LikeUserList: make([]*api.WorkMomentUser, len(v.LikeUserList)),
|
||||||
AtUserList: make([]*apiStruct.WorkMomentUser, len(v.AtUserList)),
|
AtUserList: make([]*api.WorkMomentUser, len(v.AtUserList)),
|
||||||
PermissionUserList: make([]*apiStruct.WorkMomentUser, len(v.PermissionUserList)),
|
PermissionUserList: make([]*api.WorkMomentUser, len(v.PermissionUserList)),
|
||||||
Permission: v.Permission,
|
Permission: v.Permission,
|
||||||
}
|
}
|
||||||
for i, comment := range v.Comments {
|
for i, comment := range v.Comments {
|
||||||
workMoment.Comments[i] = &apiStruct.Comment{
|
workMoment.Comments[i] = &api.Comment{
|
||||||
UserID: comment.UserID,
|
UserID: comment.UserID,
|
||||||
UserName: comment.UserName,
|
UserName: comment.UserName,
|
||||||
ReplyUserID: comment.ReplyUserID,
|
ReplyUserID: comment.ReplyUserID,
|
||||||
@ -502,19 +595,19 @@ func GetUserFriendWorkMoments(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i, likeUser := range v.LikeUserList {
|
for i, likeUser := range v.LikeUserList {
|
||||||
workMoment.LikeUserList[i] = &apiStruct.WorkMomentUser{
|
workMoment.LikeUserList[i] = &api.WorkMomentUser{
|
||||||
UserID: likeUser.UserID,
|
UserID: likeUser.UserID,
|
||||||
UserName: likeUser.UserName,
|
UserName: likeUser.UserName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i, atUser := range v.AtUserList {
|
for i, atUser := range v.AtUserList {
|
||||||
workMoment.AtUserList[i] = &apiStruct.WorkMomentUser{
|
workMoment.AtUserList[i] = &api.WorkMomentUser{
|
||||||
UserID: atUser.UserID,
|
UserID: atUser.UserID,
|
||||||
UserName: atUser.UserName,
|
UserName: atUser.UserName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for i, permissionUser := range v.PermissionUserList {
|
for i, permissionUser := range v.PermissionUserList {
|
||||||
workMoment.PermissionUserList[i] = &apiStruct.WorkMomentUser{
|
workMoment.PermissionUserList[i] = &api.WorkMomentUser{
|
||||||
UserID: permissionUser.UserID,
|
UserID: permissionUser.UserID,
|
||||||
UserName: permissionUser.UserName,
|
UserName: permissionUser.UserName,
|
||||||
}
|
}
|
||||||
@ -529,8 +622,8 @@ func GetUserFriendWorkMoments(c *gin.Context) {
|
|||||||
|
|
||||||
func SetUserWorkMomentsLevel(c *gin.Context) {
|
func SetUserWorkMomentsLevel(c *gin.Context) {
|
||||||
var (
|
var (
|
||||||
req apiStruct.SetUserWorkMomentsLevelReq
|
req api.SetUserWorkMomentsLevelReq
|
||||||
resp apiStruct.SetUserWorkMomentsLevelResp
|
resp api.SetUserWorkMomentsLevelResp
|
||||||
reqPb pbOffice.SetUserWorkMomentsLevelReq
|
reqPb pbOffice.SetUserWorkMomentsLevelReq
|
||||||
respPb *pbOffice.SetUserWorkMomentsLevelResp
|
respPb *pbOffice.SetUserWorkMomentsLevelResp
|
||||||
)
|
)
|
||||||
|
@ -35,7 +35,7 @@ func GetUsersInfoFromCache(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName, req.OperationID)
|
||||||
@ -147,6 +147,18 @@ func GetBlackIDListFromCache(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 获取用户信息
|
||||||
|
// @Description 根据用户列表批量获取用户信息
|
||||||
|
// @Tags 用户相关
|
||||||
|
// @ID GetUsersInfo
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.GetUsersInfoReq true "请求体"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.GetUsersInfoResp
|
||||||
|
// @Failure 500 {object} api.GetUsersInfoResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.GetUsersInfoResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /user/get_users_info [post]
|
||||||
func GetUsersInfo(c *gin.Context) {
|
func GetUsersInfo(c *gin.Context) {
|
||||||
params := api.GetUsersInfoReq{}
|
params := api.GetUsersInfoReq{}
|
||||||
if err := c.BindJSON(¶ms); err != nil {
|
if err := c.BindJSON(¶ms); err != nil {
|
||||||
@ -163,7 +175,7 @@ func GetUsersInfo(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,11 +209,11 @@ func GetUsersInfo(c *gin.Context) {
|
|||||||
|
|
||||||
// @Summary 修改用户信息
|
// @Summary 修改用户信息
|
||||||
// @Description 修改用户信息 userID faceURL等
|
// @Description 修改用户信息 userID faceURL等
|
||||||
// @Tags 用户信息
|
// @Tags 用户相关
|
||||||
// @ID UpdateUserInfo
|
// @ID UpdateUserInfo
|
||||||
// @Accept json
|
// @Accept json
|
||||||
// @Param token header string true "im token"
|
// @Param token header string true "im token"
|
||||||
// @Param req body api.UpdateSelfUserInfoReq true "请求"
|
// @Param req body api.UpdateSelfUserInfoReq true "请求体"
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Success 0 {object} api.UpdateUserInfoResp
|
// @Success 0 {object} api.UpdateUserInfoResp
|
||||||
// @Failure 500 {object} api.UpdateUserInfoResp "errCode为500 一般为服务器内部错误"
|
// @Failure 500 {object} api.UpdateUserInfoResp "errCode为500 一般为服务器内部错误"
|
||||||
@ -223,7 +235,7 @@ func UpdateUserInfo(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.NewInfo(params.OperationID, "UpdateUserInfo args ", req.String())
|
log.NewInfo(params.OperationID, "UpdateUserInfo args ", req.String())
|
||||||
@ -246,6 +258,18 @@ func UpdateUserInfo(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 设置全局免打扰
|
||||||
|
// @Description 设置全局免打扰
|
||||||
|
// @Tags 用户相关
|
||||||
|
// @ID SetGlobalRecvMessageOpt
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.SetGlobalRecvMessageOptReq true "请求体"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.SetGlobalRecvMessageOptResp
|
||||||
|
// @Failure 500 {object} api.SetGlobalRecvMessageOptResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.SetGlobalRecvMessageOptResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /user/set_global_msg_recv_opt [post]
|
||||||
func SetGlobalRecvMessageOpt(c *gin.Context) {
|
func SetGlobalRecvMessageOpt(c *gin.Context) {
|
||||||
params := api.SetGlobalRecvMessageOptReq{}
|
params := api.SetGlobalRecvMessageOptReq{}
|
||||||
if err := c.BindJSON(¶ms); err != nil {
|
if err := c.BindJSON(¶ms); err != nil {
|
||||||
@ -262,7 +286,7 @@ func SetGlobalRecvMessageOpt(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.NewInfo(params.OperationID, "SetGlobalRecvMessageOpt args ", req.String())
|
log.NewInfo(params.OperationID, "SetGlobalRecvMessageOpt args ", req.String())
|
||||||
@ -285,6 +309,18 @@ func SetGlobalRecvMessageOpt(c *gin.Context) {
|
|||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 获取自己的信息
|
||||||
|
// @Description 传入ID获取自己的信息
|
||||||
|
// @Tags 用户相关
|
||||||
|
// @ID GetSelfUserInfo
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.GetSelfUserInfoReq true "请求体"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.GetSelfUserInfoResp
|
||||||
|
// @Failure 500 {object} api.GetSelfUserInfoResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.GetSelfUserInfoResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /user/get_self_user_info [post]
|
||||||
func GetSelfUserInfo(c *gin.Context) {
|
func GetSelfUserInfo(c *gin.Context) {
|
||||||
params := api.GetSelfUserInfoReq{}
|
params := api.GetSelfUserInfoReq{}
|
||||||
if err := c.BindJSON(¶ms); err != nil {
|
if err := c.BindJSON(¶ms); err != nil {
|
||||||
@ -302,7 +338,7 @@ func GetSelfUserInfo(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,6 +372,18 @@ func GetSelfUserInfo(c *gin.Context) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Summary 获取用户在线状态
|
||||||
|
// @Description 获取用户在线状态
|
||||||
|
// @Tags 用户相关
|
||||||
|
// @ID GetUsersOnlineStatus
|
||||||
|
// @Accept json
|
||||||
|
// @Param token header string true "im token"
|
||||||
|
// @Param req body api.GetUsersOnlineStatusReq true "请求体"
|
||||||
|
// @Produce json
|
||||||
|
// @Success 0 {object} api.GetUsersOnlineStatusResp
|
||||||
|
// @Failure 500 {object} api.GetUsersOnlineStatusResp "errCode为500 一般为服务器内部错误"
|
||||||
|
// @Failure 400 {object} api.GetUsersOnlineStatusResp "errCode为400 一般为参数输入错误, token未带上等"
|
||||||
|
// @Router /user/get_users_online_status [post]
|
||||||
func GetUsersOnlineStatus(c *gin.Context) {
|
func GetUsersOnlineStatus(c *gin.Context) {
|
||||||
params := api.GetUsersOnlineStatusReq{}
|
params := api.GetUsersOnlineStatusReq{}
|
||||||
if err := c.BindJSON(¶ms); err != nil {
|
if err := c.BindJSON(¶ms); err != nil {
|
||||||
@ -351,7 +399,7 @@ func GetUsersOnlineStatus(c *gin.Context) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
|
||||||
log.NewError(req.OperationID, errMsg)
|
log.NewError(req.OperationID, errMsg)
|
||||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
|
c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@ type GetUserTagsResp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CreateTagReq struct {
|
type CreateTagReq struct {
|
||||||
TagName string `json:"tagName" binding:"required"`
|
TagName string `json:"tagName" binding:"required"` // tag名称
|
||||||
UserIDList []string `json:"userIDList" binding:"required"`
|
UserIDList []string `json:"userIDList" binding:"required"` // 用户ID列表
|
||||||
OperationID string `json:"operationID" binding:"required"`
|
OperationID string `json:"operationID" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ApiUserInfo struct {
|
type ApiUserInfo struct {
|
||||||
UserID string `json:"userID" binding:"required,min=1,max=64"`
|
UserID string `json:"userID" binding:"required,min=1,max=64" swaggo:"true,用户ID,"`
|
||||||
Nickname string `json:"nickname" binding:"omitempty,min=1,max=64"`
|
Nickname string `json:"nickname" binding:"omitempty,min=1,max=64" swaggo:"true,my id,19"`
|
||||||
FaceURL string `json:"faceURL" binding:"omitempty,max=1024"`
|
FaceURL string `json:"faceURL" binding:"omitempty,max=1024"`
|
||||||
Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"`
|
Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"`
|
||||||
PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"`
|
PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"`
|
||||||
|
@ -12,7 +12,8 @@ type CreateOneWorkMomentResp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type DeleteOneWorkMomentReq struct {
|
type DeleteOneWorkMomentReq struct {
|
||||||
office.DeleteOneWorkMomentReq
|
WorkMomentID string `json:"workMomentID" binding:"required"`
|
||||||
|
OperationID string `json:"operationID" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeleteOneWorkMomentResp struct {
|
type DeleteOneWorkMomentResp struct {
|
||||||
@ -21,7 +22,8 @@ type DeleteOneWorkMomentResp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type LikeOneWorkMomentReq struct {
|
type LikeOneWorkMomentReq struct {
|
||||||
office.LikeOneWorkMomentReq
|
WorkMomentID string `json:"workMomentID" binding:"required"`
|
||||||
|
OperationID string `json:"operationID" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type LikeOneWorkMomentResp struct {
|
type LikeOneWorkMomentResp struct {
|
||||||
@ -30,7 +32,10 @@ type LikeOneWorkMomentResp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type CommentOneWorkMomentReq struct {
|
type CommentOneWorkMomentReq struct {
|
||||||
office.CommentOneWorkMomentReq
|
WorkMomentID string `json:"workMomentID" binding:"required"`
|
||||||
|
ReplyUserID string `json:"replyUserID"`
|
||||||
|
Content string `json:"content" binding:"required"`
|
||||||
|
OperationID string `json:"operationID" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommentOneWorkMomentResp struct {
|
type CommentOneWorkMomentResp struct {
|
||||||
@ -39,7 +44,9 @@ type CommentOneWorkMomentResp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type DeleteCommentReq struct {
|
type DeleteCommentReq struct {
|
||||||
office.DeleteCommentReq
|
WorkMomentID string `json:"workMomentID" binding:"required"`
|
||||||
|
ContentID string `json:"contentID" binding:"required"`
|
||||||
|
OperationID string `json:"operationID" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DeleteCommentResp struct {
|
type DeleteCommentResp struct {
|
||||||
@ -54,7 +61,8 @@ type WorkMomentsUserCommonReq struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetWorkMomentByIDReq struct {
|
type GetWorkMomentByIDReq struct {
|
||||||
office.GetWorkMomentByIDReq
|
WorkMomentID string `json:"workMomentID" binding:"required"`
|
||||||
|
OperationID string `json:"operationID" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type WorkMoment struct {
|
type WorkMoment struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user