From f4264eccb12d8fc84e2ea367955ed38abd431605 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Tue, 3 Dec 2024 18:45:03 +0800 Subject: [PATCH] update --- app/hdl/comm/hdl_comm.go | 8 +- app/hdl/friend_circle/hdl_basic.go | 94 +++ app/hdl/friend_circle/hdl_black_list.go | 154 +++++ app/hdl/friend_circle/hdl_dynamic.go | 303 +++++++++ app/md/friend_circle/md_basic.go | 17 + app/md/friend_circle/md_black_list.go | 38 ++ app/md/friend_circle/md_dynamic.go | 55 ++ app/router/router.go | 29 +- app/svc/friend_circle/svc_black_list.go | 29 + docs/docs.go | 841 ++++++++++++++++++++++-- docs/swagger.json | 841 ++++++++++++++++++++++-- docs/swagger.yaml | 552 +++++++++++++++- go.mod | 4 +- 13 files changed, 2831 insertions(+), 134 deletions(-) create mode 100644 app/hdl/friend_circle/hdl_basic.go create mode 100644 app/hdl/friend_circle/hdl_black_list.go create mode 100644 app/hdl/friend_circle/hdl_dynamic.go create mode 100644 app/md/friend_circle/md_basic.go create mode 100644 app/md/friend_circle/md_black_list.go create mode 100644 app/md/friend_circle/md_dynamic.go create mode 100644 app/svc/friend_circle/svc_black_list.go diff --git a/app/hdl/comm/hdl_comm.go b/app/hdl/comm/hdl_comm.go index ed93845..b448e9c 100644 --- a/app/hdl/comm/hdl_comm.go +++ b/app/hdl/comm/hdl_comm.go @@ -202,15 +202,15 @@ type GetSTSVoucherResp struct { } // GetSTSVoucher -// @Summary 通用请求-对象存储-STS临时访问凭证(获取) -// @Tags 对象存储 +// @Summary 通用请求-打包机使用-STS临时访问凭证(获取) +// @Tags 打包机使用 // @Description STS临时访问凭证(获取) // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" // @Success 200 {object} comm.GetSTSVoucherResp "凭证及其他信息" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/comm/getSTSVoucher [GET] +// @Router /api/getSTSVoucher [GET] func GetSTSVoucher(c *gin.Context) { redisConn := cache.GetPool().Get() sysCfgDb := implement.NewSysCfgDb(db.Db, redisConn) @@ -269,7 +269,7 @@ func GetSTSVoucher(c *gin.Context) { } bucket := cfgMap[enum2.AliyunOssBucketName] - region := strings.Split(bucket, ".")[0] + region := strings.Split(endpoint, ".")[0] resp := GetSTSVoucherResp{ STSToken: credentials, diff --git a/app/hdl/friend_circle/hdl_basic.go b/app/hdl/friend_circle/hdl_basic.go new file mode 100644 index 0000000..96e0429 --- /dev/null +++ b/app/hdl/friend_circle/hdl_basic.go @@ -0,0 +1,94 @@ +package friend_circle + +import ( + "applet/app/db" + "applet/app/e" + md "applet/app/md/friend_circle" + "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" + "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + "github.com/gin-gonic/gin" + "time" +) + +// GetFriendCircleBasicSettings +// @Summary 社交管理-动态设置-基础设置(获取) +// @Tags 动态设置 +// @Description 基础设置(获取) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Success 200 {object} md.GetFriendCircleBasicSettingsResp "具体数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/friendCircleSettings/basic/index [GET] +func GetFriendCircleBasicSettings(c *gin.Context) { + basicDb := implement.NewEggFriendCircleBasicDb(db.Db) + basic, err := basicDb.EggFriendCircleBasicGetOne() + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if basic == nil { + now := time.Now() + m := model.EggFriendCircleBasic{ + CommentIsRealName: 1, + PublishIsRealName: 1, + CommentNumsEveryDay: 0, + PublishNumsEveryDay: 0, + CreateAt: now.Format("2006-01-02 15:04:05"), + UpdateAt: now.Format("2006-01-02 15:04:05"), + } + _, err := basicDb.EggFriendCircleBasicInsert(&m) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + basic, err = basicDb.EggFriendCircleBasicGetOne() + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + } + resp := md.GetFriendCircleBasicSettingsResp{ + Id: basic.Id, + CommentIsRealName: basic.CommentIsRealName, + PublishIsRealName: basic.PublishIsRealName, + CommentNumsEveryDay: basic.CommentNumsEveryDay, + PublishNumsEveryDay: basic.PublishNumsEveryDay, + } + + e.OutSuc(c, resp, nil) +} + +// UpdateFriendCircleBasicSettings +// @Summary 社交管理-动态设置-基础设置(更新) +// @Tags 动态设置 +// @Description 基础设置(更新) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.UpdateFriendCircleBasicSettingsReq true "id 必填" +// @Success 200 {int} "修改数据条数" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/friendCircleSettings/basic/save [POST] +func UpdateFriendCircleBasicSettings(c *gin.Context) { + var req *md.UpdateFriendCircleBasicSettingsReq + if err := c.ShouldBindJSON(&req); err != nil { + e.OutErr(c, e.ERR_INVALID_ARGS, err) + return + } + m := model.EggFriendCircleBasic{ + Id: req.Id, + CommentIsRealName: req.CommentIsRealName, + PublishIsRealName: req.PublishIsRealName, + CommentNumsEveryDay: req.CommentNumsEveryDay, + PublishNumsEveryDay: req.PublishNumsEveryDay, + } + columns := []string{"publish_nums_every_day", "comment_nums_every_day", "publish_is_real_name", "comment_is_real_name"} + basicDb := implement.NewEggFriendCircleBasicDb(db.Db) + affected, err := basicDb.UpdateEggFriendCircleBasic(&m, columns...) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + e.OutSuc(c, affected, nil) +} diff --git a/app/hdl/friend_circle/hdl_black_list.go b/app/hdl/friend_circle/hdl_black_list.go new file mode 100644 index 0000000..852f757 --- /dev/null +++ b/app/hdl/friend_circle/hdl_black_list.go @@ -0,0 +1,154 @@ +package friend_circle + +import ( + "applet/app/db" + "applet/app/e" + md "applet/app/md/friend_circle" + "applet/app/svc" + svc2 "applet/app/svc/friend_circle" + "applet/app/utils" + "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" + "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + "github.com/gin-gonic/gin" + "time" +) + +// GetBlackList +// @Summary 社交管理-动态设置-黑名单(获取) +// @Tags 动态设置 +// @Description 黑名单(获取) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param limit query int true "每页大小" +// @Param page query int true "页数" +// @Param phone query int true "手机号" +// @Param nickname query int true "用户名" +// @Param uid query int true "用户id" +// @Success 200 {object} md.GetBlackListResp "具体数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/friendCircleSettings/blackList/index [GET] +func GetBlackList(c *gin.Context) { + pageStr := c.DefaultQuery("page", "1") + limitStr := c.DefaultQuery("limit", "10") + phone := c.Query("phone") + nickname := c.Query("nickname") + uid := c.Query("uid") + + page := utils.StrToInt(pageStr) + limit := utils.StrToInt(limitStr) + + blackList, total, err2 := svc2.GetBlackList(page, limit, phone, nickname, uid) + if err2 != nil { + e.OutErr(c, e.ERR_DB_ORM, err2.Error()) + return + } + + adminIds := make([]int, 0, len(blackList)) + for _, list := range blackList { + adminIds = append(adminIds, list.AdmId) + } + adminDb := implement.NewAdminDb(db.Db) + admins, err := adminDb.AdminFindByParams(map[string]interface{}{ + "key": "adm_id", + "value": adminIds, + }) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, nil) + return + } + adminMap := make(map[int]model.Admin, len(admins)) + for _, admin := range admins { + adminMap[admin.AdmId] = admin + } + list := make([]md.GetBlackListNode, 0, len(blackList)) + for _, black := range blackList { + node := md.GetBlackListNode{ + BlackListId: black.Id, + Memo: black.Memo, + Uid: black.Uid, + UserNickname: black.UserNickname, + AdminId: black.AdmId, + AdminNickname: adminMap[black.AdmId].Username, + CreatedAt: black.CreateAt, + } + list = append(list, node) + } + resp := md.GetBlackListResp{ + List: list, + Paginate: md.Paginate{ + Limit: limit, + Page: page, + Total: total, + }, + } + e.OutSuc(c, resp, nil) +} + +// AddBlackList +// @Summary 社交管理-动态设置-黑名单(新增) +// @Tags 动态设置 +// @Description 黑名单(新增) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.AddBlackListReq true "用户id 必填" +// @Success 200 {string} "生成的黑名单id" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/friendCircleSettings/blackList/add [POST] +func AddBlackList(c *gin.Context) { + var req md.AddBlackListReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = svc.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + + admin := svc.GetUser(c) + now := time.Now() + blackList := model.EggFriendCircleUserBlackList{ + Uid: req.Uid, + AdmId: admin.AdmId, + Memo: req.Memo, + CreateAt: now.Format("2006-01-02 15:04:05"), + UpdateAt: now.Format("2006-01-02 15:04:05"), + } + blackListDb := implement.NewEggFriendCircleUserBlackListDb(db.Db) + blackListId, err := blackListDb.EggFriendCircleUserBlackListInsert(&blackList) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, nil) + return + } + e.OutSuc(c, blackListId, nil) +} + +// DeleteBlackList +// @Summary 社交管理-动态设置-黑名单(删除) +// @Tags 动态设置 +// @Description 黑名单(删除) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.DeleteBlackListReq true "黑名单id 必填" +// @Success 200 {string} "删除数据数量" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/friendCircleSettings/blackList/del [DELETE] +func DeleteBlackList(c *gin.Context) { + var req md.DeleteBlackListReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = svc.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + blackListDb := implement.NewEggFriendCircleUserBlackListDb(db.Db) + affected, err := blackListDb.EggFriendCircleUserBlackListDeleteById(req.BlackListId) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, nil) + return + } + e.OutSuc(c, affected, nil) +} diff --git a/app/hdl/friend_circle/hdl_dynamic.go b/app/hdl/friend_circle/hdl_dynamic.go new file mode 100644 index 0000000..c29776f --- /dev/null +++ b/app/hdl/friend_circle/hdl_dynamic.go @@ -0,0 +1,303 @@ +package friend_circle + +import ( + "applet/app/db" + "applet/app/e" + md "applet/app/md/friend_circle" + "applet/app/svc" + "applet/app/utils" + "applet/app/utils/cache" + "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" + md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/md" + svc2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/svc" + "code.fnuoos.com/go_rely_warehouse/zyos_go_es.git/es" + "context" + "encoding/json" + "fmt" + "github.com/gin-gonic/gin" + "github.com/olivere/elastic/v7" + "time" +) + +// GetDynamic +// @Summary 社交管理-动态设置-动态(获取) +// @Tags 动态设置 +// @Description 动态(获取) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.GetDynamicReq false "筛选条件" +// @Success 200 {object} md.GetDynamicResp "生成的黑名单id" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/friendCircleSettings/dynamic/index [POST] +func GetDynamic(c *gin.Context) { + var req md.GetDynamicReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = svc.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + + var userIds []int64 + if req.Nickname != "" { + var users []md.UserIdsGetFromNickname + nickname := "%" + req.Nickname + "%" + err = db.Db.Table("user").Where("nickname like ?", nickname).Find(&users) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + for _, user := range users { + userIds = append(userIds, user.Id) + } + } + + if req.Uid != "" { + uid := utils.StrToInt64(req.Uid) + userIds = append(userIds, uid) + } + + if req.Page == 0 { + req.Page = 1 + } + if req.Limit == 0 { + req.Limit = 10 + } + + aliasName := md2.EggFriendCircleEsAlias + boolQuery := elastic.NewBoolQuery() + if userIds != nil { + boolQuery.Filter(elastic.NewTermsQuery("uid", userIds)) + } + if req.BeginAt != "" && req.EndAt != "" { + boolQuery.Filter(elastic.NewRangeQuery("created_at").Gte(req.BeginAt).Lte(req.EndAt).Format("yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis")) + } + searchResult, err := es.EsClient.Search(). + Index(aliasName). + Query(boolQuery). + From((req.Page-1)*req.Limit).Size(req.Limit). + Sort("created_at", true). + Pretty(true). + Do(context.Background()) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + + var docs []md.EggFriendCircleNode + var docUserIds []int64 + var total int64 + // 检查是否有结果 + if searchResult.Hits.TotalHits.Value != 0 { + // 解析结果 + total = searchResult.Hits.TotalHits.Value + for _, hit := range searchResult.Hits.Hits { + var doc md.EggFriendCircleNode + err = json.Unmarshal(hit.Source, &doc) + if err != nil { + return + } + docUserIds = append(docUserIds, doc.Uid) + docs = append(docs, doc) + } + } + + adminDb := implement.NewAdminDb(db.Db) + admins, err := adminDb.AdminFindByParams(map[string]interface{}{ + "key": "adm_id", + "value": docUserIds, + }) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + adminMap := make(map[int64]string) + for _, admin := range admins { + adminMap[int64(admin.AdmId)] = admin.Username + } + + userDb := implement.NewUserDb(db.Db) + users, err := userDb.UserFindByParams(map[string]interface{}{ + "key": "id", + "value": docUserIds, + }) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + userMap := make(map[int64]string) + for _, user := range users { + userMap[user.Id] = user.Nickname + } + redisConn := cache.GetPool().Get() + scheme, domain := svc2.ImageBucket(db.Db, redisConn) + for _, doc := range docs { + switch doc.Kind { + case 1: + doc.Username = userMap[doc.Uid] + case 2: + doc.Username = adminMap[doc.Uid] + + } + doc.Image = svc2.ImageFormatWithBucket(scheme, domain, doc.Image) + doc.Video = svc2.ImageFormatWithBucket(scheme, domain, doc.Video) + } + + resp := md.GetDynamicResp{ + List: docs, + Paginate: md.Paginate{ + Limit: req.Limit, + Page: req.Page, + Total: total, + }, + } + e.OutSuc(c, resp, nil) +} + +// UpdateDynamic +// @Summary 社交管理-动态设置-动态(更新) +// @Tags 动态设置 +// @Description 动态(更新) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.UpdateDynamicReq true "更新动态id必填" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/friendCircleSettings/dynamic/update [POST] +func UpdateDynamic(c *gin.Context) { + var req md.UpdateDynamicReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = svc.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + updateMap := make(map[string]interface{}) + if req.State != 0 { + updateMap["state"] = req.State + } + if req.IsTopUp != 0 { + updateMap["is_top_up"] = req.IsTopUp + } + if req.IsPraise != 0 { + updateMap["is_praise"] = req.IsPraise + } + + aliasName := md2.EggFriendCircleEsAlias + _, err = es.EsClient.Update(). + Index(aliasName). + Id(req.IndexId). + Doc(updateMap). + Do(context.Background()) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + + e.OutSuc(c, "success", nil) +} + +// DeleteDynamic +// @Summary 社交管理-动态设置-动态(删除) +// @Tags 动态设置 +// @Description 动态(删除) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.DeleteDynamicReq true "删除动态id必填" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/friendCircleSettings/dynamic/del [DELETE] +func DeleteDynamic(c *gin.Context) { + var req md.DeleteDynamicReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = svc.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + + aliasName := md2.EggFriendCircleEsAlias + _, err = es.EsClient.Delete(). + Index(aliasName). + Id(req.IndexId). + Do(context.Background()) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + + e.OutSuc(c, "success", nil) +} + +// ReleaseDynamic +// @Summary 社交管理-动态设置-动态(发布) +// @Tags 动态设置 +// @Description 动态(发布) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.ReleaseDynamicReq true "发布动态信息" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/friendCircleSettings/dynamic/release [POST] +func ReleaseDynamic(c *gin.Context) { + var req md.ReleaseDynamicReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = svc.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + + user := svc.GetUser(c) + if req.State == 0 { + req.State = 1 + } + if req.Kind == 0 { + req.Kind = 1 + } + if req.IsPraise == 0 { + req.IsPraise = 2 + } + if req.IsTopUp == 0 { + req.IsTopUp = 2 + } + + now := time.Now() + m := md2.EggFriendCircleEs{ + Uid: int64(user.AdmId), + Kind: req.Kind, + Content: req.Content, + Image: req.Image, + Video: req.Video, + LikesNums: 0, + ShareNums: 0, + CommentNums: 0, + State: req.State, + IsTopUp: req.IsTopUp, + IsPraise: req.IsPraise, + CreatedAt: now.Format("2006-01-02 15:04:05"), + UpdatedAt: now.Format("2006-01-02 15:04:05"), + } + id := fmt.Sprintf("%d-%d", now.Unix(), user.AdmId) + + aliasName := md2.EggFriendCircleEsAlias + _, err = es.EsClient.Index(). + Index(aliasName). + Id(id). + BodyJson(m). + Do(context.Background()) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + + e.OutSuc(c, "success", nil) +} diff --git a/app/md/friend_circle/md_basic.go b/app/md/friend_circle/md_basic.go new file mode 100644 index 0000000..7329ea9 --- /dev/null +++ b/app/md/friend_circle/md_basic.go @@ -0,0 +1,17 @@ +package md + +type GetFriendCircleBasicSettingsResp struct { + Id int `json:"id"` + CommentIsRealName int `json:"comment_is_real_name"` // 评论是否需要实名认证(1:是 2:否) + PublishIsRealName int `json:"publish_is_real_name"` // 发布是否需要实名认证(1:是 2:否) + CommentNumsEveryDay int `json:"comment_nums_every_day"` // 评论每天次数 + PublishNumsEveryDay int `json:"publish_nums_every_day"` // 发布每天次数 +} + +type UpdateFriendCircleBasicSettingsReq struct { + Id int `json:"id,required"` + CommentIsRealName int `json:"comment_is_real_name"` // 评论是否需要实名认证(1:是 2:否) + PublishIsRealName int `json:"publish_is_real_name"` // 发布是否需要实名认证(1:是 2:否) + CommentNumsEveryDay int `json:"comment_nums_every_day"` // 评论每天次数 + PublishNumsEveryDay int `json:"publish_nums_every_day"` // 发布每天次数 +} diff --git a/app/md/friend_circle/md_black_list.go b/app/md/friend_circle/md_black_list.go new file mode 100644 index 0000000..f95a0cf --- /dev/null +++ b/app/md/friend_circle/md_black_list.go @@ -0,0 +1,38 @@ +package md + +import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + +type Paginate struct { + Limit int `json:"limit"` // 每页大小 + Page int `json:"page"` // 页数 + Total int64 `json:"total"` // 总数据量 +} + +type GetBlackListNode struct { + BlackListId int `json:"black_list_id"` // 黑名单 id + Memo string `json:"memo"` // 备注 + Uid int64 `json:"uid"` // 用户 id + UserNickname string `json:"user_nickname"` // 用户名称 + AdminId int `json:"admin_id"` // 管理员 id + AdminNickname string `json:"admin_nickname"` // 管理员名称 + CreatedAt string `json:"created_at"` // 添加时间 +} + +type GetBlackListResp struct { + List []GetBlackListNode `json:"list"` // 具体信息 + Paginate Paginate `json:"paginate"` // 分页信息 +} + +type AddBlackListReq struct { + Uid int64 `json:"uid,required"` // 用户 id + Memo string `json:"memo"` // 备注 +} + +type DeleteBlackListReq struct { + BlackListId int `json:"id,required"` // 黑名单 id +} + +type BlackListInfo struct { + model.EggFriendCircleUserBlackList `xorm:"extends"` + UserNickname string `xorm:"user.nickname"` +} diff --git a/app/md/friend_circle/md_dynamic.go b/app/md/friend_circle/md_dynamic.go new file mode 100644 index 0000000..b8a2017 --- /dev/null +++ b/app/md/friend_circle/md_dynamic.go @@ -0,0 +1,55 @@ +package md + +type GetDynamicReq struct { + BeginAt string `json:"begin_at"` // 开始时间 + EndAt string `json:"end_at"` // 结束时间 + Uid string `json:"uid"` // 创建人id + Nickname string `json:"nickname"` // 创建人名称 + Page int `json:"page"` // 页数 + Limit int `json:"limit"` // 页面大小 +} + +type UserIdsGetFromNickname struct { + Id int64 `xorm:"id"` +} + +type EggFriendCircleNode struct { + IndexId string `json:"index_id"` // 动态id + Uid int64 `json:"uid" label:"uid"` // 用户id + Username string `json:"username"` // 用户名称 + Kind int32 `json:"kind" label:"类型(1:普通 2:官方)"` // 类型(1:普通 2:官方) + Content string `json:"content" label:"文本内容"` // 文本内容 + Image string `json:"image" label:"图片"` // 图片 + Video string `json:"video" label:"视频"` // 视频 + State int32 `json:"state" label:"状态(1:正常 2:隐藏)"` // 状态(1:正常 2:隐藏) + IsTopUp int32 `json:"is_top_up" label:"是否置顶(1:是 2:否)"` // 是否置顶(1:是 2:否) + IsPraise int32 `json:"is_praise" label:"是否被表扬(1:是 2:否)"` // 是否被表扬(1:是 2:否) + CreatedAt string `json:"created_at"` + UpdatedAt string `json:"updated_at"` +} + +type GetDynamicResp struct { + List []EggFriendCircleNode `json:"list"` + Paginate Paginate `json:"paginate"` // 分页信息 +} + +type UpdateDynamicReq struct { + IndexId string `json:"index_id,required"` // 动态id + State int32 `json:"state" label:"状态(1:正常 2:隐藏)"` // 状态(1:正常 2:隐藏) + IsTopUp int32 `json:"is_top_up" label:"是否置顶(1:是 2:否)"` // 是否置顶(1:是 2:否) + IsPraise int32 `json:"is_praise" label:"是否被表扬(1:是 2:否)"` // 是否被表扬(1:是 2:否) +} + +type DeleteDynamicReq struct { + IndexId string `json:"index_id"` // 动态id +} + +type ReleaseDynamicReq struct { + Kind int32 `json:"kind"` // 类型(1:普通 2:官方) + Content string `json:"content"` // 文本内容 + Image string `json:"image"` // 图片 uri + Video string `json:"video"` // 视频 uri + State int32 `json:"state"` // 状态(1:正常 2:隐藏) + IsTopUp int32 `json:"is_top_up"` // 是否置顶(1:是 2:否) + IsPraise int32 `json:"is_praise"` // 是否被表扬(1:是 2:否) +} diff --git a/app/router/router.go b/app/router/router.go index 93b415d..b6a0aeb 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -8,6 +8,7 @@ import ( "applet/app/hdl/cloud_bundle" "applet/app/hdl/comm" "applet/app/hdl/financial_center" + "applet/app/hdl/friend_circle" "applet/app/hdl/im" "applet/app/hdl/institutional_management/egg_energy" "applet/app/hdl/institutional_management/module_setting" @@ -68,6 +69,7 @@ func route(r *gin.RouterGroup) { r.GET("/cloudBundle/base", cloud_bundle.Base) //打包基本信息 r.GET("/cloudBundle/update/state", cloud_bundle.UpdateState) //打包更新状态 r.GET("/cloudBundle/upload", cloud_bundle.Upload) //打包 上传apk + r.GET("/getSTSVoucher", comm.GetSTSVoucher) // 获取 STS 凭证 } r.Use(mw.Auth) // 以下接口需要JWT验证 rComm(r.Group("/comm")) @@ -84,8 +86,9 @@ func route(r *gin.RouterGroup) { rNotice(r.Group("/notice")) rArticle(r.Group("/article")) rUserFeedback(r.Group("/userFeedback")) - rCloudBundle(r.Group("/cloudBundle")) //云打包 - rUserRealName(r.Group("/userRealName")) //实名认证 + rCloudBundle(r.Group("/cloudBundle")) //云打包 + rUserRealName(r.Group("/userRealName")) //实名认证 + rFriendCircleSettings(r.Group("/friendCircleSettings")) // 朋友圈设置 } func rSettCenter(r *gin.RouterGroup) { //设置中心 @@ -335,8 +338,28 @@ func rFinancialCenter(r *gin.RouterGroup) { } } +func rFriendCircleSettings(r *gin.RouterGroup) { + rBasic := r.Group("/basic") + { + rBasic.GET("/index", friend_circle.GetFriendCircleBasicSettings) + rBasic.POST("/save", friend_circle.UpdateFriendCircleBasicSettings) + } + rBlackList := r.Group("/blackList") + { + rBlackList.GET("/index", friend_circle.GetBlackList) + rBlackList.POST("/add", friend_circle.AddBlackList) + rBlackList.DELETE("/del", friend_circle.DeleteBlackList) + } + rDynamic := r.Group("/dynamic") + { + rDynamic.POST("/index", friend_circle.GetDynamic) + rDynamic.POST("/update", friend_circle.UpdateDynamic) + rDynamic.DELETE("/del", friend_circle.DeleteDynamic) + rDynamic.POST("/release", friend_circle.ReleaseDynamic) + } +} + func rComm(r *gin.RouterGroup) { r.POST("/getMenuList", comm.MenuList) // 获取菜单栏列表 r.POST("/getOssUrl", comm.GetOssUrl) // 获取阿里云上传PutObject所需的签名URL - r.GET("/getSTSVoucher", comm.GetSTSVoucher) } diff --git a/app/svc/friend_circle/svc_black_list.go b/app/svc/friend_circle/svc_black_list.go new file mode 100644 index 0000000..1bd4783 --- /dev/null +++ b/app/svc/friend_circle/svc_black_list.go @@ -0,0 +1,29 @@ +package svc + +import ( + "applet/app/db" + md "applet/app/md/friend_circle" +) + +func GetBlackList(page, limit int, phone, nickname, uid string) ([]md.BlackListInfo, int64, error) { + blackLists := make([]md.BlackListInfo, 0) + session := db.Db.Table("egg_friend_circle_user_black_list").Alias("black"). + Join("LEFT OUTER", "user", "black.uid = user.id") + if phone != "" { + phone = "%" + phone + "%" + session.Where("user.phone like ?", phone) + } + if nickname != "" { + nickname = "%" + nickname + "%" + session.Where("nickname like ?", nickname) + } + if uid != "" { + uid = "%" + uid + "%" + session.Where("uid like ?", uid) + } + total, err := session.Limit(limit, (page-1)*limit).FindAndCount(&blackLists) + if err != nil { + return nil, 0, err + } + return blackLists, total, nil +} diff --git a/docs/docs.go b/docs/docs.go index 961474d..28a0395 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1342,9 +1342,9 @@ const docTemplate = `{ } } }, - "/api/comm/getSTSVoucher": { + "/api/config": { "get": { - "description": "STS临时访问凭证(获取)", + "description": "基本配置", "consumes": [ "application/json" ], @@ -1352,9 +1352,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "对象存储" + "基本配置" ], - "summary": "通用请求-对象存储-STS临时访问凭证(获取)", + "summary": "基本配置", "parameters": [ { "type": "string", @@ -1366,9 +1366,9 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "凭证及其他信息", + "description": "具体数据", "schema": { - "$ref": "#/definitions/comm.GetSTSVoucherResp" + "$ref": "#/definitions/md.ConfigResp" } }, "400": { @@ -1380,9 +1380,94 @@ const docTemplate = `{ } } }, - "/api/config": { + "/api/demo": { + "post": { + "description": "Demo样例测试", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Demo" + ], + "summary": "Demo测试", + "parameters": [ + { + "description": "用户名密码", + "name": "req", + "in": "body", + "required": true, + "schema": {} + } + ], + "responses": { + "200": { + "description": "token", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/financialCenter/withdraw/applyList": { + "post": { + "description": "提现申请列表(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "提现" + ], + "summary": "财务中心-提现-提现申请列表(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "筛选条件", + "name": "req", + "in": "body", + "schema": { + "$ref": "#/definitions/md.GetWithdrawApplyListReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.GetWithdrawApplyListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/financialCenter/withdraw/setting": { "get": { - "description": "基本配置", + "description": "基础设置(获取)", "consumes": [ "application/json" ], @@ -1390,9 +1475,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "基本配置" + "提现" ], - "summary": "基本配置", + "summary": "财务中心-提现-基础设置(获取)", "parameters": [ { "type": "string", @@ -1406,7 +1491,7 @@ const docTemplate = `{ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.ConfigResp" + "$ref": "#/definitions/md.GetWithdrawSettingResp" } }, "400": { @@ -1418,9 +1503,9 @@ const docTemplate = `{ } } }, - "/api/demo": { + "/api/financialCenter/withdraw/updateWithdrawSetting": { "post": { - "description": "Demo样例测试", + "description": "基础设置(更新)", "consumes": [ "application/json" ], @@ -1428,24 +1513,32 @@ const docTemplate = `{ "application/json" ], "tags": [ - "Demo" + "提现" ], - "summary": "Demo测试", + "summary": "财务中心-提现-基础设置(更新)", "parameters": [ { - "description": "用户名密码", + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "id 必填", "name": "req", "in": "body", "required": true, - "schema": {} + "schema": { + "$ref": "#/definitions/md.UpdateWithdrawSettingReq" + } } ], "responses": { "200": { - "description": "token", + "description": "修改数据条数", "schema": { - "type": "object", - "additionalProperties": true + "type": "int" } }, "400": { @@ -1457,9 +1550,47 @@ const docTemplate = `{ } } }, - "/api/financialCenter/withdraw/applyList": { + "/api/friendCircleSettings/basic/index": { + "get": { + "description": "基础设置(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-基础设置(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.GetFriendCircleBasicSettingsResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/basic/save": { "post": { - "description": "提现申请列表(获取)", + "description": "基础设置(更新)", "consumes": [ "application/json" ], @@ -1467,9 +1598,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "提现" + "动态设置" ], - "summary": "财务中心-提现-提现申请列表(获取)", + "summary": "社交管理-动态设置-基础设置(更新)", "parameters": [ { "type": "string", @@ -1479,19 +1610,20 @@ const docTemplate = `{ "required": true }, { - "description": "筛选条件", + "description": "id 必填", "name": "req", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/md.GetWithdrawApplyListReq" + "$ref": "#/definitions/md.UpdateFriendCircleBasicSettingsReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "修改数据条数", "schema": { - "$ref": "#/definitions/md.GetWithdrawApplyListResp" + "type": "int" } }, "400": { @@ -1503,9 +1635,316 @@ const docTemplate = `{ } } }, - "/api/financialCenter/withdraw/setting": { + "/api/friendCircleSettings/blackList/add": { + "post": { + "description": "黑名单(新增)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-黑名单(新增)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "用户id 必填", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AddBlackListReq" + } + } + ], + "responses": { + "200": { + "description": "生成的黑名单id", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/blackList/del": { + "delete": { + "description": "黑名单(删除)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-黑名单(删除)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "黑名单id 必填", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.DeleteBlackListReq" + } + } + ], + "responses": { + "200": { + "description": "删除数据数量", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/blackList/index": { "get": { - "description": "基础设置(获取)", + "description": "黑名单(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-黑名单(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "每页大小", + "name": "limit", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "页数", + "name": "page", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "手机号", + "name": "phone", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "用户名", + "name": "nickname", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "用户id", + "name": "uid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.GetBlackListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/dynamic/del": { + "delete": { + "description": "动态(删除)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-动态(删除)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "删除动态id必填", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.DeleteDynamicReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/dynamic/index": { + "post": { + "description": "动态(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-动态(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "筛选条件", + "name": "req", + "in": "body", + "schema": { + "$ref": "#/definitions/md.GetDynamicReq" + } + } + ], + "responses": { + "200": { + "description": "生成的黑名单id", + "schema": { + "$ref": "#/definitions/md.GetDynamicResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/dynamic/release": { + "post": { + "description": "动态(发布)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-动态(发布)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "发布动态信息", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.ReleaseDynamicReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/dynamic/update": { + "post": { + "description": "动态(更新)", "consumes": [ "application/json" ], @@ -1513,9 +1952,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "提现" + "动态设置" ], - "summary": "财务中心-提现-基础设置(获取)", + "summary": "社交管理-动态设置-动态(更新)", "parameters": [ { "type": "string", @@ -1523,13 +1962,22 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "更新动态id必填", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateDynamicReq" + } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", "schema": { - "$ref": "#/definitions/md.GetWithdrawSettingResp" + "type": "string" } }, "400": { @@ -1541,9 +1989,9 @@ const docTemplate = `{ } } }, - "/api/financialCenter/withdraw/updateWithdrawSetting": { - "post": { - "description": "基础设置(更新)", + "/api/getSTSVoucher": { + "get": { + "description": "STS临时访问凭证(获取)", "consumes": [ "application/json" ], @@ -1551,9 +1999,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "提现" + "打包机使用" ], - "summary": "财务中心-提现-基础设置(更新)", + "summary": "通用请求-打包机使用-STS临时访问凭证(获取)", "parameters": [ { "type": "string", @@ -1561,22 +2009,13 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true - }, - { - "description": "id 必填", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.UpdateWithdrawSettingReq" - } } ], "responses": { "200": { - "description": "修改数据条数", + "description": "凭证及其他信息", "schema": { - "type": "int" + "$ref": "#/definitions/comm.GetSTSVoucherResp" } }, "400": { @@ -6630,6 +7069,23 @@ const docTemplate = `{ } } }, + "applet_app_md_friend_circle.Paginate": { + "type": "object", + "properties": { + "limit": { + "description": "每页大小", + "type": "integer" + }, + "page": { + "description": "页数", + "type": "integer" + }, + "total": { + "description": "总数据量", + "type": "integer" + } + } + }, "applet_app_md_im.GetBasicResp": { "type": "object", "properties": { @@ -7055,6 +7511,19 @@ const docTemplate = `{ } } }, + "md.AddBlackListReq": { + "type": "object", + "properties": { + "memo": { + "description": "备注", + "type": "string" + }, + "uid": { + "description": "用户 id", + "type": "integer" + } + } + }, "md.AddCommunityDividendsReq": { "type": "object", "properties": { @@ -8234,6 +8703,24 @@ const docTemplate = `{ } } }, + "md.DeleteBlackListReq": { + "type": "object", + "properties": { + "id": { + "description": "黑名单 id", + "type": "integer" + } + } + }, + "md.DeleteDynamicReq": { + "type": "object", + "properties": { + "index_id": { + "description": "动态id", + "type": "string" + } + } + }, "md.DeleteEmoticonReq": { "type": "object", "properties": { @@ -8528,6 +9015,57 @@ const docTemplate = `{ } } }, + "md.EggFriendCircleNode": { + "type": "object", + "properties": { + "content": { + "description": "文本内容", + "type": "string" + }, + "created_at": { + "type": "string" + }, + "image": { + "description": "图片", + "type": "string" + }, + "index_id": { + "description": "动态id", + "type": "string" + }, + "is_praise": { + "description": "是否被表扬(1:是 2:否)", + "type": "integer" + }, + "is_top_up": { + "description": "是否置顶(1:是 2:否)", + "type": "integer" + }, + "kind": { + "description": "类型(1:普通 2:官方)", + "type": "integer" + }, + "state": { + "description": "状态(1:正常 2:隐藏)", + "type": "integer" + }, + "uid": { + "description": "用户id", + "type": "integer" + }, + "updated_at": { + "type": "string" + }, + "username": { + "description": "用户名称", + "type": "string" + }, + "video": { + "description": "视频", + "type": "string" + } + } + }, "md.ExchangeRulesStruct": { "type": "object", "properties": { @@ -8846,6 +9384,59 @@ const docTemplate = `{ } } }, + "md.GetBlackListNode": { + "type": "object", + "properties": { + "admin_id": { + "description": "管理员 id", + "type": "integer" + }, + "admin_nickname": { + "description": "管理员名称", + "type": "string" + }, + "black_list_id": { + "description": "黑名单 id", + "type": "integer" + }, + "created_at": { + "description": "添加时间", + "type": "string" + }, + "memo": { + "description": "备注", + "type": "string" + }, + "uid": { + "description": "用户 id", + "type": "integer" + }, + "user_nickname": { + "description": "用户名称", + "type": "string" + } + } + }, + "md.GetBlackListResp": { + "type": "object", + "properties": { + "list": { + "description": "具体信息", + "type": "array", + "items": { + "$ref": "#/definitions/md.GetBlackListNode" + } + }, + "paginate": { + "description": "分页信息", + "allOf": [ + { + "$ref": "#/definitions/applet_app_md_friend_circle.Paginate" + } + ] + } + } + }, "md.GetContributionValueBasicSettingResp": { "type": "object", "properties": { @@ -8870,6 +9461,54 @@ const docTemplate = `{ } } }, + "md.GetDynamicReq": { + "type": "object", + "properties": { + "begin_at": { + "description": "开始时间", + "type": "string" + }, + "end_at": { + "description": "结束时间", + "type": "string" + }, + "limit": { + "description": "页面大小", + "type": "integer" + }, + "nickname": { + "description": "创建人名称", + "type": "string" + }, + "page": { + "description": "页数", + "type": "integer" + }, + "uid": { + "description": "创建人id", + "type": "string" + } + } + }, + "md.GetDynamicResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.EggFriendCircleNode" + } + }, + "paginate": { + "description": "分页信息", + "allOf": [ + { + "$ref": "#/definitions/applet_app_md_friend_circle.Paginate" + } + ] + } + } + }, "md.GetEggCoreDataListResp": { "type": "object", "properties": { @@ -9023,6 +9662,30 @@ const docTemplate = `{ } } }, + "md.GetFriendCircleBasicSettingsResp": { + "type": "object", + "properties": { + "comment_is_real_name": { + "description": "评论是否需要实名认证(1:是 2:否)", + "type": "integer" + }, + "comment_nums_every_day": { + "description": "评论每天次数", + "type": "integer" + }, + "id": { + "type": "integer" + }, + "publish_is_real_name": { + "description": "发布是否需要实名认证(1:是 2:否)", + "type": "integer" + }, + "publish_nums_every_day": { + "description": "发布每天次数", + "type": "integer" + } + } + }, "md.GetFundDataListReq": { "type": "object", "properties": { @@ -10746,6 +11409,39 @@ const docTemplate = `{ } } }, + "md.ReleaseDynamicReq": { + "type": "object", + "properties": { + "content": { + "description": "文本内容", + "type": "string" + }, + "image": { + "description": "图片 uri", + "type": "string" + }, + "is_praise": { + "description": "是否被表扬(1:是 2:否)", + "type": "integer" + }, + "is_top_up": { + "description": "是否置顶(1:是 2:否)", + "type": "integer" + }, + "kind": { + "description": "类型(1:普通 2:官方)", + "type": "integer" + }, + "state": { + "description": "状态(1:正常 2:隐藏)", + "type": "integer" + }, + "video": { + "description": "视频 uri", + "type": "string" + } + } + }, "md.Response": { "type": "object", "properties": { @@ -11256,6 +11952,27 @@ const docTemplate = `{ } } }, + "md.UpdateDynamicReq": { + "type": "object", + "properties": { + "index_id": { + "description": "动态id", + "type": "string" + }, + "is_praise": { + "description": "是否被表扬(1:是 2:否)", + "type": "integer" + }, + "is_top_up": { + "description": "是否置顶(1:是 2:否)", + "type": "integer" + }, + "state": { + "description": "状态(1:正常 2:隐藏)", + "type": "integer" + } + } + }, "md.UpdateEggEnergyBasicReq": { "type": "object", "properties": { @@ -11366,6 +12083,30 @@ const docTemplate = `{ } } }, + "md.UpdateFriendCircleBasicSettingsReq": { + "type": "object", + "properties": { + "comment_is_real_name": { + "description": "评论是否需要实名认证(1:是 2:否)", + "type": "integer" + }, + "comment_nums_every_day": { + "description": "评论每天次数", + "type": "integer" + }, + "id": { + "type": "integer" + }, + "publish_is_real_name": { + "description": "发布是否需要实名认证(1:是 2:否)", + "type": "integer" + }, + "publish_nums_every_day": { + "description": "发布每天次数", + "type": "integer" + } + } + }, "md.UpdateLevelReq": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 8e628e7..3f775b4 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1335,9 +1335,9 @@ } } }, - "/api/comm/getSTSVoucher": { + "/api/config": { "get": { - "description": "STS临时访问凭证(获取)", + "description": "基本配置", "consumes": [ "application/json" ], @@ -1345,9 +1345,9 @@ "application/json" ], "tags": [ - "对象存储" + "基本配置" ], - "summary": "通用请求-对象存储-STS临时访问凭证(获取)", + "summary": "基本配置", "parameters": [ { "type": "string", @@ -1359,9 +1359,9 @@ ], "responses": { "200": { - "description": "凭证及其他信息", + "description": "具体数据", "schema": { - "$ref": "#/definitions/comm.GetSTSVoucherResp" + "$ref": "#/definitions/md.ConfigResp" } }, "400": { @@ -1373,9 +1373,94 @@ } } }, - "/api/config": { + "/api/demo": { + "post": { + "description": "Demo样例测试", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Demo" + ], + "summary": "Demo测试", + "parameters": [ + { + "description": "用户名密码", + "name": "req", + "in": "body", + "required": true, + "schema": {} + } + ], + "responses": { + "200": { + "description": "token", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/financialCenter/withdraw/applyList": { + "post": { + "description": "提现申请列表(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "提现" + ], + "summary": "财务中心-提现-提现申请列表(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "筛选条件", + "name": "req", + "in": "body", + "schema": { + "$ref": "#/definitions/md.GetWithdrawApplyListReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.GetWithdrawApplyListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/financialCenter/withdraw/setting": { "get": { - "description": "基本配置", + "description": "基础设置(获取)", "consumes": [ "application/json" ], @@ -1383,9 +1468,9 @@ "application/json" ], "tags": [ - "基本配置" + "提现" ], - "summary": "基本配置", + "summary": "财务中心-提现-基础设置(获取)", "parameters": [ { "type": "string", @@ -1399,7 +1484,7 @@ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.ConfigResp" + "$ref": "#/definitions/md.GetWithdrawSettingResp" } }, "400": { @@ -1411,9 +1496,9 @@ } } }, - "/api/demo": { + "/api/financialCenter/withdraw/updateWithdrawSetting": { "post": { - "description": "Demo样例测试", + "description": "基础设置(更新)", "consumes": [ "application/json" ], @@ -1421,24 +1506,32 @@ "application/json" ], "tags": [ - "Demo" + "提现" ], - "summary": "Demo测试", + "summary": "财务中心-提现-基础设置(更新)", "parameters": [ { - "description": "用户名密码", + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "id 必填", "name": "req", "in": "body", "required": true, - "schema": {} + "schema": { + "$ref": "#/definitions/md.UpdateWithdrawSettingReq" + } } ], "responses": { "200": { - "description": "token", + "description": "修改数据条数", "schema": { - "type": "object", - "additionalProperties": true + "type": "int" } }, "400": { @@ -1450,9 +1543,47 @@ } } }, - "/api/financialCenter/withdraw/applyList": { + "/api/friendCircleSettings/basic/index": { + "get": { + "description": "基础设置(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-基础设置(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.GetFriendCircleBasicSettingsResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/basic/save": { "post": { - "description": "提现申请列表(获取)", + "description": "基础设置(更新)", "consumes": [ "application/json" ], @@ -1460,9 +1591,9 @@ "application/json" ], "tags": [ - "提现" + "动态设置" ], - "summary": "财务中心-提现-提现申请列表(获取)", + "summary": "社交管理-动态设置-基础设置(更新)", "parameters": [ { "type": "string", @@ -1472,19 +1603,20 @@ "required": true }, { - "description": "筛选条件", + "description": "id 必填", "name": "req", "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/md.GetWithdrawApplyListReq" + "$ref": "#/definitions/md.UpdateFriendCircleBasicSettingsReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "修改数据条数", "schema": { - "$ref": "#/definitions/md.GetWithdrawApplyListResp" + "type": "int" } }, "400": { @@ -1496,9 +1628,316 @@ } } }, - "/api/financialCenter/withdraw/setting": { + "/api/friendCircleSettings/blackList/add": { + "post": { + "description": "黑名单(新增)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-黑名单(新增)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "用户id 必填", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AddBlackListReq" + } + } + ], + "responses": { + "200": { + "description": "生成的黑名单id", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/blackList/del": { + "delete": { + "description": "黑名单(删除)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-黑名单(删除)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "黑名单id 必填", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.DeleteBlackListReq" + } + } + ], + "responses": { + "200": { + "description": "删除数据数量", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/blackList/index": { "get": { - "description": "基础设置(获取)", + "description": "黑名单(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-黑名单(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "type": "integer", + "description": "每页大小", + "name": "limit", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "页数", + "name": "page", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "手机号", + "name": "phone", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "用户名", + "name": "nickname", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "用户id", + "name": "uid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.GetBlackListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/dynamic/del": { + "delete": { + "description": "动态(删除)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-动态(删除)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "删除动态id必填", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.DeleteDynamicReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/dynamic/index": { + "post": { + "description": "动态(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-动态(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "筛选条件", + "name": "req", + "in": "body", + "schema": { + "$ref": "#/definitions/md.GetDynamicReq" + } + } + ], + "responses": { + "200": { + "description": "生成的黑名单id", + "schema": { + "$ref": "#/definitions/md.GetDynamicResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/dynamic/release": { + "post": { + "description": "动态(发布)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "动态设置" + ], + "summary": "社交管理-动态设置-动态(发布)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "发布动态信息", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.ReleaseDynamicReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/friendCircleSettings/dynamic/update": { + "post": { + "description": "动态(更新)", "consumes": [ "application/json" ], @@ -1506,9 +1945,9 @@ "application/json" ], "tags": [ - "提现" + "动态设置" ], - "summary": "财务中心-提现-基础设置(获取)", + "summary": "社交管理-动态设置-动态(更新)", "parameters": [ { "type": "string", @@ -1516,13 +1955,22 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "更新动态id必填", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateDynamicReq" + } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", "schema": { - "$ref": "#/definitions/md.GetWithdrawSettingResp" + "type": "string" } }, "400": { @@ -1534,9 +1982,9 @@ } } }, - "/api/financialCenter/withdraw/updateWithdrawSetting": { - "post": { - "description": "基础设置(更新)", + "/api/getSTSVoucher": { + "get": { + "description": "STS临时访问凭证(获取)", "consumes": [ "application/json" ], @@ -1544,9 +1992,9 @@ "application/json" ], "tags": [ - "提现" + "打包机使用" ], - "summary": "财务中心-提现-基础设置(更新)", + "summary": "通用请求-打包机使用-STS临时访问凭证(获取)", "parameters": [ { "type": "string", @@ -1554,22 +2002,13 @@ "name": "Authorization", "in": "header", "required": true - }, - { - "description": "id 必填", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.UpdateWithdrawSettingReq" - } } ], "responses": { "200": { - "description": "修改数据条数", + "description": "凭证及其他信息", "schema": { - "type": "int" + "$ref": "#/definitions/comm.GetSTSVoucherResp" } }, "400": { @@ -6623,6 +7062,23 @@ } } }, + "applet_app_md_friend_circle.Paginate": { + "type": "object", + "properties": { + "limit": { + "description": "每页大小", + "type": "integer" + }, + "page": { + "description": "页数", + "type": "integer" + }, + "total": { + "description": "总数据量", + "type": "integer" + } + } + }, "applet_app_md_im.GetBasicResp": { "type": "object", "properties": { @@ -7048,6 +7504,19 @@ } } }, + "md.AddBlackListReq": { + "type": "object", + "properties": { + "memo": { + "description": "备注", + "type": "string" + }, + "uid": { + "description": "用户 id", + "type": "integer" + } + } + }, "md.AddCommunityDividendsReq": { "type": "object", "properties": { @@ -8227,6 +8696,24 @@ } } }, + "md.DeleteBlackListReq": { + "type": "object", + "properties": { + "id": { + "description": "黑名单 id", + "type": "integer" + } + } + }, + "md.DeleteDynamicReq": { + "type": "object", + "properties": { + "index_id": { + "description": "动态id", + "type": "string" + } + } + }, "md.DeleteEmoticonReq": { "type": "object", "properties": { @@ -8521,6 +9008,57 @@ } } }, + "md.EggFriendCircleNode": { + "type": "object", + "properties": { + "content": { + "description": "文本内容", + "type": "string" + }, + "created_at": { + "type": "string" + }, + "image": { + "description": "图片", + "type": "string" + }, + "index_id": { + "description": "动态id", + "type": "string" + }, + "is_praise": { + "description": "是否被表扬(1:是 2:否)", + "type": "integer" + }, + "is_top_up": { + "description": "是否置顶(1:是 2:否)", + "type": "integer" + }, + "kind": { + "description": "类型(1:普通 2:官方)", + "type": "integer" + }, + "state": { + "description": "状态(1:正常 2:隐藏)", + "type": "integer" + }, + "uid": { + "description": "用户id", + "type": "integer" + }, + "updated_at": { + "type": "string" + }, + "username": { + "description": "用户名称", + "type": "string" + }, + "video": { + "description": "视频", + "type": "string" + } + } + }, "md.ExchangeRulesStruct": { "type": "object", "properties": { @@ -8839,6 +9377,59 @@ } } }, + "md.GetBlackListNode": { + "type": "object", + "properties": { + "admin_id": { + "description": "管理员 id", + "type": "integer" + }, + "admin_nickname": { + "description": "管理员名称", + "type": "string" + }, + "black_list_id": { + "description": "黑名单 id", + "type": "integer" + }, + "created_at": { + "description": "添加时间", + "type": "string" + }, + "memo": { + "description": "备注", + "type": "string" + }, + "uid": { + "description": "用户 id", + "type": "integer" + }, + "user_nickname": { + "description": "用户名称", + "type": "string" + } + } + }, + "md.GetBlackListResp": { + "type": "object", + "properties": { + "list": { + "description": "具体信息", + "type": "array", + "items": { + "$ref": "#/definitions/md.GetBlackListNode" + } + }, + "paginate": { + "description": "分页信息", + "allOf": [ + { + "$ref": "#/definitions/applet_app_md_friend_circle.Paginate" + } + ] + } + } + }, "md.GetContributionValueBasicSettingResp": { "type": "object", "properties": { @@ -8863,6 +9454,54 @@ } } }, + "md.GetDynamicReq": { + "type": "object", + "properties": { + "begin_at": { + "description": "开始时间", + "type": "string" + }, + "end_at": { + "description": "结束时间", + "type": "string" + }, + "limit": { + "description": "页面大小", + "type": "integer" + }, + "nickname": { + "description": "创建人名称", + "type": "string" + }, + "page": { + "description": "页数", + "type": "integer" + }, + "uid": { + "description": "创建人id", + "type": "string" + } + } + }, + "md.GetDynamicResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.EggFriendCircleNode" + } + }, + "paginate": { + "description": "分页信息", + "allOf": [ + { + "$ref": "#/definitions/applet_app_md_friend_circle.Paginate" + } + ] + } + } + }, "md.GetEggCoreDataListResp": { "type": "object", "properties": { @@ -9016,6 +9655,30 @@ } } }, + "md.GetFriendCircleBasicSettingsResp": { + "type": "object", + "properties": { + "comment_is_real_name": { + "description": "评论是否需要实名认证(1:是 2:否)", + "type": "integer" + }, + "comment_nums_every_day": { + "description": "评论每天次数", + "type": "integer" + }, + "id": { + "type": "integer" + }, + "publish_is_real_name": { + "description": "发布是否需要实名认证(1:是 2:否)", + "type": "integer" + }, + "publish_nums_every_day": { + "description": "发布每天次数", + "type": "integer" + } + } + }, "md.GetFundDataListReq": { "type": "object", "properties": { @@ -10739,6 +11402,39 @@ } } }, + "md.ReleaseDynamicReq": { + "type": "object", + "properties": { + "content": { + "description": "文本内容", + "type": "string" + }, + "image": { + "description": "图片 uri", + "type": "string" + }, + "is_praise": { + "description": "是否被表扬(1:是 2:否)", + "type": "integer" + }, + "is_top_up": { + "description": "是否置顶(1:是 2:否)", + "type": "integer" + }, + "kind": { + "description": "类型(1:普通 2:官方)", + "type": "integer" + }, + "state": { + "description": "状态(1:正常 2:隐藏)", + "type": "integer" + }, + "video": { + "description": "视频 uri", + "type": "string" + } + } + }, "md.Response": { "type": "object", "properties": { @@ -11249,6 +11945,27 @@ } } }, + "md.UpdateDynamicReq": { + "type": "object", + "properties": { + "index_id": { + "description": "动态id", + "type": "string" + }, + "is_praise": { + "description": "是否被表扬(1:是 2:否)", + "type": "integer" + }, + "is_top_up": { + "description": "是否置顶(1:是 2:否)", + "type": "integer" + }, + "state": { + "description": "状态(1:正常 2:隐藏)", + "type": "integer" + } + } + }, "md.UpdateEggEnergyBasicReq": { "type": "object", "properties": { @@ -11359,6 +12076,30 @@ } } }, + "md.UpdateFriendCircleBasicSettingsReq": { + "type": "object", + "properties": { + "comment_is_real_name": { + "description": "评论是否需要实名认证(1:是 2:否)", + "type": "integer" + }, + "comment_nums_every_day": { + "description": "评论每天次数", + "type": "integer" + }, + "id": { + "type": "integer" + }, + "publish_is_real_name": { + "description": "发布是否需要实名认证(1:是 2:否)", + "type": "integer" + }, + "publish_nums_every_day": { + "description": "发布每天次数", + "type": "integer" + } + } + }, "md.UpdateLevelReq": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 8999497..4ff9196 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -18,6 +18,18 @@ definitions: tag_name: type: string type: object + applet_app_md_friend_circle.Paginate: + properties: + limit: + description: 每页大小 + type: integer + page: + description: 页数 + type: integer + total: + description: 总数据量 + type: integer + type: object applet_app_md_im.GetBasicResp: properties: chat_sensitive_words: @@ -319,6 +331,15 @@ definitions: example: 手机号 type: string type: object + md.AddBlackListReq: + properties: + memo: + description: 备注 + type: string + uid: + description: 用户 id + type: integer + type: object md.AddCommunityDividendsReq: properties: amount: @@ -1131,6 +1152,18 @@ definitions: example: 团队区域 type: string type: object + md.DeleteBlackListReq: + properties: + id: + description: 黑名单 id + type: integer + type: object + md.DeleteDynamicReq: + properties: + index_id: + description: 动态id + type: string + type: object md.DeleteEmoticonReq: properties: id: @@ -1340,6 +1373,43 @@ definitions: uid: type: integer type: object + md.EggFriendCircleNode: + properties: + content: + description: 文本内容 + type: string + created_at: + type: string + image: + description: 图片 + type: string + index_id: + description: 动态id + type: string + is_praise: + description: 是否被表扬(1:是 2:否) + type: integer + is_top_up: + description: 是否置顶(1:是 2:否) + type: integer + kind: + description: 类型(1:普通 2:官方) + type: integer + state: + description: 状态(1:正常 2:隐藏) + type: integer + uid: + description: 用户id + type: integer + updated_at: + type: string + username: + description: 用户名称 + type: string + video: + description: 视频 + type: string + type: object md.ExchangeRulesStruct: properties: auto_exchange_nums_by_person: @@ -1560,6 +1630,42 @@ definitions: description: 持有该类型用户数 type: integer type: object + md.GetBlackListNode: + properties: + admin_id: + description: 管理员 id + type: integer + admin_nickname: + description: 管理员名称 + type: string + black_list_id: + description: 黑名单 id + type: integer + created_at: + description: 添加时间 + type: string + memo: + description: 备注 + type: string + uid: + description: 用户 id + type: integer + user_nickname: + description: 用户名称 + type: string + type: object + md.GetBlackListResp: + properties: + list: + description: 具体信息 + items: + $ref: '#/definitions/md.GetBlackListNode' + type: array + paginate: + allOf: + - $ref: '#/definitions/applet_app_md_friend_circle.Paginate' + description: 分页信息 + type: object md.GetContributionValueBasicSettingResp: properties: hand_out_red_package: @@ -1577,6 +1683,38 @@ definitions: description: 发布创作获得x点 type: integer type: object + md.GetDynamicReq: + properties: + begin_at: + description: 开始时间 + type: string + end_at: + description: 结束时间 + type: string + limit: + description: 页面大小 + type: integer + nickname: + description: 创建人名称 + type: string + page: + description: 页数 + type: integer + uid: + description: 创建人id + type: string + type: object + md.GetDynamicResp: + properties: + list: + items: + $ref: '#/definitions/md.EggFriendCircleNode' + type: array + paginate: + allOf: + - $ref: '#/definitions/applet_app_md_friend_circle.Paginate' + description: 分页信息 + type: object md.GetEggCoreDataListResp: properties: now_energy_total_nums: @@ -1672,6 +1810,23 @@ definitions: - $ref: '#/definitions/applet_app_md_institutional_management_public_platoon.Paginate' description: 分页信息 type: object + md.GetFriendCircleBasicSettingsResp: + properties: + comment_is_real_name: + description: 评论是否需要实名认证(1:是 2:否) + type: integer + comment_nums_every_day: + description: 评论每天次数 + type: integer + id: + type: integer + publish_is_real_name: + description: 发布是否需要实名认证(1:是 2:否) + type: integer + publish_nums_every_day: + description: 发布每天次数 + type: integer + type: object md.GetFundDataListReq: properties: end_at: @@ -2884,6 +3039,30 @@ definitions: description: 高于x元 type: string type: object + md.ReleaseDynamicReq: + properties: + content: + description: 文本内容 + type: string + image: + description: 图片 uri + type: string + is_praise: + description: 是否被表扬(1:是 2:否) + type: integer + is_top_up: + description: 是否置顶(1:是 2:否) + type: integer + kind: + description: 类型(1:普通 2:官方) + type: integer + state: + description: 状态(1:正常 2:隐藏) + type: integer + video: + description: 视频 uri + type: string + type: object md.Response: properties: code: @@ -3241,6 +3420,21 @@ definitions: example: 备注 type: string type: object + md.UpdateDynamicReq: + properties: + index_id: + description: 动态id + type: string + is_praise: + description: 是否被表扬(1:是 2:否) + type: integer + is_top_up: + description: 是否置顶(1:是 2:否) + type: integer + state: + description: 状态(1:正常 2:隐藏) + type: integer + type: object md.UpdateEggEnergyBasicReq: properties: basic_setting: @@ -3307,6 +3501,23 @@ definitions: description: 排序 type: integer type: object + md.UpdateFriendCircleBasicSettingsReq: + properties: + comment_is_real_name: + description: 评论是否需要实名认证(1:是 2:否) + type: integer + comment_nums_every_day: + description: 评论每天次数 + type: integer + id: + type: integer + publish_is_real_name: + description: 发布是否需要实名认证(1:是 2:否) + type: integer + publish_nums_every_day: + description: 发布每天次数 + type: integer + type: object md.UpdateLevelReq: properties: auto_update: @@ -5290,31 +5501,6 @@ paths: summary: 通用请求-对象存储-上传许可链接(获取) tags: - 对象存储 - /api/comm/getSTSVoucher: - get: - consumes: - - application/json - description: STS临时访问凭证(获取) - parameters: - - description: 验证参数Bearer和token空格拼接 - in: header - name: Authorization - required: true - type: string - produces: - - application/json - responses: - "200": - description: 凭证及其他信息 - schema: - $ref: '#/definitions/comm.GetSTSVoucherResp' - "400": - description: 具体错误 - schema: - $ref: '#/definitions/md.Response' - summary: 通用请求-对象存储-STS临时访问凭证(获取) - tags: - - 对象存储 /api/config: get: consumes: @@ -5452,6 +5638,322 @@ paths: summary: 财务中心-提现-基础设置(更新) tags: - 提现 + /api/friendCircleSettings/basic/index: + get: + consumes: + - application/json + description: 基础设置(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.GetFriendCircleBasicSettingsResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 社交管理-动态设置-基础设置(获取) + tags: + - 动态设置 + /api/friendCircleSettings/basic/save: + post: + consumes: + - application/json + description: 基础设置(更新) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: id 必填 + in: body + name: req + required: true + schema: + $ref: '#/definitions/md.UpdateFriendCircleBasicSettingsReq' + produces: + - application/json + responses: + "200": + description: 修改数据条数 + schema: + type: int + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 社交管理-动态设置-基础设置(更新) + tags: + - 动态设置 + /api/friendCircleSettings/blackList/add: + post: + consumes: + - application/json + description: 黑名单(新增) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 用户id 必填 + in: body + name: req + required: true + schema: + $ref: '#/definitions/md.AddBlackListReq' + produces: + - application/json + responses: + "200": + description: 生成的黑名单id + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 社交管理-动态设置-黑名单(新增) + tags: + - 动态设置 + /api/friendCircleSettings/blackList/del: + delete: + consumes: + - application/json + description: 黑名单(删除) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 黑名单id 必填 + in: body + name: req + required: true + schema: + $ref: '#/definitions/md.DeleteBlackListReq' + produces: + - application/json + responses: + "200": + description: 删除数据数量 + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 社交管理-动态设置-黑名单(删除) + tags: + - 动态设置 + /api/friendCircleSettings/blackList/index: + get: + consumes: + - application/json + description: 黑名单(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 每页大小 + in: query + name: limit + required: true + type: integer + - description: 页数 + in: query + name: page + required: true + type: integer + - description: 手机号 + in: query + name: phone + required: true + type: integer + - description: 用户名 + in: query + name: nickname + required: true + type: integer + - description: 用户id + in: query + name: uid + required: true + type: integer + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.GetBlackListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 社交管理-动态设置-黑名单(获取) + tags: + - 动态设置 + /api/friendCircleSettings/dynamic/del: + delete: + consumes: + - application/json + description: 动态(删除) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 删除动态id必填 + in: body + name: req + required: true + schema: + $ref: '#/definitions/md.DeleteDynamicReq' + produces: + - application/json + responses: + "200": + description: success + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 社交管理-动态设置-动态(删除) + tags: + - 动态设置 + /api/friendCircleSettings/dynamic/index: + post: + consumes: + - application/json + description: 动态(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 筛选条件 + in: body + name: req + schema: + $ref: '#/definitions/md.GetDynamicReq' + produces: + - application/json + responses: + "200": + description: 生成的黑名单id + schema: + $ref: '#/definitions/md.GetDynamicResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 社交管理-动态设置-动态(获取) + tags: + - 动态设置 + /api/friendCircleSettings/dynamic/release: + post: + consumes: + - application/json + description: 动态(发布) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 发布动态信息 + in: body + name: req + required: true + schema: + $ref: '#/definitions/md.ReleaseDynamicReq' + produces: + - application/json + responses: + "200": + description: success + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 社交管理-动态设置-动态(发布) + tags: + - 动态设置 + /api/friendCircleSettings/dynamic/update: + post: + consumes: + - application/json + description: 动态(更新) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 更新动态id必填 + in: body + name: req + required: true + schema: + $ref: '#/definitions/md.UpdateDynamicReq' + produces: + - application/json + responses: + "200": + description: success + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 社交管理-动态设置-动态(更新) + tags: + - 动态设置 + /api/getSTSVoucher: + get: + consumes: + - application/json + description: STS临时访问凭证(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 凭证及其他信息 + schema: + $ref: '#/definitions/comm.GetSTSVoucherResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 通用请求-打包机使用-STS临时访问凭证(获取) + tags: + - 打包机使用 /api/homePage/activeData: get: consumes: diff --git a/go.mod b/go.mod index e5da85b..b47c0c1 100644 --- a/go.mod +++ b/go.mod @@ -32,8 +32,8 @@ require ( ) require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241130022153-9f7ff6c9f078 - code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241202132506-ba937bba9e16 + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241203104348-2e593fa11d5d + code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241203080408-75cfef2c6334 code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 github.com/360EntSecGroup-Skylar/excelize v1.4.1