作者 tangxvhui
... ... @@ -15,6 +15,58 @@
"application/json"
],
"paths": {
"v1/common/sms/code": {
"post": {
"summary": "短信验证码",
"operationId": "commonSmsCode",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/CommonSmsCodeResposne"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CommonSmsCodeRequest"
}
}
],
"requestBody": {},
"tags": [
"common"
]
}
},
"v1/log/{module}": {
"get": {
"summary": "日志查询",
"operationId": "commonGetLog",
"responses": {
"200": {
"description": "A successful response.",
"schema": {}
}
},
"parameters": [
{
"name": "module",
"in": "path",
"required": true,
"type": "string"
}
],
"requestBody": {},
"tags": [
"common"
]
}
},
"v1/mini/article": {
"post": {
"summary": "小程序创建发布内容",
... ... @@ -667,10 +719,38 @@
]
}
},
"v1/mini/message/business": {
"v1/mini/message/comment": {
"post": {
"summary": "评论消息",
"operationId": "miniComment",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/MessageBusinessResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MessageRequest"
}
}
],
"requestBody": {},
"tags": [
"message"
]
}
},
"v1/mini/message/like": {
"post": {
"summary": "业务消息",
"operationId": "miniBusiness",
"summary": "点赞消息",
"operationId": "miniLike",
"responses": {
"200": {
"description": "A successful response.",
... ... @@ -685,7 +765,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MessageBusinessRequest"
"$ref": "#/definitions/MessageRequest"
}
}
],
... ... @@ -713,7 +793,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MessageSystemRequest"
"$ref": "#/definitions/MessageRequest"
}
}
],
... ... @@ -1069,6 +1149,34 @@
]
}
},
"v1/mini/user/mylike": {
"post": {
"summary": "我点赞的文章或评论",
"operationId": "miniMyLike",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/MiniMyLikeResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MiniMyLikeRequest"
}
}
],
"requestBody": {},
"tags": [
"user"
]
}
},
"v1/mini/user/news": {
"post": {
"summary": "用户快讯",
... ... @@ -1541,6 +1649,90 @@
]
}
},
"v1/system/article_comment/edit": {
"post": {
"summary": "管理后台变更评论",
"operationId": "SystemEditAticleComment",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/SystemEditCommentResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SystemEditCommentRequest"
}
}
],
"requestBody": {},
"tags": [
"comment"
]
}
},
"v1/system/article_comment/edit_show": {
"post": {
"summary": "管理后台变更评论的显示状态",
"operationId": "SystemEditAticleCommentShow",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/SystemEditCommentShowResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SystemEditCommentShowRequest"
}
}
],
"requestBody": {},
"tags": [
"comment"
]
}
},
"v1/system/article_comment/list": {
"post": {
"summary": "管理后台查看所有的评论",
"operationId": "SystemListAticleComment",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/SystemListCommentResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SystemListCommentRequest"
}
}
],
"requestBody": {},
"tags": [
"comment"
]
}
},
"v1/system/article_comment/search": {
"post": {
"summary": "管理后台文章评论列表",
... ... @@ -1597,6 +1789,32 @@
]
}
},
"v1/system/article_comment/{id}": {
"get": {
"summary": "管理后台评论的详情",
"operationId": "SystemGetAticleComment",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/SystemGetCommentResponse"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"requestBody": {},
"tags": [
"comment"
]
}
},
"v1/system/article_tag": {
"post": {
"summary": "后台创建文章标签",
... ... @@ -1755,6 +1973,34 @@
]
}
},
"v1/system/company/positions/search": {
"post": {
"summary": "公司职位搜索",
"operationId": "systemCompanyPositionsSearch",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/CompanyPositionsSearchResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CompanyPositionsSearchRequest"
}
}
],
"requestBody": {},
"tags": [
"company"
]
}
},
"v1/system/company/search": {
"post": {
"summary": "公司搜索",
... ... @@ -2242,34 +2488,6 @@
"user"
]
}
},
"v1/user/mylike": {
"post": {
"summary": "我点赞的文章或评论",
"operationId": "miniMyLike",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/MiniMyLikeResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MiniMyLikeRequest"
}
}
],
"requestBody": {},
"tags": [
"user"
]
}
}
},
"definitions": {
... ... @@ -2724,6 +2942,22 @@
"name"
]
},
"CommonSmsCodeRequest": {
"type": "object",
"properties": {
"phone": {
"type": "string"
}
},
"title": "CommonSmsCodeRequest",
"required": [
"phone"
]
},
"CommonSmsCodeResposne": {
"type": "object",
"title": "CommonSmsCodeResposne"
},
"Company": {
"type": "object",
"properties": {
... ... @@ -2743,6 +2977,11 @@
"logo": {
"type": "string",
"description": " 公司LOGO"
},
"joinedFlag": {
"type": "integer",
"format": "int32",
"description": " 已加入标识(1:已加入 其他:未加入)"
}
},
"title": "Company",
... ... @@ -2750,19 +2989,44 @@
"id",
"name",
"code",
"logo"
"logo",
"joinedFlag"
]
},
"CompanySearchRequest": {
"CompanyPositionsSearchRequest": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int32"
"title": "CompanyPositionsSearchRequest"
},
"size": {
"type": "integer",
"format": "int32"
"CompanyPositionsSearchResponse": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/Position"
}
},
"total": {
"type": "integer",
"format": "int64"
}
},
"title": "CompanyPositionsSearchResponse",
"required": [
"list",
"total"
]
},
"CompanySearchRequest": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int32"
},
"size": {
"type": "integer",
"format": "int32"
},
"flag": {
"type": "integer",
... ... @@ -2777,6 +3041,10 @@
"code": {
"type": "string",
"description": " 按编码搜索"
},
"content": {
"type": "string",
"description": " 按公司名/编码搜索"
}
},
"title": "CompanySearchRequest"
... ... @@ -2822,6 +3090,14 @@
"name": {
"type": "string",
"description": " 部门名称"
},
"userIds": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"description": " 部门下的用户"
}
},
"title": "Department",
... ... @@ -2829,7 +3105,8 @@
"id",
"companyId",
"parentId",
"name"
"name",
"userIds"
]
},
"DepartmentAddRequest": {
... ... @@ -3069,29 +3346,6 @@
"comment"
]
},
"MessageBusinessRequest": {
"type": "object",
"properties": {
"type": {
"type": "integer",
"format": "int32"
},
"page": {
"type": "integer",
"format": "int32"
},
"size": {
"type": "integer",
"format": "int32"
}
},
"title": "MessageBusinessRequest",
"required": [
"type",
"page",
"size"
]
},
"MessageBusinessResponse": {
"type": "object",
"properties": {
... ... @@ -3112,6 +3366,24 @@
"total"
]
},
"MessageRequest": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int32"
},
"size": {
"type": "integer",
"format": "int32"
}
},
"title": "MessageRequest",
"required": [
"page",
"size"
]
},
"MessageSystemItem": {
"type": "object",
"properties": {
... ... @@ -3148,24 +3420,6 @@
"createdAt"
]
},
"MessageSystemRequest": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int32"
},
"size": {
"type": "integer",
"format": "int32"
}
},
"title": "MessageSystemRequest",
"required": [
"page",
"size"
]
},
"MessageSystemResponse": {
"type": "object",
"properties": {
... ... @@ -3555,7 +3809,7 @@
"format": "int32",
"description": " 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式"
},
"Section": {
"section": {
"type": "array",
"items": {
"type": "string"
... ... @@ -3598,7 +3852,7 @@
"required": [
"id",
"template",
"Section",
"section",
"title",
"images",
"whoRead",
... ... @@ -3898,12 +4152,17 @@
"format": "int32",
"description": " 当前人员对文章的点赞标识 (0 没有点赞 1有点赞)"
},
"meFollowFlag": {
"type": "integer",
"format": "int32",
"description": " 当前人员对作者的关注标识 (0 没有关注 1有关注)"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "文章的标签"
"description": " 文章的标签"
}
},
"title": "MiniArticleGetResponse",
... ... @@ -3924,6 +4183,7 @@
"show",
"edit",
"meLoveFlag",
"meFollowFlag",
"tags"
]
},
... ... @@ -4482,6 +4742,10 @@
"type": "string",
"description": " 发布人"
},
"avatar": {
"type": "string",
"description": " 发布人的头像"
},
"images": {
"type": "array",
"items": {
... ... @@ -4503,6 +4767,7 @@
"articleId",
"title",
"author",
"avatar",
"images",
"createdAt",
"meReadFlag"
... ... @@ -4549,12 +4814,7 @@
"title": "MiniSearchArticleRequest",
"required": [
"page",
"size",
"tagCategory",
"tagId",
"beginTime",
"endTime",
"searchWord"
"size"
]
},
"MiniSearchArticleResponse": {
... ... @@ -4604,7 +4864,6 @@
"title": "MiniSetUserLikeRequset",
"required": [
"articleId",
"commentId",
"flag"
]
},
... ... @@ -4678,6 +4937,11 @@
},
"code": {
"type": "string"
},
"isFromQr": {
"type": "boolean",
"format": "boolean",
"description": " true:扫码添加 false:手动查找添加"
}
},
"title": "MiniUserApplyJoinCompanyRequest",
... ... @@ -4688,7 +4952,16 @@
},
"MiniUserApplyJoinCompanyResponse": {
"type": "object",
"title": "MiniUserApplyJoinCompanyResponse"
"properties": {
"token": {
"type": "string",
"description": " x-token"
}
},
"title": "MiniUserApplyJoinCompanyResponse",
"required": [
"token"
]
},
"MiniUserAuditRequest": {
"type": "object",
... ... @@ -4746,6 +5019,9 @@
"size": {
"type": "integer",
"format": "int32"
},
"name": {
"type": "string"
}
},
"title": "MiniUserFollowedSearchRequest"
... ... @@ -5056,6 +5332,18 @@
"comment"
]
},
"Position": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"title": "Position",
"required": [
"name"
]
},
"RoleDeleteRequest": {
"type": "object",
"properties": {
... ... @@ -5554,9 +5842,8 @@
"format": "int64",
"description": " 文章顶层ID"
},
"authorId": {
"type": "integer",
"format": "int64",
"author": {
"type": "string",
"description": " 用户"
},
"show": {
... ... @@ -5579,8 +5866,7 @@
"required": [
"page",
"size",
"articleId",
"topId"
"articleId"
]
},
"SystemArticleCommentSearchResponse": {
... ... @@ -5840,6 +6126,11 @@
"$ref": "#/definitions/ArticleTagItem"
},
"description": "标签"
},
"targetUser": {
"type": "integer",
"format": "int32",
"description": "分发方式 [0分发给所有人、1分发给指定的人]"
}
},
"title": "SystemArticleGetResponse",
... ... @@ -5860,7 +6151,8 @@
"countComment",
"countRead",
"show",
"tags"
"tags",
"targetUser"
]
},
"SystemArticleHistory": {
... ... @@ -6339,6 +6631,344 @@
"targetUser"
]
},
"SystemCommentItem": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": "评论id"
},
"pid": {
"type": "integer",
"format": "int64"
},
"topId": {
"type": "integer",
"format": "int64"
},
"articleId": {
"type": "integer",
"format": "int64",
"description": "对应的文章id"
},
"articleTitle": {
"type": "string",
"description": "文章标题"
},
"fromUserId": {
"type": "integer",
"format": "int64",
"description": "填写评论的人"
},
"fromUser": {
"$ref": "#/definitions/CommentAuthor",
"description": "填写评论的人"
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": "评论的填写时间"
},
"content": {
"type": "string",
"description": "评论的内容"
},
"show": {
"type": "integer",
"format": "int32",
"description": "是否展示 [1显示] [2不显示]"
},
"countReplay": {
"type": "integer",
"format": "int32",
"description": "回复数量"
},
"countUserLove": {
"type": "integer",
"format": "int32",
"description": "用户点赞数量"
},
"countAdminLove": {
"type": "integer",
"format": "int32",
"description": "运营点赞数量"
}
},
"title": "SystemCommentItem",
"required": [
"id",
"pid",
"topId",
"articleId",
"articleTitle",
"fromUserId",
"fromUser",
"createdAt",
"content",
"show",
"countReplay",
"countUserLove",
"countAdminLove"
]
},
"SystemEditCommentRequest": {
"type": "object",
"properties": {
"": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "integer",
"format": "int64"
},
"show": {
"type": "integer",
"format": "int32",
"description": "[1 显示评论] [2: 隐藏评论]"
},
"countAdminLove": {
"type": "integer",
"format": "int32"
}
},
"title": "SystemEditCommentRequest",
"required": [
"id",
"show"
]
},
"SystemEditCommentResponse": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
}
},
"title": "SystemEditCommentResponse",
"required": [
"id"
]
},
"SystemEditCommentShowRequest": {
"type": "object",
"properties": {
"": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
},
"show": {
"type": "integer",
"format": "int32",
"description": "[1 显示评论] [2: 隐藏评论]"
}
},
"title": "SystemEditCommentShowRequest",
"required": [
"id",
"show"
]
},
"SystemEditCommentShowResponse": {
"type": "object",
"properties": {
"id": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
}
}
},
"title": "SystemEditCommentShowResponse",
"required": [
"id"
]
},
"SystemGetCommentRequest": {
"type": "object",
"properties": {
"": {
"type": "integer",
"format": "int64"
},
"id": {
"type": "integer",
"format": "int64"
}
},
"title": "SystemGetCommentRequest",
"required": [
"id"
]
},
"SystemGetCommentResponse": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": "评论id"
},
"pid": {
"type": "integer",
"format": "int64"
},
"topId": {
"type": "integer",
"format": "int64"
},
"articleId": {
"type": "integer",
"format": "int64",
"description": "对应的文章id"
},
"articleTitle": {
"type": "string",
"description": "文章标题"
},
"fromUserId": {
"type": "integer",
"format": "int64",
"description": "填写评论的人"
},
"fromUser": {
"$ref": "#/definitions/CommentAuthor",
"description": "填写评论的人"
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": "评论的填写时间"
},
"sectionContent": {
"type": "string",
"description": "引用的段落内容"
},
"content": {
"type": "string",
"description": " 评论的内容"
},
"show": {
"type": "integer",
"format": "int32",
"description": "是否展示 [1显示] [2不显示]"
},
"countReplay": {
"type": "integer",
"format": "int32",
"description": "回复数量"
},
"countUserLove": {
"type": "integer",
"format": "int32",
"description": "用户点赞数量"
},
"countAdminLove": {
"type": "integer",
"format": "int32",
"description": "运营点赞数量"
}
},
"title": "SystemGetCommentResponse",
"required": [
"id",
"pid",
"topId",
"articleId",
"articleTitle",
"fromUserId",
"fromUser",
"createdAt",
"sectionContent",
"content",
"show",
"countReplay",
"countUserLove",
"countAdminLove"
]
},
"SystemListCommentRequest": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int32"
},
"size": {
"type": "integer",
"format": "int32"
},
"": {
"type": "integer",
"format": "int64"
},
"topId": {
"type": "integer",
"format": "int64",
"description": " 评论的顶层ID"
},
"fromUser": {
"type": "string",
"description": " 用户"
},
"show": {
"type": "integer",
"format": "int32",
"description": " 显示状态"
},
"beginTime": {
"type": "integer",
"format": "int64",
"description": " 填写评论的开始时间"
},
"endTime": {
"type": "integer",
"format": "int64",
"description": " 填写评论的结束时间"
},
"articleTitle": {
"type": "string"
},
"content": {
"type": "string"
}
},
"title": "SystemListCommentRequest",
"required": [
"page",
"size"
]
},
"SystemListCommentResponse": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"format": "int32"
},
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/SystemCommentItem"
}
}
},
"title": "SystemListCommentResponse",
"required": [
"total",
"list"
]
},
"SystemUser": {
"type": "object",
"properties": {
... ... @@ -6579,11 +7209,31 @@
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string",
"description": " 姓名"
},
"roles": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"description": " 权限角色"
},
"enable": {
"type": "integer",
"format": "int32",
"description": " 状态 1:启用 2:禁用"
}
},
"title": "SystemUserAccountUpdateRequest",
"required": [
"id"
"id",
"name",
"roles",
"enable"
]
},
"SystemUserAccountUpdateResponse": {
... ... @@ -6786,8 +7436,7 @@
"required": [
"image",
"name",
"category",
"other"
"category"
]
},
"TagCreateResponse": {
... ... @@ -6868,8 +7517,7 @@
"id",
"image",
"name",
"category",
"other"
"category"
]
},
"TagEditResponse": {
... ... @@ -7164,6 +7812,10 @@
"type": "string",
"description": " 公司编码(邀请码)"
},
"companyLogo": {
"$ref": "#/definitions/string",
"description": " 公司LOGO"
},
"flag": {
"type": "integer",
"format": "int32",
... ... @@ -7174,7 +7826,7 @@
"description": " 名称"
},
"avatar": {
"type": "string",
"$ref": "#/definitions/string",
"description": " 头像"
},
"phone": {
... ... @@ -7229,6 +7881,7 @@
"companyId",
"companyName",
"companyCode",
"companyLogo",
"flag",
"name",
"avatar",
... ... @@ -7271,6 +7924,17 @@
"type": "boolean",
"format": "boolean",
"description": " 已读标识 true:已读 false:未读"
},
"images": {
"type": "array",
"items": {
"type": "string"
},
"description": " 图片列表"
},
"author": {
"$ref": "#/definitions/UserItem",
"description": " 作者"
}
},
"title": "UserNewsItem",
... ... @@ -7280,7 +7944,9 @@
"title",
"summary",
"time",
"readFlag"
"readFlag",
"images",
"author"
]
},
"UserSearchRequest": {
... ...
package user
import (
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/contextdata"
"gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result"
"net/http"
... ... @@ -17,7 +18,8 @@ func MiniUserStatisticsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
httpx.ErrorCtx(r.Context(), w, err)
return
}
userToken := contextdata.GetUserTokenFromCtx(r.Context())
req.UserId = userToken.UserId
l := user.NewSystemUserStatisticsLogic(r.Context(), svcCtx)
resp, err := l.SystemUserStatistics(&req)
result.HttpResult(r, w, resp, err)
... ...