From 6a69c304c65f71df98a9972a7e28a19b9d2ff8ac Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 11 Dec 2024 21:14:57 +0800 Subject: [PATCH 1/4] 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 2/4] 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 3/4] 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 4/4] 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