From e66bf8d9b1cdd687ce78c54b42b6cdc5f374db11 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 11 Dec 2024 20:18:52 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/member_center/hdl_certificate.go | 8 +- docs/docs.go | 138 +++++++++++++++++++++-- docs/swagger.json | 133 +++++++++++++++++++++- docs/swagger.yaml | 95 +++++++++++++++- 4 files changed, 349 insertions(+), 25 deletions(-) diff --git a/app/hdl/member_center/hdl_certificate.go b/app/hdl/member_center/hdl_certificate.go index 50143c9..2f3a795 100644 --- a/app/hdl/member_center/hdl_certificate.go +++ b/app/hdl/member_center/hdl_certificate.go @@ -12,8 +12,8 @@ import ( // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" -// @Param req body md.AdvertisingListReq true "(分页信息必填)" -// @Success 200 {object} md.AdvertisingListResp "具体数据" +// @Param req body md.CertificateListReq true "(分页信息必填)" +// @Success 200 {object} md.CertificateListResp "具体数据" // @Failure 400 {object} md.Response "具体错误" // @Router /api/memberCenter/certificate/list [post] func CertificateList(c *gin.Context) { @@ -27,7 +27,7 @@ func CertificateList(c *gin.Context) { // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" -// @Param req body md.AdvertisingDelReq true "(分页信息必填)" +// @Param req body md.CertificateDelReq true "(分页信息必填)" // @Success 200 {string} "具体数据" // @Failure 400 {object} md.Response "具体错误" // @Router /api/memberCenter/certificate/del [post] @@ -42,7 +42,7 @@ func CertificateDel(c *gin.Context) { // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" -// @Param req body md.AdvertisingSaveReq true "(分页信息必填)" +// @Param req body md.CertificateSave true "(分页信息必填)" // @Success 200 {string} "具体数据" // @Failure 400 {object} md.Response "具体错误" // @Router /api/memberCenter/certificate/save [post] diff --git a/docs/docs.go b/docs/docs.go index ebecf03..33c6672 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,4 +1,5 @@ -// Package docs Code generated by swaggo/swag. DO NOT EDIT +// Code generated by swaggo/swag. DO NOT EDIT. + package docs import "github.com/swaggo/swag" @@ -1523,7 +1524,9 @@ const docTemplate = `{ "name": "req", "in": "body", "required": true, - "schema": {} + "schema": { + "type": "object" + } } ], "responses": { @@ -5763,7 +5766,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AdvertisingDelReq" + "$ref": "#/definitions/md.CertificateDelReq" } } ], @@ -5810,7 +5813,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AdvertisingListReq" + "$ref": "#/definitions/md.CertificateListReq" } } ], @@ -5818,7 +5821,7 @@ const docTemplate = `{ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.AdvertisingListResp" + "$ref": "#/definitions/md.CertificateListResp" } }, "400": { @@ -5857,7 +5860,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AdvertisingSaveReq" + "$ref": "#/definitions/md.CertificateSave" } } ], @@ -10455,6 +10458,98 @@ const docTemplate = `{ } } }, + "md.CertificateDelReq": { + "type": "object", + "properties": { + "id": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "md.CertificateList": { + "type": "object", + "properties": { + "bg_img": { + "type": "string", + "example": "背景图" + }, + "end_time": { + "type": "string", + "example": "结束时间" + }, + "id": { + "type": "string" + }, + "logo": { + "type": "string", + "example": "logo" + }, + "medal": { + "type": "string", + "example": "勋章" + }, + "name": { + "type": "string", + "example": "姓名" + }, + "name_icon": { + "type": "string", + "example": "蛋蛋星球文字图" + }, + "no": { + "type": "string", + "example": "编号" + }, + "phone": { + "type": "string" + }, + "seal": { + "type": "string", + "example": "印章" + }, + "start_time": { + "type": "string", + "example": "开始时间" + }, + "uid": { + "type": "string" + } + } + }, + "md.CertificateListReq": { + "type": "object", + "properties": { + "limit": { + "type": "string" + }, + "page": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "md.CertificateListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.CertificateList" + } + }, + "total": { + "type": "integer" + } + } + }, "md.CertificateReq": { "type": "object", "properties": { @@ -10505,6 +10600,33 @@ const docTemplate = `{ } } }, + "md.CertificateSave": { + "type": "object", + "properties": { + "end_time": { + "type": "string", + "example": "结束时间" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string", + "example": "姓名" + }, + "no": { + "type": "string", + "example": "编号" + }, + "start_time": { + "type": "string", + "example": "开始时间" + }, + "uid": { + "type": "string" + } + } + }, "md.CloudBundleBaseResp": { "type": "object", "properties": { @@ -14791,7 +14913,7 @@ const docTemplate = `{ "properties": { "is_punish": { "description": "是否是惩罚标签", - "type": "string" + "type": "integer" }, "memo": { "description": "备注", @@ -16452,8 +16574,6 @@ var SwaggerInfo = &swag.Spec{ Description: "管理后台接口文档", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, - LeftDelim: "{{", - RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index f19353c..862dd66 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1516,7 +1516,9 @@ "name": "req", "in": "body", "required": true, - "schema": {} + "schema": { + "type": "object" + } } ], "responses": { @@ -5756,7 +5758,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AdvertisingDelReq" + "$ref": "#/definitions/md.CertificateDelReq" } } ], @@ -5803,7 +5805,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AdvertisingListReq" + "$ref": "#/definitions/md.CertificateListReq" } } ], @@ -5811,7 +5813,7 @@ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.AdvertisingListResp" + "$ref": "#/definitions/md.CertificateListResp" } }, "400": { @@ -5850,7 +5852,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AdvertisingSaveReq" + "$ref": "#/definitions/md.CertificateSave" } } ], @@ -10448,6 +10450,98 @@ } } }, + "md.CertificateDelReq": { + "type": "object", + "properties": { + "id": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "md.CertificateList": { + "type": "object", + "properties": { + "bg_img": { + "type": "string", + "example": "背景图" + }, + "end_time": { + "type": "string", + "example": "结束时间" + }, + "id": { + "type": "string" + }, + "logo": { + "type": "string", + "example": "logo" + }, + "medal": { + "type": "string", + "example": "勋章" + }, + "name": { + "type": "string", + "example": "姓名" + }, + "name_icon": { + "type": "string", + "example": "蛋蛋星球文字图" + }, + "no": { + "type": "string", + "example": "编号" + }, + "phone": { + "type": "string" + }, + "seal": { + "type": "string", + "example": "印章" + }, + "start_time": { + "type": "string", + "example": "开始时间" + }, + "uid": { + "type": "string" + } + } + }, + "md.CertificateListReq": { + "type": "object", + "properties": { + "limit": { + "type": "string" + }, + "page": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "md.CertificateListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.CertificateList" + } + }, + "total": { + "type": "integer" + } + } + }, "md.CertificateReq": { "type": "object", "properties": { @@ -10498,6 +10592,33 @@ } } }, + "md.CertificateSave": { + "type": "object", + "properties": { + "end_time": { + "type": "string", + "example": "结束时间" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string", + "example": "姓名" + }, + "no": { + "type": "string", + "example": "编号" + }, + "start_time": { + "type": "string", + "example": "开始时间" + }, + "uid": { + "type": "string" + } + } + }, "md.CloudBundleBaseResp": { "type": "object", "properties": { @@ -14784,7 +14905,7 @@ "properties": { "is_punish": { "description": "是否是惩罚标签", - "type": "string" + "type": "integer" }, "memo": { "description": "备注", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 77d5213..300d92a 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1052,6 +1052,69 @@ definitions: required: - adm_id type: object + md.CertificateDelReq: + properties: + id: + items: + type: string + type: array + type: object + md.CertificateList: + properties: + bg_img: + example: 背景图 + type: string + end_time: + example: 结束时间 + type: string + id: + type: string + logo: + example: logo + type: string + medal: + example: 勋章 + type: string + name: + example: 姓名 + type: string + name_icon: + example: 蛋蛋星球文字图 + type: string + "no": + example: 编号 + type: string + phone: + type: string + seal: + example: 印章 + type: string + start_time: + example: 开始时间 + type: string + uid: + type: string + type: object + md.CertificateListReq: + properties: + limit: + type: string + page: + type: string + phone: + type: string + uid: + type: string + type: object + md.CertificateListResp: + properties: + list: + items: + $ref: '#/definitions/md.CertificateList' + type: array + total: + type: integer + type: object md.CertificateReq: properties: "no": @@ -1088,6 +1151,25 @@ definitions: example: 开始时间 type: string type: object + md.CertificateSave: + properties: + end_time: + example: 结束时间 + type: string + id: + type: string + name: + example: 姓名 + type: string + "no": + example: 编号 + type: string + start_time: + example: 开始时间 + type: string + uid: + type: string + type: object md.CloudBundleBaseResp: properties: android_logo: @@ -4061,7 +4143,7 @@ definitions: properties: is_punish: description: 是否是惩罚标签 - type: string + type: integer memo: description: 备注 type: string @@ -6194,7 +6276,8 @@ paths: in: body name: req required: true - schema: {} + schema: + type: object produces: - application/json responses: @@ -8993,7 +9076,7 @@ paths: name: req required: true schema: - $ref: '#/definitions/md.AdvertisingDelReq' + $ref: '#/definitions/md.CertificateDelReq' produces: - application/json responses: @@ -9024,14 +9107,14 @@ paths: name: req required: true schema: - $ref: '#/definitions/md.AdvertisingListReq' + $ref: '#/definitions/md.CertificateListReq' produces: - application/json responses: "200": description: 具体数据 schema: - $ref: '#/definitions/md.AdvertisingListResp' + $ref: '#/definitions/md.CertificateListResp' "400": description: 具体错误 schema: @@ -9055,7 +9138,7 @@ paths: name: req required: true schema: - $ref: '#/definitions/md.AdvertisingSaveReq' + $ref: '#/definitions/md.CertificateSave' produces: - application/json responses: From ee6cfa7045b5b8354c5c5b5d34cc53b4f6618d25 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 11 Dec 2024 20:55:54 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BC=9A=E5=91=98=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/member_center/hdl_user_management.go | 4 ++-- app/svc/member_center/svc_user_management.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/hdl/member_center/hdl_user_management.go b/app/hdl/member_center/hdl_user_management.go index 9950bf6..cad7af6 100644 --- a/app/hdl/member_center/hdl_user_management.go +++ b/app/hdl/member_center/hdl_user_management.go @@ -115,7 +115,7 @@ func UserManagementGetUserList(c *gin.Context) { InviteCode: user.SystemInviteCode, ParentID: user.ParentUid, ParentInviteCode: user.ParentSystemInviteCode, - ParentPhone: user.Phone, + ParentPhone: user.ParentPhone, RegisterTime: user.CreateAt, Memo: user.Memo, Wechat: user.UnionId, @@ -262,7 +262,7 @@ func UserManagementGetOneBasic(c *gin.Context) { TagsList: tagsList, LevelsList: levelsList, BasicInfo: md.BasicInfoNode{ - Avatar: user.Avatar, + Avatar: svc2.GetOssUrl(user.Avatar), Sex: user.Sex, Nickname: user.Nickname, LevelId: user.Level, diff --git a/app/svc/member_center/svc_user_management.go b/app/svc/member_center/svc_user_management.go index e378d2d..d7a099f 100644 --- a/app/svc/member_center/svc_user_management.go +++ b/app/svc/member_center/svc_user_management.go @@ -22,7 +22,7 @@ func UserManagementGetUsers(req *md.UserManagementGetUserListReq) ([]*md.UserInf return nil, 0, err } - err = pageSess.Distinct("a.*").Limit(req.Limit, (req.Page-1)*req.Limit).Asc("a.id").Find(&users) + err = pageSess.Distinct("a.*").Limit(req.Limit, (req.Page-1)*req.Limit).Desc("a.id").Find(&users) if err != nil { return nil, 0, err } From 91c1242bf4cc05787e784dbe99e623f9e0e851d0 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 11 Dec 2024 20:58:42 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/svc/member_center/svc_certificate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/svc/member_center/svc_certificate.go b/app/svc/member_center/svc_certificate.go index 0f031dd..b95a6d4 100644 --- a/app/svc/member_center/svc_certificate.go +++ b/app/svc/member_center/svc_certificate.go @@ -21,7 +21,7 @@ func CertificateList(c *gin.Context) { if req.Phone != "" { NewUserDb := implement.NewUserDb(db.Db) user, _ := NewUserDb.UserGetOneByParams(map[string]interface{}{ - "key": "id", + "key": "phone", "value": req.Phone, }) req.Uid = "0" From 6a69c304c65f71df98a9972a7e28a19b9d2ff8ac Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 11 Dec 2024 21:14:57 +0800 Subject: [PATCH 4/9] update --- .../egg_energy/hdl_user_coin.go | 4 ++-- .../public_platoon/hdl_basic.go | 21 +++++++++++++++++++ app/router/router.go | 1 + go.mod | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/app/hdl/institutional_management/egg_energy/hdl_user_coin.go b/app/hdl/institutional_management/egg_energy/hdl_user_coin.go index fa9b3ac..cf91109 100644 --- a/app/hdl/institutional_management/egg_energy/hdl_user_coin.go +++ b/app/hdl/institutional_management/egg_energy/hdl_user_coin.go @@ -68,7 +68,7 @@ func GetEggEnergyUserCoinList(c *gin.Context) { e.OutErr(c, e.ERR_DB_ORM, err3.Error()) return } - activePointsWalletList := make([]md.ActivePointsWalletNode, len(wallets)) + activePointsWalletList := make([]md.ActivePointsWalletNode, 0, len(wallets)) userDb := implement.NewUserDb(db.Db) userIDs := make([]int64, len(wallets)) for i, wallet := range wallets { @@ -236,7 +236,7 @@ func GetEggPointsUserCoinList(c *gin.Context) { e.OutErr(c, e.ERR_DB_ORM, err3.Error()) return } - activePointsWalletList := make([]md.ActivePointsWalletNode, len(wallets)) + activePointsWalletList := make([]md.ActivePointsWalletNode, 0, len(wallets)) userDb := implement.NewUserDb(db.Db) userIDs := make([]int64, len(wallets)) for i, wallet := range wallets { diff --git a/app/hdl/institutional_management/public_platoon/hdl_basic.go b/app/hdl/institutional_management/public_platoon/hdl_basic.go index 16280f8..db2b6ad 100644 --- a/app/hdl/institutional_management/public_platoon/hdl_basic.go +++ b/app/hdl/institutional_management/public_platoon/hdl_basic.go @@ -800,6 +800,27 @@ func AddCommunityDividendsWithUser(c *gin.Context) { e.OutSuc(c, id, nil) } +// DelCommunityDividendsWithUser +// @Summary 制度中心-公排管理-社区长列表(删除) +// @Tags 公排管理 +// @Description 社区长列表(删除) +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Success 200 {int} "删除数据数量" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserDel/{$id} [DELETE] +func DelCommunityDividendsWithUser(c *gin.Context) { + id := c.Param("id") + dividendsWithUserDb := implement.NewEggEnergyCommunityDividendsWithUserDb(db.Db) + affected, err := dividendsWithUserDb.EggEnergyCommunityDividendsWithUserDel(id) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + e.OutSuc(c, affected, nil) +} + // UserDailyActivityAnalysis // @Summary 制度中心-公排管理-日活分析 // @Tags 公排管理 diff --git a/app/router/router.go b/app/router/router.go index b19bfd3..3c6e225 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -235,6 +235,7 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理 rCommunityDividends.POST("/communityDividendsAdd", public_platoon.AddCommunityDividends) rCommunityDividends.POST("/communityDividendsWithUserList", public_platoon.ListCommunityDividendsWithUser) rCommunityDividends.POST("/communityDividendsWithUserAdd", public_platoon.AddCommunityDividendsWithUser) + rCommunityDividends.DELETE("/communityDividendsWithUserDel/:id", public_platoon.DelCommunityDividendsWithUser) } rUserDailyActivityAnalysis := rPublicPlatoon.Group("/userDailyActivityAnalysis") { diff --git a/go.mod b/go.mod index 006096b..10bb33f 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module applet go 1.19 -// replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models + replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models //replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules From b03bd8d749a87fa845e2654dc27f105f0009457b Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 11 Dec 2024 21:16:02 +0800 Subject: [PATCH 5/9] update --- docs/docs.go | 47 ++++++++++++++++++++++++++++++++++++++++++----- docs/swagger.json | 42 +++++++++++++++++++++++++++++++++++++++--- docs/swagger.yaml | 28 ++++++++++++++++++++++++++-- 3 files changed, 107 insertions(+), 10 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 33c6672..21f0c18 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,5 +1,4 @@ -// Code generated by swaggo/swag. DO NOT EDIT. - +// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" @@ -1524,9 +1523,7 @@ const docTemplate = `{ "name": "req", "in": "body", "required": true, - "schema": { - "type": "object" - } + "schema": {} } ], "responses": { @@ -4964,6 +4961,44 @@ const docTemplate = `{ } } }, + "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserDel/{$id}": { + "delete": { + "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": { + "type": "int" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList": { "post": { "description": "社区长列表(查询)", @@ -16574,6 +16609,8 @@ var SwaggerInfo = &swag.Spec{ Description: "管理后台接口文档", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index 862dd66..6f9cd6b 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1516,9 +1516,7 @@ "name": "req", "in": "body", "required": true, - "schema": { - "type": "object" - } + "schema": {} } ], "responses": { @@ -4956,6 +4954,44 @@ } } }, + "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserDel/{$id}": { + "delete": { + "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": { + "type": "int" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList": { "post": { "description": "社区长列表(查询)", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 300d92a..8718c3c 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -6276,8 +6276,7 @@ paths: in: body name: req required: true - schema: - type: object + schema: {} produces: - application/json responses: @@ -8548,6 +8547,31 @@ paths: summary: 制度中心-公排管理-社区长列表(新增) tags: - 公排管理 + /api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserDel/{$id}: + delete: + consumes: + - application/json + description: 社区长列表(删除) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 删除数据数量 + schema: + type: int + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-公排管理-社区长列表(删除) + tags: + - 公排管理 /api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList: post: consumes: From b31965f2334e3fe3fbcfd9ca0ee8deb7b8ce3f8c Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 11 Dec 2024 21:16:42 +0800 Subject: [PATCH 6/9] update --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 10bb33f..006096b 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module applet go 1.19 - replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models +// replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models //replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules From 472b926bd3917cd084644b848ba62560fecc5067 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 11 Dec 2024 21:18:56 +0800 Subject: [PATCH 7/9] update module --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 006096b..4b828a4 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( ) require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241211091343-ac9cda7c7f7b + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241211131723-5b61ee87000b code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241205075006-9c0bf995c788 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 From 0b805d33f8f4c978a0d0ff8a8cce33e469df664b Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 11 Dec 2024 22:25:05 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BC=9A=E5=91=98=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E5=9B=9E=E6=94=B6=E7=AB=99=20=E4=BC=9A=E5=91=98=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/member_center/hdl_user_management.go | 260 +++++++++++++++++++ app/md/md_mq.go | 5 + app/md/md_website.go | 8 +- app/md/member_center/md_user_management.go | 5 +- app/router/router.go | 4 + app/svc/member_center/svc_user_management.go | 5 + 6 files changed, 282 insertions(+), 5 deletions(-) diff --git a/app/hdl/member_center/hdl_user_management.go b/app/hdl/member_center/hdl_user_management.go index cad7af6..9bbd334 100644 --- a/app/hdl/member_center/hdl_user_management.go +++ b/app/hdl/member_center/hdl_user_management.go @@ -3,15 +3,20 @@ package member_center import ( "applet/app/db" "applet/app/e" + md2 "applet/app/md" "applet/app/md/member_center" svc2 "applet/app/svc" svc "applet/app/svc/member_center" "applet/app/utils" + "applet/app/utils/cache" "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" + "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + "code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git/rabbit" "errors" "fmt" "github.com/gin-gonic/gin" "strings" + "time" ) // UserManagementGetUserList @@ -180,6 +185,261 @@ func UserManagementUpdateUserInfo(c *gin.Context) { e.OutSuc(c, affected, nil) } +// UserManagementGetUserRecycleList +// @Summary 会员中心-用户管理-回收站列表 +// @Tags 会员中心 +// @Description 回收站列表 +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.UserManagementGetUserListReq true "分页信息必填" +// @Success 200 {object} md.UserManagementGetUserListResp "具体数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/memberCenter/userManagement/userRecycleList [post] +func UserManagementGetUserRecycleList(c *gin.Context) { + var req *md.UserManagementGetUserListReq + if err := c.ShouldBindJSON(&req); err != nil { + e.OutErr(c, e.ERR_INVALID_ARGS, err.Error()) + return + } + req.IsRecycle = "1" + levelDb := implement.NewUserLevelDb(db.Db) + levels, err1 := levelDb.UserLevelAllByAsc() + if err1 != nil { + e.OutErr(c, e.ERR_DB_ORM, err1.Error()) + return + } + levelsList := make([]map[string]interface{}, 0) + levelsMap := make(map[int]string) + for _, level := range levels { + levelsList = append(levelsList, map[string]interface{}{ + "id": level.Id, + "name": level.LevelName, + }) + levelsMap[level.Id] = level.LevelName + } + + tagDb := implement.NewUserTagDb(db.Db) + tags, err2 := tagDb.UserTagAllByAsc() + if err2 != nil { + e.OutErr(c, e.ERR_DB_ORM, err2.Error()) + return + } + tagsList := make([]map[string]interface{}, 0) + tagsMap := make(map[int]string) + for _, tag := range tags { + tagsList = append(tagsList, map[string]interface{}{ + "id": tag.Id, + "name": tag.TagName, + }) + tagsMap[tag.Id] = tag.TagName + } + + stateList := []map[string]interface{}{ + { + "name": "正常", + "value": "1", + }, + { + "name": "冻结", + "value": "2", + }, + } + + users, total, err3 := svc.UserManagementGetUsers(req) + if err3 != nil { + e.OutErr(c, e.ERR_DB_ORM, err3.Error()) + return + } + userIDs := make([]int64, len(users)) + for i, user := range users { + userIDs[i] = user.Id + } + + recordsDb := implement.NewUserTagRecordsDb(db.Db) + records, err := recordsDb.UserTagRecordsFindByParams(map[string]interface{}{ + "key": "uid", + "value": userIDs, + }) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + var levelCounts []md.LevelCount + err4 := db.Db.Table("user").Select("level, Count(*) AS count").GroupBy("level").Find(&levelCounts) + if err4 != nil { + e.OutErr(c, e.ERR_DB_ORM, err4.Error()) + return + } + + userMap := make(map[int64]int, len(users)) + list := make([]md.UserManagementGetUserListNode, len(users)) + for i, user := range users { + list[i] = md.UserManagementGetUserListNode{ + ID: user.Id, + Sex: user.Sex, + Avatar: svc2.GetOssUrl(user.Avatar), + Nickname: user.Nickname, + Phone: user.Phone, + IsRealName: user.IsRealName, + InviteCode: user.SystemInviteCode, + ParentID: user.ParentUid, + ParentInviteCode: user.ParentSystemInviteCode, + ParentPhone: user.ParentPhone, + RegisterTime: user.CreateAt, + Memo: user.Memo, + Wechat: user.UnionId, + RegisterType: user.RegisterType, + State: user.State, + LastLoginAt: user.UpdateAt, + } + var tempTagList []md.TagNode + list[i].Tag = tempTagList + userMap[user.Id] = i + level, ok := levelsMap[user.Level] + if ok { + list[i].LevelName = level + } + } + + for _, record := range *records { + tempTagNode := md.TagNode{ + TagID: record.TagId, + TagName: tagsMap[record.TagId], + } + list[userMap[record.Uid]].Tag = append(list[userMap[record.Uid]].Tag, tempTagNode) + } + + resp := md.UserManagementGetUserListResp{ + LevelsList: levelsList, + TagsList: tagsList, + StateList: stateList, + List: list, + Paginate: md.Paginate{ + Limit: req.Limit, + Page: req.Page, + Total: total, + }, + } + e.OutSuc(c, resp, nil) +} + +// UserManagementUserRecycle +// @Summary 会员中心-用户管理-删除到回收站 +// @Tags 会员中心 +// @Description 删除到回收站 +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.UserManagementUserInfoReq true "用户ID 必传" +// @Success 200 {int} "修改数据行数" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/memberCenter/userManagement/userRecycle [post] +func UserManagementUserRecycle(c *gin.Context) { + var req *md.UserManagementUserInfoReq + if err := c.ShouldBindJSON(&req); err != nil { + e.OutErr(c, e.ERR_INVALID_ARGS, err.Error()) + return + } + NewUserDb := implement.NewUserDb(db.Db) + user, _ := NewUserDb.GetUser(utils.StrToInt64(req.UID)) + if user == nil { + e.OutErr(c, 400, e.NewErr(400, "用户不存在")) + return + } + user.State = 4 + db.Db.Where("id=?", user.Id).Cols("state").Update(user) + admin := svc2.GetUser(c) + svc2.AddAdminLog(c, admin.AdmId, "用户回收", "用户id:"+utils.Int64ToStr(user.Id)+",用户手机号:"+user.Phone+" 删除到回收站", utils.SerializeStr(user)) + e.OutSuc(c, "success", nil) +} + +// UserManagementUserRecycleCancel +// @Summary 会员中心-用户管理-恢复到会员列表 +// @Tags 会员中心 +// @Description 恢复到会员列表 +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.UserManagementUserInfoReq true "用户ID 必传" +// @Success 200 {int} "修改数据行数" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/memberCenter/userManagement/userRecycleCancel [post] +func UserManagementUserRecycleCancel(c *gin.Context) { + var req *md.UserManagementUserInfoReq + if err := c.ShouldBindJSON(&req); err != nil { + e.OutErr(c, e.ERR_INVALID_ARGS, err.Error()) + return + } + NewUserDb := implement.NewUserDb(db.Db) + user, _ := NewUserDb.GetUser(utils.StrToInt64(req.UID)) + if user == nil { + e.OutErr(c, 400, e.NewErr(400, "用户不存在")) + return + } + user.State = 1 + db.Db.Where("id=?", user.Id).Cols("state").Update(user) + admin := svc2.GetUser(c) + svc2.AddAdminLog(c, admin.AdmId, "用户恢复", "用户id:"+utils.Int64ToStr(user.Id)+",用户手机号:"+user.Phone+" 恢复到会员列表", utils.SerializeStr(user)) + e.OutSuc(c, "success", nil) +} + +// UserManagementUserDelete +// @Summary 会员中心-用户管理-永久删除 +// @Tags 会员中心 +// @Description 删除到回收站 +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.UserManagementUserInfoReq true "用户ID 必传" +// @Success 200 {int} "修改数据行数" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/memberCenter/userManagement/userDelete [post] +func UserManagementUserDelete(c *gin.Context) { + var req *md.UserManagementUserInfoReq + if err := c.ShouldBindJSON(&req); err != nil { + e.OutErr(c, e.ERR_INVALID_ARGS, err.Error()) + return + } + NewUserDb := implement.NewUserDb(db.Db) + user, _ := NewUserDb.GetUser(utils.StrToInt64(req.UID)) + if user == nil { + e.OutErr(c, 400, e.NewErr(400, "用户不存在")) + return + } + if user.State != 4 { + e.OutErr(c, 400, e.NewErr(400, "不能删除")) + return + } + user.State = 3 + db.Db.Where("id=?", user.Id).Cols("state").Update(user) + tmp := model.UserDeleteInfo{ + Uid: int(user.Id), + Phone: user.Phone, + CreateAt: time.Now(), + } + db.Db.Insert(&tmp) + ch, err := rabbit.Cfg.Pool.GetChannel() + if err == nil { + defer ch.Release() + err = ch.PublishV2(md2.EggUserExchange, md2.CommUserId{ + Uid: utils.Int64ToStr(user.Id), + }, md2.EggUserDelete) + if err != nil { + ch.PublishV2(md2.EggUserExchange, md2.CommUserId{ + Uid: utils.Int64ToStr(user.Id), + }, md2.EggUserDelete) + } + } + // 清掉token + cacheKey := fmt.Sprintf("egg_app_jwt_token:%d", user.Id) + _, err = cache.SetEx(cacheKey, "", 1) + admin := svc2.GetUser(c) + svc2.AddAdminLog(c, admin.AdmId, "用户永久删除", "用户id:"+utils.Int64ToStr(user.Id)+",用户手机号:"+user.Phone+" 永久删除", utils.SerializeStr(user)) + e.OutSuc(c, "success", nil) +} + // UserManagementGetOneBasic // @Summary 制度中心-会员中心-用户管理-会员明细概况(获取) // @Tags 会员中心 diff --git a/app/md/md_mq.go b/app/md/md_mq.go index 20b7c82..9b84649 100644 --- a/app/md/md_mq.go +++ b/app/md/md_mq.go @@ -3,8 +3,13 @@ package md const ( EggJpushRecordQueueExchange = "egg.jpush" EggJpushRecordQueue = "jpush_record" + EggUserExchange = "egg.user" + EggUserDelete = "user_delete" ) type JpushRecordFundData struct { Id string `json:"id"` } +type CommUserId struct { + Uid string `json:"uid"` +} diff --git a/app/md/md_website.go b/app/md/md_website.go index c6ad20e..2721f7f 100644 --- a/app/md/md_website.go +++ b/app/md/md_website.go @@ -31,9 +31,9 @@ type CertificateResp struct { } var Certificate = CertificateResp{ - Logo: "default_icon/certificate_logo.jpg", + Logo: "default_icon/certificate_logo.png", BgImg: "default_icon/certificate_bg_img.jpg", - NameIcon: "default_icon/certificate_name_icon.jpg", - Medal: "default_icon/certificate_medal.jpg", - Seal: "default_icon/certificate_seal.jpg", + NameIcon: "default_icon/certificate_name_icon.png", + Medal: "default_icon/certificate_medal.png", + Seal: "default_icon/certificate_seal.png", } diff --git a/app/md/member_center/md_user_management.go b/app/md/member_center/md_user_management.go index deb1ef3..ff1ec0b 100644 --- a/app/md/member_center/md_user_management.go +++ b/app/md/member_center/md_user_management.go @@ -27,6 +27,7 @@ type UserManagementGetUserListReq struct { LoginAfter string `json:"login_after"` // 最近登录结束时间 Page int `json:"page,required"` Limit int `json:"limit,required"` + IsRecycle string `json:"is_recycle"` } type Paginate struct { @@ -92,7 +93,9 @@ type UserManagementUpdateUserInfoReq struct { ParentUid string `json:"parent_uid"` // 邀请人 ID Password string `json:"password"` // 登录密码 } - +type UserManagementUserInfoReq struct { + UID string `json:"uid"` +} type TagNode struct { TagID int `json:"tag_id"` // 标签 ID TagName string `json:"tag_name"` // 标签名称 diff --git a/app/router/router.go b/app/router/router.go index b19bfd3..a814e0e 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -335,6 +335,10 @@ func rMemberCenter(r *gin.RouterGroup) { // 会员中心 rUserManagement.POST("/getUserList", member_center.UserManagementGetUserList) rUserManagement.GET("/userData", member_center.UserManagementGetOneBasic) rUserManagement.POST("/updateUserInfo", member_center.UserManagementUpdateUserInfo) + rUserManagement.POST("/userRecycle", member_center.UserManagementUserRecycle) + rUserManagement.POST("/userRecycleCancel", member_center.UserManagementUserRecycleCancel) + rUserManagement.POST("/userRecycleList", member_center.UserManagementGetUserRecycleList) + rUserManagement.POST("/userDelete", member_center.UserManagementUserDelete) rUserManagement.GET("/getFans", member_center.UserManagementGetFans) rUserManagement.GET("/balanceDetail", member_center.UserManagementGetBalanceDetail) rUserManagement.GET("/getVirtualCoinDetail", member_center.UserManagementGetVirtualCoinDetail) diff --git a/app/svc/member_center/svc_user_management.go b/app/svc/member_center/svc_user_management.go index d7a099f..3dd1d48 100644 --- a/app/svc/member_center/svc_user_management.go +++ b/app/svc/member_center/svc_user_management.go @@ -33,6 +33,11 @@ func userManagementGetUsersBindQuery(engine *xorm.Engine, req *md.UserManagement session := engine.Table("user").Alias("a"). Join("LEFT OUTER", []string{"user", "b"}, "a.parent_uid = b.id"). Join("LEFT OUTER", "user_tag_records", "user_tag_records.uid = a.id") + if req.IsRecycle == "1" { + session = session.In("a.state", []string{"4"}) + } else { + session = session.In("a.state", []string{"1", "2"}) + } if req.ID != 0 { session = session.Where("a.id = ?", req.ID) } From ddf492d3955d60b3c774755021e40ca7acbe5eb5 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 11 Dec 2024 22:30:19 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BC=9A=E5=91=98=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E5=9B=9E=E6=94=B6=E7=AB=99=20=E4=BC=9A=E5=91=98=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.go | 208 +++++++++++++++++++++++++++++++++++++++++++++- docs/swagger.json | 203 +++++++++++++++++++++++++++++++++++++++++++- docs/swagger.yaml | 134 ++++++++++++++++++++++++++++- 3 files changed, 539 insertions(+), 6 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 21f0c18..db4402c 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,4 +1,5 @@ -// Package docs Code generated by swaggo/swag. DO NOT EDIT +// Code generated by swaggo/swag. DO NOT EDIT. + package docs import "github.com/swaggo/swag" @@ -1523,7 +1524,9 @@ const docTemplate = `{ "name": "req", "in": "body", "required": true, - "schema": {} + "schema": { + "type": "object" + } } ], "responses": { @@ -6723,6 +6726,194 @@ const docTemplate = `{ } } }, + "/api/memberCenter/userManagement/userDelete": { + "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.UserManagementUserInfoReq" + } + } + ], + "responses": { + "200": { + "description": "修改数据行数", + "schema": { + "type": "int" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/memberCenter/userManagement/userRecycle": { + "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.UserManagementUserInfoReq" + } + } + ], + "responses": { + "200": { + "description": "修改数据行数", + "schema": { + "type": "int" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/memberCenter/userManagement/userRecycleCancel": { + "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.UserManagementUserInfoReq" + } + } + ], + "responses": { + "200": { + "description": "修改数据行数", + "schema": { + "type": "int" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/memberCenter/userManagement/userRecycleList": { + "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.UserManagementGetUserListReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.UserManagementGetUserListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, "/api/notice/aliyunSms/file/phone": { "post": { "description": "短信推送记录-通知模板", @@ -15841,6 +16032,9 @@ const docTemplate = `{ "description": "是否实名 0.未实名,1.已实名", "type": "integer" }, + "is_recycle": { + "type": "string" + }, "level": { "description": "会员等级", "type": "integer" @@ -16033,6 +16227,14 @@ const docTemplate = `{ } } }, + "md.UserManagementUserInfoReq": { + "type": "object", + "properties": { + "uid": { + "type": "string" + } + } + }, "md.UserRealName": { "type": "object", "properties": { @@ -16609,8 +16811,6 @@ var SwaggerInfo = &swag.Spec{ Description: "管理后台接口文档", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, - LeftDelim: "{{", - RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index 6f9cd6b..98e7379 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1516,7 +1516,9 @@ "name": "req", "in": "body", "required": true, - "schema": {} + "schema": { + "type": "object" + } } ], "responses": { @@ -6716,6 +6718,194 @@ } } }, + "/api/memberCenter/userManagement/userDelete": { + "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.UserManagementUserInfoReq" + } + } + ], + "responses": { + "200": { + "description": "修改数据行数", + "schema": { + "type": "int" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/memberCenter/userManagement/userRecycle": { + "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.UserManagementUserInfoReq" + } + } + ], + "responses": { + "200": { + "description": "修改数据行数", + "schema": { + "type": "int" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/memberCenter/userManagement/userRecycleCancel": { + "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.UserManagementUserInfoReq" + } + } + ], + "responses": { + "200": { + "description": "修改数据行数", + "schema": { + "type": "int" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/memberCenter/userManagement/userRecycleList": { + "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.UserManagementGetUserListReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.UserManagementGetUserListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, "/api/notice/aliyunSms/file/phone": { "post": { "description": "短信推送记录-通知模板", @@ -15834,6 +16024,9 @@ "description": "是否实名 0.未实名,1.已实名", "type": "integer" }, + "is_recycle": { + "type": "string" + }, "level": { "description": "会员等级", "type": "integer" @@ -16026,6 +16219,14 @@ } } }, + "md.UserManagementUserInfoReq": { + "type": "object", + "properties": { + "uid": { + "type": "string" + } + } + }, "md.UserRealName": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 8718c3c..4d1a6d6 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -4760,6 +4760,8 @@ definitions: is_real_name: description: 是否实名 0.未实名,1.已实名 type: integer + is_recycle: + type: string level: description: 会员等级 type: integer @@ -4897,6 +4899,11 @@ definitions: description: 微信号 type: string type: object + md.UserManagementUserInfoReq: + properties: + uid: + type: string + type: object md.UserRealName: properties: create_time: @@ -6276,7 +6283,8 @@ paths: in: body name: req required: true - schema: {} + schema: + type: object produces: - application/json responses: @@ -9716,6 +9724,130 @@ paths: summary: 制度中心-会员中心-用户管理-会员明细概况(获取) tags: - 会员中心 + /api/memberCenter/userManagement/userDelete: + 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.UserManagementUserInfoReq' + produces: + - application/json + responses: + "200": + description: 修改数据行数 + schema: + type: int + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 会员中心-用户管理-永久删除 + tags: + - 会员中心 + /api/memberCenter/userManagement/userRecycle: + 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.UserManagementUserInfoReq' + produces: + - application/json + responses: + "200": + description: 修改数据行数 + schema: + type: int + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 会员中心-用户管理-删除到回收站 + tags: + - 会员中心 + /api/memberCenter/userManagement/userRecycleCancel: + 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.UserManagementUserInfoReq' + produces: + - application/json + responses: + "200": + description: 修改数据行数 + schema: + type: int + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 会员中心-用户管理-恢复到会员列表 + tags: + - 会员中心 + /api/memberCenter/userManagement/userRecycleList: + 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.UserManagementGetUserListReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.UserManagementGetUserListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 会员中心-用户管理-回收站列表 + tags: + - 会员中心 /api/notice/aliyunSms/file/phone: post: consumes: