diff --git a/app/hdl/marketing_applications/new_user_red_package/hdl_basic.go b/app/hdl/marketing_applications/new_user_red_package/hdl_basic.go index 1ada836..3d49428 100644 --- a/app/hdl/marketing_applications/new_user_red_package/hdl_basic.go +++ b/app/hdl/marketing_applications/new_user_red_package/hdl_basic.go @@ -11,15 +11,15 @@ import ( ) // NewUserRedPackageGetBasic -// @Summary 制度中心-新人红包-新人红包设置(获取) -// @Tags 新人红包 +// @Summary 制度中心-营销应用-新人红包设置(获取) +// @Tags 营销应用 // @Description 新人红包设置(获取) // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" // @Success 200 {object} md.NewUserRedPackageGetBasicResp "具体数据" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/institutionalManagement/newUserRedPackage/getBasic [get] +// @Router /api/marketingApplications/newUserRedPackage/getBasic [get] func NewUserRedPackageGetBasic(c *gin.Context) { redPackageDb := implement.NewNewUserRedPackageDb(db.Db) setting, err := redPackageDb.NewUserRedPackageGetOne() @@ -57,8 +57,8 @@ func NewUserRedPackageGetBasic(c *gin.Context) { } // NewUserRedPackageUpdateBasic -// @Summary 制度中心-新人红包-新人红包设置(修改) -// @Tags 新人红包 +// @Summary 制度中心-营销应用-新人红包设置(修改) +// @Tags 营销应用 // @Description 新人红包设置(修改) // @Accept json // @Produce json @@ -66,7 +66,7 @@ func NewUserRedPackageGetBasic(c *gin.Context) { // @Param req body md.NewUserRedPackageUpdateBasicReq true "新人红包设置表单" // @Success 200 {string} "success" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/institutionalManagement/newUserRedPackage/updateBasic [put] +// @Router /api/marketingApplications/newUserRedPackage/updateBasic [put] func NewUserRedPackageUpdateBasic(c *gin.Context) { var req *md.NewUserRedPackageUpdateBasicReq if err := c.ShouldBindJSON(&req); err != nil { @@ -105,16 +105,16 @@ func NewUserRedPackageUpdateBasic(c *gin.Context) { } // NewUserRedPackageRecordList -// @Summary 制度中心-新人红包-新人红包列表(查询) -// @Tags 新人红包 +// @Summary 制度中心-营销应用-新人红包列表(查询) +// @Tags 营销应用 // @Description 新人红包列表(查询) // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" // @Param req body md.NewUserRedPackageRecordListReq true "新人红包列表查询条件(分页信息必填)" -// @Success 200 {object} md.PaginateResp "具体数据" +// @Success 200 {object} md.NewUserRedPackageRecordListResp "具体数据" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/institutionalManagement/newUserRedPackage/recordList [post] +// @Router /api/marketingApplications/newUserRedPackage/recordList [post] func NewUserRedPackageRecordList(c *gin.Context) { var req *md.NewUserRedPackageRecordListReq if err := c.ShouldBindJSON(&req); err != nil { @@ -142,7 +142,7 @@ func NewUserRedPackageRecordList(c *gin.Context) { list[i].UpdateAt = record.UpdateAt } - resp := md.PaginateResp{ + resp := md.NewUserRedPackageRecordListResp{ List: list, Paginate: md.Paginate{ Page: req.Page, @@ -155,16 +155,16 @@ func NewUserRedPackageRecordList(c *gin.Context) { } // NewUserRedPackageRecordFlowList -// @Summary 制度中心-新人红包-新人红包列表明细(查询) -// @Tags 新人红包 +// @Summary 制度中心-营销应用-新人红包列表明细(查询) +// @Tags 营销应用 // @Description 新人红包列表明细(查询) // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" // @Param req body md.NewUserRedPackageRecordFlowListReq true "新人红包列表明细查询条件(分页信息、用户 ID必填)" -// @Success 200 {object} md.PaginateResp "具体数据" +// @Success 200 {object} md.NewUserRedPackageRecordFlowListResp "具体数据" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/institutionalManagement/newUserRedPackage/recordFlowList [post] +// @Router /api/marketingApplications/newUserRedPackage/recordFlowList [post] func NewUserRedPackageRecordFlowList(c *gin.Context) { var req *md.NewUserRedPackageRecordFlowListReq if err := c.ShouldBindJSON(&req); err != nil { @@ -193,7 +193,7 @@ func NewUserRedPackageRecordFlowList(c *gin.Context) { list[i].CreateAt = flow.CreateAt } - resp := md.PaginateResp{ + resp := md.NewUserRedPackageRecordFlowListResp{ List: list, Paginate: md.Paginate{ Page: req.Page, diff --git a/app/md/institutional_management/new_user_red_package/md_basic.go b/app/md/institutional_management/new_user_red_package/md_basic.go index f137cad..fed3ead 100644 --- a/app/md/institutional_management/new_user_red_package/md_basic.go +++ b/app/md/institutional_management/new_user_red_package/md_basic.go @@ -1,21 +1,11 @@ package md -type PaginateReq struct { - Page int `form:"page" json:"page" binding:"required"` - Limit int `form:"limit" json:"limit" binding:"required"` -} - type Paginate struct { Page int `json:"page"` Limit int `json:"limit"` Total int64 `json:"total"` } - -type PaginateResp struct { - List interface{} `json:"list"` - Paginate Paginate `json:"paginate"` -} - + type NewUserRedPackageGetBasicResp struct { IsOpen int `json:"is_open"` // 是否开启(1:开启 0:关闭) TotalAmount string `json:"total_amount" example:"总金额"` @@ -53,6 +43,11 @@ type NewUserRedPackageRecordNode struct { UpdateAt string `json:"update_at"` // 修改时间 } +type NewUserRedPackageRecordListResp struct { + List []NewUserRedPackageRecordNode `json:"list"` + Paginate Paginate `json:"paginate"` +} + type NewUserRedPackageRecordFlowListReq struct { Uid int64 `json:"uid,required"` // 用户 ID Page int `json:"page,required"` // 页数 @@ -74,3 +69,8 @@ type NewUserRedPackageRecordFlowNode struct { ReceiveDays int `json:"receive_days"` // 领取天数 CreateAt string `json:"create_at"` // 创建时间 } + +type NewUserRedPackageRecordFlowListResp struct { + List []NewUserRedPackageRecordFlowNode `json:"list"` + Paginate Paginate `json:"paginate"` +} diff --git a/app/task/svc/svc_save_egg_energy_price.go b/app/task/svc/svc_save_egg_energy_price.go index 5303094..dab3294 100644 --- a/app/task/svc/svc_save_egg_energy_price.go +++ b/app/task/svc/svc_save_egg_energy_price.go @@ -1,9 +1,11 @@ package svc import ( + "applet/app/cfg" "applet/app/utils" "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + "code.fnuoos.com/EggPlanet/egg_system_rules.git" "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/svc" "errors" "fmt" @@ -32,15 +34,9 @@ func SaveEggEnergyPrice(engine *xorm.Engine, dbName string) { fmt.Println("SaveEggEnergyPrice_ERR:::::", err.Error()) return } - if has { - // 2. 判断最后一条记录是否间隔一个小时 不能在同一天的同一小时 - if lastPrice.Date == dateNowStr && lastPrice.Hour == hourNowStr { - fmt.Println("当前小时已记录过价格") - return - } - } - // 3. 查询当前价格 + // 2. 查询当前价格 + egg_system_rules.Init(cfg.RedisAddr) eggEnergyCoreData, cb, err1 := svc.GetEggEnergyCoreData(engine) if err1 != nil { fmt.Println("SaveEggEnergyPrice_ERR:::::", err1.Error()) @@ -50,20 +46,36 @@ func SaveEggEnergyPrice(engine *xorm.Engine, dbName string) { defer cb() // 释放锁 } - // 4. 保存当前价格 - priceData := model.EggEnergyPrice{ - Price: eggEnergyCoreData.NowPrice, - Date: dateNowStr, - Hour: hourNowStr, - } - id, err2 := priceDb.EggEnergyPriceInsert(&priceData) - if err2 != nil { - fmt.Println("SaveEggEnergyPrice_ERR:::::", err2.Error()) - return - } - if id == 0 { - fmt.Println("SaveEggEnergyPrice_ERR:::::", errors.New(fmt.Sprintf("%s 新增价格失败, 当前价格 %s", now.Format("2006-01-02 15:04:05"), eggEnergyCoreData.NowPrice))) - return + if has { + // 3. 当前时间已经有记录 更新价格 + if lastPrice.Date == dateNowStr && lastPrice.Hour == hourNowStr { + lastPrice.Price = eggEnergyCoreData.NowPrice + affected, err2 := priceDb.EggEnergyPriceUpdate(lastPrice) + if err2 != nil { + fmt.Println("SaveEggEnergyPrice_ERR:::::", err2.Error()) + return + } + if affected == 0 { + fmt.Println("SaveEggEnergyPrice_ERR:::::", errors.New(fmt.Sprintf("%s 新增价格失败, 当前价格 %s", now.Format("2006-01-02 15:04:05"), eggEnergyCoreData.NowPrice))) + return + } + } + } else { + // 4. 保存当前价格 + priceData := model.EggEnergyPrice{ + Price: eggEnergyCoreData.NowPrice, + Date: dateNowStr, + Hour: hourNowStr, + } + id, err2 := priceDb.EggEnergyPriceInsert(&priceData) + if err2 != nil { + fmt.Println("SaveEggEnergyPrice_ERR:::::", err2.Error()) + return + } + if id == 0 { + fmt.Println("SaveEggEnergyPrice_ERR:::::", errors.New(fmt.Sprintf("%s 新增价格失败, 当前价格 %s", now.Format("2006-01-02 15:04:05"), eggEnergyCoreData.NowPrice))) + return + } } return } diff --git a/docs/docs.go b/docs/docs.go index 9df249e..1adf59f 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -909,9 +909,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/newUserRedPackage/getBasic": { - "get": { - "description": "新人红包设置(获取)", + "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd": { + "post": { + "description": "社区分红(新增)", "consumes": [ "application/json" ], @@ -919,9 +919,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "新人红包" + "公排管理" ], - "summary": "制度中心-新人红包-新人红包设置(获取)", + "summary": "制度中心-公排管理-社区分红(新增)", "parameters": [ { "type": "string", @@ -929,13 +929,22 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "分红名称、分红总量", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AddCommunityDividendsReq" + } } ], "responses": { "200": { - "description": "具体数据", + "description": "成功", "schema": { - "$ref": "#/definitions/md.NewUserRedPackageGetBasicResp" + "type": "success" } }, "400": { @@ -947,9 +956,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/newUserRedPackage/recordFlowList": { + "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsList": { "post": { - "description": "新人红包列表明细(查询)", + "description": "社区分红(查询)", "consumes": [ "application/json" ], @@ -957,9 +966,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "新人红包" + "公排管理" ], - "summary": "制度中心-新人红包-新人红包列表明细(查询)", + "summary": "制度中心-公排管理-社区分红(查询)", "parameters": [ { "type": "string", @@ -969,12 +978,12 @@ const docTemplate = `{ "required": true }, { - "description": "新人红包列表明细查询条件(分页信息、用户 ID必填)", + "description": "页数、每页大小必填 起止时间、起止数量选填", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NewUserRedPackageRecordFlowListReq" + "$ref": "#/definitions/md.ListCommunityDividendsReq" } } ], @@ -982,7 +991,7 @@ const docTemplate = `{ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.PaginateResp" + "$ref": "#/definitions/md.ListCommunityDividendsResp" } }, "400": { @@ -994,9 +1003,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/newUserRedPackage/recordList": { + "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserAdd": { "post": { - "description": "新人红包列表(查询)", + "description": "社区长列表(新增)", "consumes": [ "application/json" ], @@ -1004,9 +1013,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "新人红包" + "公排管理" ], - "summary": "制度中心-新人红包-新人红包列表(查询)", + "summary": "制度中心-公排管理-社区长列表(新增)", "parameters": [ { "type": "string", @@ -1016,20 +1025,20 @@ const docTemplate = `{ "required": true }, { - "description": "新人红包列表查询条件(分页信息必填)", + "description": "新增社区长 ID、备注", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NewUserRedPackageRecordListReq" + "$ref": "#/definitions/md.AddCommunityDividendsWithUserReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "插入数据 ID", "schema": { - "$ref": "#/definitions/md.PaginateResp" + "type": "int" } }, "400": { @@ -1041,9 +1050,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/newUserRedPackage/updateBasic": { - "put": { - "description": "新人红包设置(修改)", + "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList": { + "post": { + "description": "社区长列表(查询)", "consumes": [ "application/json" ], @@ -1051,9 +1060,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "新人红包" + "公排管理" ], - "summary": "制度中心-新人红包-新人红包设置(修改)", + "summary": "制度中心-公排管理-社区长列表(查询)", "parameters": [ { "type": "string", @@ -1063,20 +1072,20 @@ const docTemplate = `{ "required": true }, { - "description": "新人红包设置表单", + "description": "页数、每页大小必填 手机号、用户ID选填", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NewUserRedPackageUpdateBasicReq" + "$ref": "#/definitions/md.ListCommunityDividendsWithUserReq" } } ], "responses": { "200": { - "description": "success", + "description": "社区长列表", "schema": { - "type": "string" + "$ref": "#/definitions/md.ListCommunityDividendsWithUserResp" } }, "400": { @@ -1088,9 +1097,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd": { + "/api/institutionalManagement/publicPlatoon/exchangeUserPosition": { "post": { - "description": "社区分红(新增)", + "description": "关系分布图(位置转换)", "consumes": [ "application/json" ], @@ -1100,7 +1109,7 @@ const docTemplate = `{ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-社区分红(新增)", + "summary": "制度中心-公排管理-关系分布图(位置转换)", "parameters": [ { "type": "string", @@ -1110,20 +1119,20 @@ const docTemplate = `{ "required": true }, { - "description": "分红名称、分红总量", + "description": "需要交换的两个位置", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AddCommunityDividendsReq" + "$ref": "#/definitions/md.ExchangeUserPositionReq" } } ], "responses": { "200": { - "description": "成功", + "description": "成功返回", "schema": { - "type": "success" + "type": "" } }, "400": { @@ -1135,9 +1144,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsList": { - "post": { - "description": "社区分红(查询)", + "/api/institutionalManagement/publicPlatoon/findSubUserRelationshipMap": { + "get": { + "description": "关系分布图(获取指定用户上级)", "consumes": [ "application/json" ], @@ -1147,7 +1156,7 @@ const docTemplate = `{ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-社区分红(查询)", + "summary": "制度中心-公排管理-关系分布图(获取指定用户上级)", "parameters": [ { "type": "string", @@ -1157,20 +1166,18 @@ const docTemplate = `{ "required": true }, { - "description": "页数、每页大小必填 起止时间、起止数量选填", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.ListCommunityDividendsReq" - } + "type": "string", + "description": "用户ID", + "name": "uid", + "in": "query", + "required": true } ], "responses": { "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.ListCommunityDividendsResp" + "$ref": "#/definitions/md.FindSubUserRelationshipMapResp" } }, "400": { @@ -1182,9 +1189,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserAdd": { - "post": { - "description": "社区长列表(新增)", + "/api/institutionalManagement/publicPlatoon/findUserRelationshipMap": { + "get": { + "description": "关系分布图(获取指定用户下级)", "consumes": [ "application/json" ], @@ -1194,7 +1201,7 @@ const docTemplate = `{ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-社区长列表(新增)", + "summary": "制度中心-公排管理-关系分布图(获取指定用户下级)", "parameters": [ { "type": "string", @@ -1204,20 +1211,18 @@ const docTemplate = `{ "required": true }, { - "description": "新增社区长 ID、备注", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.AddCommunityDividendsWithUserReq" - } + "type": "string", + "description": "用户ID", + "name": "uid", + "in": "query", + "required": true } ], "responses": { "200": { - "description": "插入数据 ID", + "description": "具体数据", "schema": { - "type": "int" + "$ref": "#/definitions/md.TreeNode" } }, "400": { @@ -1229,9 +1234,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList": { - "post": { - "description": "社区长列表(查询)", + "/api/institutionalManagement/publicPlatoon/getBasic": { + "get": { + "description": "公排基础设置(获取)", "consumes": [ "application/json" ], @@ -1241,7 +1246,7 @@ const docTemplate = `{ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-社区长列表(查询)", + "summary": "制度中心-公排管理-公排基础设置(获取)", "parameters": [ { "type": "string", @@ -1249,22 +1254,13 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true - }, - { - "description": "页数、每页大小必填 手机号、用户ID选填", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.ListCommunityDividendsWithUserReq" - } } ], "responses": { "200": { - "description": "社区长列表", + "description": "具体数据", "schema": { - "$ref": "#/definitions/md.ListCommunityDividendsWithUserResp" + "$ref": "#/definitions/md.GetPublicPlatoonBasicResp" } }, "400": { @@ -1276,9 +1272,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/exchangeUserPosition": { + "/api/institutionalManagement/publicPlatoon/publicPlatoonUserFreePunish/index": { "post": { - "description": "关系分布图(位置转换)", + "description": "免罚用户(查询)", "consumes": [ "application/json" ], @@ -1288,7 +1284,7 @@ const docTemplate = `{ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-关系分布图(位置转换)", + "summary": "制度中心-公排管理-免罚用户(查询)", "parameters": [ { "type": "string", @@ -1298,12 +1294,12 @@ const docTemplate = `{ "required": true }, { - "description": "需要交换的两个位置", + "description": "页数和行数必填,uid选填", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.ExchangeUserPositionReq" + "$ref": "#/definitions/md.GetFreePublishUserReq" } } ], @@ -1311,7 +1307,7 @@ const docTemplate = `{ "200": { "description": "成功返回", "schema": { - "type": "" + "$ref": "#/definitions/md.GetFreePublishUserResp" } }, "400": { @@ -1323,9 +1319,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/findSubUserRelationshipMap": { - "get": { - "description": "关系分布图(获取指定用户上级)", + "/api/institutionalManagement/publicPlatoon/publicPlatoonUserFreePunish/save": { + "post": { + "description": "免罚用户(新增)", "consumes": [ "application/json" ], @@ -1335,7 +1331,7 @@ const docTemplate = `{ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-关系分布图(获取指定用户上级)", + "summary": "制度中心-公排管理-免罚用户(新增)", "parameters": [ { "type": "string", @@ -1345,18 +1341,20 @@ const docTemplate = `{ "required": true }, { - "type": "string", - "description": "用户ID", - "name": "uid", - "in": "query", - "required": true + "description": "页数和行数必填,uid选填", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AddFreePublishUserReq" + } } ], "responses": { "200": { - "description": "具体数据", + "description": "插入数据 ID", "schema": { - "$ref": "#/definitions/md.FindSubUserRelationshipMapResp" + "type": "int" } }, "400": { @@ -1368,9 +1366,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/findUserRelationshipMap": { + "/api/institutionalManagement/publicPlatoon/relationshipMap": { "get": { - "description": "关系分布图(获取指定用户下级)", + "description": "关系分布图(获取)", "consumes": [ "application/json" ], @@ -1380,7 +1378,7 @@ const docTemplate = `{ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-关系分布图(获取指定用户下级)", + "summary": "制度中心-公排管理-关系分布图(获取)", "parameters": [ { "type": "string", @@ -1391,7 +1389,14 @@ const docTemplate = `{ }, { "type": "string", - "description": "用户ID", + "description": "phone", + "name": "phone", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "uid", "name": "uid", "in": "query", "required": true @@ -1413,9 +1418,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/getBasic": { - "get": { - "description": "公排基础设置(获取)", + "/api/institutionalManagement/publicPlatoon/updateBasic": { + "put": { + "description": "公排基础设置(修改)", "consumes": [ "application/json" ], @@ -1425,7 +1430,7 @@ const docTemplate = `{ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-公排基础设置(获取)", + "summary": "制度中心-公排管理-公排基础设置(修改)", "parameters": [ { "type": "string", @@ -1433,13 +1438,22 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "公排设置表单内容", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdatePublicPlatoonBasicReq" + } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", "schema": { - "$ref": "#/definitions/md.GetPublicPlatoonBasicResp" + "type": "string" } }, "400": { @@ -1451,9 +1465,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/publicPlatoonUserFreePunish/index": { + "/api/institutionalManagement/publicPlatoon/userDailyActivityAnalysis/index": { "post": { - "description": "免罚用户(查询)", + "description": "日活分析", "consumes": [ "application/json" ], @@ -1463,7 +1477,7 @@ const docTemplate = `{ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-免罚用户(查询)", + "summary": "制度中心-公排管理-日活分析", "parameters": [ { "type": "string", @@ -1473,20 +1487,20 @@ const docTemplate = `{ "required": true }, { - "description": "页数和行数必填,uid选填", + "description": "用户 ID、查询开始时间、结束时间(查询时间不超过30天)、页数、每页大小", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.GetFreePublishUserReq" + "$ref": "#/definitions/md.UserDailyActivityAnalysisReq" } } ], "responses": { "200": { - "description": "成功返回", + "description": "具体数据", "schema": { - "$ref": "#/definitions/md.GetFreePublishUserResp" + "$ref": "#/definitions/md.UserDailyActivityAnalysisResp" } }, "400": { @@ -1498,9 +1512,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/publicPlatoonUserFreePunish/save": { + "/api/login": { "post": { - "description": "免罚用户(新增)", + "description": "登入", "consumes": [ "application/json" ], @@ -1508,32 +1522,25 @@ const docTemplate = `{ "application/json" ], "tags": [ - "公排管理" + "登录" ], - "summary": "制度中心-公排管理-免罚用户(新增)", + "summary": "登陆", "parameters": [ { - "type": "string", - "description": "验证参数Bearer和token空格拼接", - "name": "Authorization", - "in": "header", - "required": true - }, - { - "description": "页数和行数必填,uid选填", + "description": "用户名密码", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AddFreePublishUserReq" + "$ref": "#/definitions/md.LoginReq" } } ], "responses": { "200": { - "description": "插入数据 ID", + "description": "token", "schema": { - "type": "int" + "$ref": "#/definitions/md.LoginResponse" } }, "400": { @@ -1545,9 +1552,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/relationshipMap": { + "/api/marketingApplications/newUserRedPackage/getBasic": { "get": { - "description": "关系分布图(获取)", + "description": "新人红包设置(获取)", "consumes": [ "application/json" ], @@ -1555,9 +1562,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "公排管理" + "营销应用" ], - "summary": "制度中心-公排管理-关系分布图(获取)", + "summary": "制度中心-营销应用-新人红包设置(获取)", "parameters": [ { "type": "string", @@ -1565,27 +1572,13 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true - }, - { - "type": "string", - "description": "phone", - "name": "phone", - "in": "query", - "required": true - }, - { - "type": "string", - "description": "uid", - "name": "uid", - "in": "query", - "required": true } ], "responses": { "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.TreeNode" + "$ref": "#/definitions/md.NewUserRedPackageGetBasicResp" } }, "400": { @@ -1597,9 +1590,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/updateBasic": { - "put": { - "description": "公排基础设置(修改)", + "/api/marketingApplications/newUserRedPackage/recordFlowList": { + "post": { + "description": "新人红包列表明细(查询)", "consumes": [ "application/json" ], @@ -1607,9 +1600,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "公排管理" + "营销应用" ], - "summary": "制度中心-公排管理-公排基础设置(修改)", + "summary": "制度中心-营销应用-新人红包列表明细(查询)", "parameters": [ { "type": "string", @@ -1619,20 +1612,20 @@ const docTemplate = `{ "required": true }, { - "description": "公排设置表单内容", + "description": "新人红包列表明细查询条件(分页信息、用户 ID必填)", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdatePublicPlatoonBasicReq" + "$ref": "#/definitions/md.NewUserRedPackageRecordFlowListReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.NewUserRedPackageRecordFlowListResp" } }, "400": { @@ -1644,9 +1637,9 @@ const docTemplate = `{ } } }, - "/api/institutionalManagement/publicPlatoon/userDailyActivityAnalysis/index": { + "/api/marketingApplications/newUserRedPackage/recordList": { "post": { - "description": "日活分析", + "description": "新人红包列表(查询)", "consumes": [ "application/json" ], @@ -1654,9 +1647,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "公排管理" + "营销应用" ], - "summary": "制度中心-公排管理-日活分析", + "summary": "制度中心-营销应用-新人红包列表(查询)", "parameters": [ { "type": "string", @@ -1666,12 +1659,12 @@ const docTemplate = `{ "required": true }, { - "description": "用户 ID、查询开始时间、结束时间(查询时间不超过30天)、页数、每页大小", + "description": "新人红包列表查询条件(分页信息必填)", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UserDailyActivityAnalysisReq" + "$ref": "#/definitions/md.NewUserRedPackageRecordListReq" } } ], @@ -1679,7 +1672,7 @@ const docTemplate = `{ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.UserDailyActivityAnalysisResp" + "$ref": "#/definitions/md.NewUserRedPackageRecordListResp" } }, "400": { @@ -1691,9 +1684,9 @@ const docTemplate = `{ } } }, - "/api/login": { - "post": { - "description": "登入", + "/api/marketingApplications/newUserRedPackage/updateBasic": { + "put": { + "description": "新人红包设置(修改)", "consumes": [ "application/json" ], @@ -1701,25 +1694,32 @@ const docTemplate = `{ "application/json" ], "tags": [ - "登录" + "营销应用" ], - "summary": "登陆", + "summary": "制度中心-营销应用-新人红包设置(修改)", "parameters": [ { - "description": "用户名密码", + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "新人红包设置表单", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.LoginReq" + "$ref": "#/definitions/md.NewUserRedPackageUpdateBasicReq" } } ], "responses": { "200": { - "description": "token", + "description": "success", "schema": { - "$ref": "#/definitions/md.LoginResponse" + "type": "string" } }, "400": { @@ -3126,6 +3126,69 @@ const docTemplate = `{ } } }, + "md.NewUserRedPackageRecordFlowListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.NewUserRedPackageRecordFlowNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate" + } + } + }, + "md.NewUserRedPackageRecordFlowNode": { + "type": "object", + "properties": { + "balance_amount": { + "description": "剩余金额", + "type": "string" + }, + "balance_days": { + "description": "剩余天数", + "type": "integer" + }, + "basic_amount": { + "description": "基础金额", + "type": "string" + }, + "create_at": { + "description": "创建时间", + "type": "string" + }, + "day_num": { + "description": "第x天", + "type": "integer" + }, + "double_rate": { + "description": "倍率", + "type": "string" + }, + "id": { + "description": "流水 ID", + "type": "integer" + }, + "is_double": { + "description": "是否翻倍", + "type": "integer" + }, + "receive_days": { + "description": "领取天数", + "type": "integer" + }, + "total_amount": { + "description": "实际金额", + "type": "string" + }, + "uid": { + "description": "用户 ID", + "type": "integer" + } + } + }, "md.NewUserRedPackageRecordListReq": { "type": "object", "properties": { @@ -3151,6 +3214,65 @@ const docTemplate = `{ } } }, + "md.NewUserRedPackageRecordListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.NewUserRedPackageRecordNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate" + } + } + }, + "md.NewUserRedPackageRecordNode": { + "type": "object", + "properties": { + "balance_amount": { + "description": "剩余金额", + "type": "string" + }, + "balance_days": { + "description": "剩余天数", + "type": "integer" + }, + "create_at": { + "description": "创建时间", + "type": "string" + }, + "days": { + "description": "天数", + "type": "integer" + }, + "receive_days": { + "description": "领取天数", + "type": "integer" + }, + "state": { + "description": "状态(0:待领取 1:领取中 2:已领取 3:已冻结)", + "type": "integer" + }, + "system_id": { + "description": "系统中记录的 ID", + "type": "integer" + }, + "total_amount": { + "description": "金额", + "type": "string" + }, + "uid": { + "description": "用户 ID", + "type": "integer" + }, + "update_at": { + "description": "修改时间", + "type": "string" + } + } + }, "md.NewUserRedPackageUpdateBasicReq": { "type": "object", "properties": { @@ -3189,15 +3311,6 @@ const docTemplate = `{ } } }, - "md.PaginateResp": { - "type": "object", - "properties": { - "list": {}, - "paginate": { - "$ref": "#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate" - } - } - }, "md.PlatformRevenueDataNode": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 2a07e5e..f1e6e51 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -902,9 +902,9 @@ } } }, - "/api/institutionalManagement/newUserRedPackage/getBasic": { - "get": { - "description": "新人红包设置(获取)", + "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd": { + "post": { + "description": "社区分红(新增)", "consumes": [ "application/json" ], @@ -912,9 +912,9 @@ "application/json" ], "tags": [ - "新人红包" + "公排管理" ], - "summary": "制度中心-新人红包-新人红包设置(获取)", + "summary": "制度中心-公排管理-社区分红(新增)", "parameters": [ { "type": "string", @@ -922,13 +922,22 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "分红名称、分红总量", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AddCommunityDividendsReq" + } } ], "responses": { "200": { - "description": "具体数据", + "description": "成功", "schema": { - "$ref": "#/definitions/md.NewUserRedPackageGetBasicResp" + "type": "success" } }, "400": { @@ -940,9 +949,9 @@ } } }, - "/api/institutionalManagement/newUserRedPackage/recordFlowList": { + "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsList": { "post": { - "description": "新人红包列表明细(查询)", + "description": "社区分红(查询)", "consumes": [ "application/json" ], @@ -950,9 +959,9 @@ "application/json" ], "tags": [ - "新人红包" + "公排管理" ], - "summary": "制度中心-新人红包-新人红包列表明细(查询)", + "summary": "制度中心-公排管理-社区分红(查询)", "parameters": [ { "type": "string", @@ -962,12 +971,12 @@ "required": true }, { - "description": "新人红包列表明细查询条件(分页信息、用户 ID必填)", + "description": "页数、每页大小必填 起止时间、起止数量选填", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NewUserRedPackageRecordFlowListReq" + "$ref": "#/definitions/md.ListCommunityDividendsReq" } } ], @@ -975,7 +984,7 @@ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.PaginateResp" + "$ref": "#/definitions/md.ListCommunityDividendsResp" } }, "400": { @@ -987,9 +996,9 @@ } } }, - "/api/institutionalManagement/newUserRedPackage/recordList": { + "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserAdd": { "post": { - "description": "新人红包列表(查询)", + "description": "社区长列表(新增)", "consumes": [ "application/json" ], @@ -997,9 +1006,9 @@ "application/json" ], "tags": [ - "新人红包" + "公排管理" ], - "summary": "制度中心-新人红包-新人红包列表(查询)", + "summary": "制度中心-公排管理-社区长列表(新增)", "parameters": [ { "type": "string", @@ -1009,20 +1018,20 @@ "required": true }, { - "description": "新人红包列表查询条件(分页信息必填)", + "description": "新增社区长 ID、备注", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NewUserRedPackageRecordListReq" + "$ref": "#/definitions/md.AddCommunityDividendsWithUserReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "插入数据 ID", "schema": { - "$ref": "#/definitions/md.PaginateResp" + "type": "int" } }, "400": { @@ -1034,9 +1043,9 @@ } } }, - "/api/institutionalManagement/newUserRedPackage/updateBasic": { - "put": { - "description": "新人红包设置(修改)", + "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList": { + "post": { + "description": "社区长列表(查询)", "consumes": [ "application/json" ], @@ -1044,9 +1053,9 @@ "application/json" ], "tags": [ - "新人红包" + "公排管理" ], - "summary": "制度中心-新人红包-新人红包设置(修改)", + "summary": "制度中心-公排管理-社区长列表(查询)", "parameters": [ { "type": "string", @@ -1056,20 +1065,20 @@ "required": true }, { - "description": "新人红包设置表单", + "description": "页数、每页大小必填 手机号、用户ID选填", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NewUserRedPackageUpdateBasicReq" + "$ref": "#/definitions/md.ListCommunityDividendsWithUserReq" } } ], "responses": { "200": { - "description": "success", + "description": "社区长列表", "schema": { - "type": "string" + "$ref": "#/definitions/md.ListCommunityDividendsWithUserResp" } }, "400": { @@ -1081,9 +1090,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd": { + "/api/institutionalManagement/publicPlatoon/exchangeUserPosition": { "post": { - "description": "社区分红(新增)", + "description": "关系分布图(位置转换)", "consumes": [ "application/json" ], @@ -1093,7 +1102,7 @@ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-社区分红(新增)", + "summary": "制度中心-公排管理-关系分布图(位置转换)", "parameters": [ { "type": "string", @@ -1103,20 +1112,20 @@ "required": true }, { - "description": "分红名称、分红总量", + "description": "需要交换的两个位置", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AddCommunityDividendsReq" + "$ref": "#/definitions/md.ExchangeUserPositionReq" } } ], "responses": { "200": { - "description": "成功", + "description": "成功返回", "schema": { - "type": "success" + "type": "" } }, "400": { @@ -1128,9 +1137,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsList": { - "post": { - "description": "社区分红(查询)", + "/api/institutionalManagement/publicPlatoon/findSubUserRelationshipMap": { + "get": { + "description": "关系分布图(获取指定用户上级)", "consumes": [ "application/json" ], @@ -1140,7 +1149,7 @@ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-社区分红(查询)", + "summary": "制度中心-公排管理-关系分布图(获取指定用户上级)", "parameters": [ { "type": "string", @@ -1150,20 +1159,18 @@ "required": true }, { - "description": "页数、每页大小必填 起止时间、起止数量选填", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.ListCommunityDividendsReq" - } + "type": "string", + "description": "用户ID", + "name": "uid", + "in": "query", + "required": true } ], "responses": { "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.ListCommunityDividendsResp" + "$ref": "#/definitions/md.FindSubUserRelationshipMapResp" } }, "400": { @@ -1175,9 +1182,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserAdd": { - "post": { - "description": "社区长列表(新增)", + "/api/institutionalManagement/publicPlatoon/findUserRelationshipMap": { + "get": { + "description": "关系分布图(获取指定用户下级)", "consumes": [ "application/json" ], @@ -1187,7 +1194,7 @@ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-社区长列表(新增)", + "summary": "制度中心-公排管理-关系分布图(获取指定用户下级)", "parameters": [ { "type": "string", @@ -1197,20 +1204,18 @@ "required": true }, { - "description": "新增社区长 ID、备注", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.AddCommunityDividendsWithUserReq" - } + "type": "string", + "description": "用户ID", + "name": "uid", + "in": "query", + "required": true } ], "responses": { "200": { - "description": "插入数据 ID", + "description": "具体数据", "schema": { - "type": "int" + "$ref": "#/definitions/md.TreeNode" } }, "400": { @@ -1222,9 +1227,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsWithUserList": { - "post": { - "description": "社区长列表(查询)", + "/api/institutionalManagement/publicPlatoon/getBasic": { + "get": { + "description": "公排基础设置(获取)", "consumes": [ "application/json" ], @@ -1234,7 +1239,7 @@ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-社区长列表(查询)", + "summary": "制度中心-公排管理-公排基础设置(获取)", "parameters": [ { "type": "string", @@ -1242,22 +1247,13 @@ "name": "Authorization", "in": "header", "required": true - }, - { - "description": "页数、每页大小必填 手机号、用户ID选填", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.ListCommunityDividendsWithUserReq" - } } ], "responses": { "200": { - "description": "社区长列表", + "description": "具体数据", "schema": { - "$ref": "#/definitions/md.ListCommunityDividendsWithUserResp" + "$ref": "#/definitions/md.GetPublicPlatoonBasicResp" } }, "400": { @@ -1269,9 +1265,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/exchangeUserPosition": { + "/api/institutionalManagement/publicPlatoon/publicPlatoonUserFreePunish/index": { "post": { - "description": "关系分布图(位置转换)", + "description": "免罚用户(查询)", "consumes": [ "application/json" ], @@ -1281,7 +1277,7 @@ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-关系分布图(位置转换)", + "summary": "制度中心-公排管理-免罚用户(查询)", "parameters": [ { "type": "string", @@ -1291,12 +1287,12 @@ "required": true }, { - "description": "需要交换的两个位置", + "description": "页数和行数必填,uid选填", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.ExchangeUserPositionReq" + "$ref": "#/definitions/md.GetFreePublishUserReq" } } ], @@ -1304,7 +1300,7 @@ "200": { "description": "成功返回", "schema": { - "type": "" + "$ref": "#/definitions/md.GetFreePublishUserResp" } }, "400": { @@ -1316,9 +1312,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/findSubUserRelationshipMap": { - "get": { - "description": "关系分布图(获取指定用户上级)", + "/api/institutionalManagement/publicPlatoon/publicPlatoonUserFreePunish/save": { + "post": { + "description": "免罚用户(新增)", "consumes": [ "application/json" ], @@ -1328,7 +1324,7 @@ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-关系分布图(获取指定用户上级)", + "summary": "制度中心-公排管理-免罚用户(新增)", "parameters": [ { "type": "string", @@ -1338,18 +1334,20 @@ "required": true }, { - "type": "string", - "description": "用户ID", - "name": "uid", - "in": "query", - "required": true + "description": "页数和行数必填,uid选填", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AddFreePublishUserReq" + } } ], "responses": { "200": { - "description": "具体数据", + "description": "插入数据 ID", "schema": { - "$ref": "#/definitions/md.FindSubUserRelationshipMapResp" + "type": "int" } }, "400": { @@ -1361,9 +1359,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/findUserRelationshipMap": { + "/api/institutionalManagement/publicPlatoon/relationshipMap": { "get": { - "description": "关系分布图(获取指定用户下级)", + "description": "关系分布图(获取)", "consumes": [ "application/json" ], @@ -1373,7 +1371,7 @@ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-关系分布图(获取指定用户下级)", + "summary": "制度中心-公排管理-关系分布图(获取)", "parameters": [ { "type": "string", @@ -1384,7 +1382,14 @@ }, { "type": "string", - "description": "用户ID", + "description": "phone", + "name": "phone", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "uid", "name": "uid", "in": "query", "required": true @@ -1406,9 +1411,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/getBasic": { - "get": { - "description": "公排基础设置(获取)", + "/api/institutionalManagement/publicPlatoon/updateBasic": { + "put": { + "description": "公排基础设置(修改)", "consumes": [ "application/json" ], @@ -1418,7 +1423,7 @@ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-公排基础设置(获取)", + "summary": "制度中心-公排管理-公排基础设置(修改)", "parameters": [ { "type": "string", @@ -1426,13 +1431,22 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "公排设置表单内容", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdatePublicPlatoonBasicReq" + } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", "schema": { - "$ref": "#/definitions/md.GetPublicPlatoonBasicResp" + "type": "string" } }, "400": { @@ -1444,9 +1458,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/publicPlatoonUserFreePunish/index": { + "/api/institutionalManagement/publicPlatoon/userDailyActivityAnalysis/index": { "post": { - "description": "免罚用户(查询)", + "description": "日活分析", "consumes": [ "application/json" ], @@ -1456,7 +1470,7 @@ "tags": [ "公排管理" ], - "summary": "制度中心-公排管理-免罚用户(查询)", + "summary": "制度中心-公排管理-日活分析", "parameters": [ { "type": "string", @@ -1466,20 +1480,20 @@ "required": true }, { - "description": "页数和行数必填,uid选填", + "description": "用户 ID、查询开始时间、结束时间(查询时间不超过30天)、页数、每页大小", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.GetFreePublishUserReq" + "$ref": "#/definitions/md.UserDailyActivityAnalysisReq" } } ], "responses": { "200": { - "description": "成功返回", + "description": "具体数据", "schema": { - "$ref": "#/definitions/md.GetFreePublishUserResp" + "$ref": "#/definitions/md.UserDailyActivityAnalysisResp" } }, "400": { @@ -1491,9 +1505,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/publicPlatoonUserFreePunish/save": { + "/api/login": { "post": { - "description": "免罚用户(新增)", + "description": "登入", "consumes": [ "application/json" ], @@ -1501,32 +1515,25 @@ "application/json" ], "tags": [ - "公排管理" + "登录" ], - "summary": "制度中心-公排管理-免罚用户(新增)", + "summary": "登陆", "parameters": [ { - "type": "string", - "description": "验证参数Bearer和token空格拼接", - "name": "Authorization", - "in": "header", - "required": true - }, - { - "description": "页数和行数必填,uid选填", + "description": "用户名密码", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AddFreePublishUserReq" + "$ref": "#/definitions/md.LoginReq" } } ], "responses": { "200": { - "description": "插入数据 ID", + "description": "token", "schema": { - "type": "int" + "$ref": "#/definitions/md.LoginResponse" } }, "400": { @@ -1538,9 +1545,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/relationshipMap": { + "/api/marketingApplications/newUserRedPackage/getBasic": { "get": { - "description": "关系分布图(获取)", + "description": "新人红包设置(获取)", "consumes": [ "application/json" ], @@ -1548,9 +1555,9 @@ "application/json" ], "tags": [ - "公排管理" + "营销应用" ], - "summary": "制度中心-公排管理-关系分布图(获取)", + "summary": "制度中心-营销应用-新人红包设置(获取)", "parameters": [ { "type": "string", @@ -1558,27 +1565,13 @@ "name": "Authorization", "in": "header", "required": true - }, - { - "type": "string", - "description": "phone", - "name": "phone", - "in": "query", - "required": true - }, - { - "type": "string", - "description": "uid", - "name": "uid", - "in": "query", - "required": true } ], "responses": { "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.TreeNode" + "$ref": "#/definitions/md.NewUserRedPackageGetBasicResp" } }, "400": { @@ -1590,9 +1583,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/updateBasic": { - "put": { - "description": "公排基础设置(修改)", + "/api/marketingApplications/newUserRedPackage/recordFlowList": { + "post": { + "description": "新人红包列表明细(查询)", "consumes": [ "application/json" ], @@ -1600,9 +1593,9 @@ "application/json" ], "tags": [ - "公排管理" + "营销应用" ], - "summary": "制度中心-公排管理-公排基础设置(修改)", + "summary": "制度中心-营销应用-新人红包列表明细(查询)", "parameters": [ { "type": "string", @@ -1612,20 +1605,20 @@ "required": true }, { - "description": "公排设置表单内容", + "description": "新人红包列表明细查询条件(分页信息、用户 ID必填)", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UpdatePublicPlatoonBasicReq" + "$ref": "#/definitions/md.NewUserRedPackageRecordFlowListReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.NewUserRedPackageRecordFlowListResp" } }, "400": { @@ -1637,9 +1630,9 @@ } } }, - "/api/institutionalManagement/publicPlatoon/userDailyActivityAnalysis/index": { + "/api/marketingApplications/newUserRedPackage/recordList": { "post": { - "description": "日活分析", + "description": "新人红包列表(查询)", "consumes": [ "application/json" ], @@ -1647,9 +1640,9 @@ "application/json" ], "tags": [ - "公排管理" + "营销应用" ], - "summary": "制度中心-公排管理-日活分析", + "summary": "制度中心-营销应用-新人红包列表(查询)", "parameters": [ { "type": "string", @@ -1659,12 +1652,12 @@ "required": true }, { - "description": "用户 ID、查询开始时间、结束时间(查询时间不超过30天)、页数、每页大小", + "description": "新人红包列表查询条件(分页信息必填)", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.UserDailyActivityAnalysisReq" + "$ref": "#/definitions/md.NewUserRedPackageRecordListReq" } } ], @@ -1672,7 +1665,7 @@ "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.UserDailyActivityAnalysisResp" + "$ref": "#/definitions/md.NewUserRedPackageRecordListResp" } }, "400": { @@ -1684,9 +1677,9 @@ } } }, - "/api/login": { - "post": { - "description": "登入", + "/api/marketingApplications/newUserRedPackage/updateBasic": { + "put": { + "description": "新人红包设置(修改)", "consumes": [ "application/json" ], @@ -1694,25 +1687,32 @@ "application/json" ], "tags": [ - "登录" + "营销应用" ], - "summary": "登陆", + "summary": "制度中心-营销应用-新人红包设置(修改)", "parameters": [ { - "description": "用户名密码", + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "新人红包设置表单", "name": "req", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.LoginReq" + "$ref": "#/definitions/md.NewUserRedPackageUpdateBasicReq" } } ], "responses": { "200": { - "description": "token", + "description": "success", "schema": { - "$ref": "#/definitions/md.LoginResponse" + "type": "string" } }, "400": { @@ -3119,6 +3119,69 @@ } } }, + "md.NewUserRedPackageRecordFlowListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.NewUserRedPackageRecordFlowNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate" + } + } + }, + "md.NewUserRedPackageRecordFlowNode": { + "type": "object", + "properties": { + "balance_amount": { + "description": "剩余金额", + "type": "string" + }, + "balance_days": { + "description": "剩余天数", + "type": "integer" + }, + "basic_amount": { + "description": "基础金额", + "type": "string" + }, + "create_at": { + "description": "创建时间", + "type": "string" + }, + "day_num": { + "description": "第x天", + "type": "integer" + }, + "double_rate": { + "description": "倍率", + "type": "string" + }, + "id": { + "description": "流水 ID", + "type": "integer" + }, + "is_double": { + "description": "是否翻倍", + "type": "integer" + }, + "receive_days": { + "description": "领取天数", + "type": "integer" + }, + "total_amount": { + "description": "实际金额", + "type": "string" + }, + "uid": { + "description": "用户 ID", + "type": "integer" + } + } + }, "md.NewUserRedPackageRecordListReq": { "type": "object", "properties": { @@ -3144,6 +3207,65 @@ } } }, + "md.NewUserRedPackageRecordListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.NewUserRedPackageRecordNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate" + } + } + }, + "md.NewUserRedPackageRecordNode": { + "type": "object", + "properties": { + "balance_amount": { + "description": "剩余金额", + "type": "string" + }, + "balance_days": { + "description": "剩余天数", + "type": "integer" + }, + "create_at": { + "description": "创建时间", + "type": "string" + }, + "days": { + "description": "天数", + "type": "integer" + }, + "receive_days": { + "description": "领取天数", + "type": "integer" + }, + "state": { + "description": "状态(0:待领取 1:领取中 2:已领取 3:已冻结)", + "type": "integer" + }, + "system_id": { + "description": "系统中记录的 ID", + "type": "integer" + }, + "total_amount": { + "description": "金额", + "type": "string" + }, + "uid": { + "description": "用户 ID", + "type": "integer" + }, + "update_at": { + "description": "修改时间", + "type": "string" + } + } + }, "md.NewUserRedPackageUpdateBasicReq": { "type": "object", "properties": { @@ -3182,15 +3304,6 @@ } } }, - "md.PaginateResp": { - "type": "object", - "properties": { - "list": {}, - "paginate": { - "$ref": "#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate" - } - } - }, "md.PlatformRevenueDataNode": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 0278602..80b4245 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -954,6 +954,51 @@ definitions: description: 用户 ID type: integer type: object + md.NewUserRedPackageRecordFlowListResp: + properties: + list: + items: + $ref: '#/definitions/md.NewUserRedPackageRecordFlowNode' + type: array + paginate: + $ref: '#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate' + type: object + md.NewUserRedPackageRecordFlowNode: + properties: + balance_amount: + description: 剩余金额 + type: string + balance_days: + description: 剩余天数 + type: integer + basic_amount: + description: 基础金额 + type: string + create_at: + description: 创建时间 + type: string + day_num: + description: 第x天 + type: integer + double_rate: + description: 倍率 + type: string + id: + description: 流水 ID + type: integer + is_double: + description: 是否翻倍 + type: integer + receive_days: + description: 领取天数 + type: integer + total_amount: + description: 实际金额 + type: string + uid: + description: 用户 ID + type: integer + type: object md.NewUserRedPackageRecordListReq: properties: end_at: @@ -972,6 +1017,48 @@ definitions: description: 用户 ID type: integer type: object + md.NewUserRedPackageRecordListResp: + properties: + list: + items: + $ref: '#/definitions/md.NewUserRedPackageRecordNode' + type: array + paginate: + $ref: '#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate' + type: object + md.NewUserRedPackageRecordNode: + properties: + balance_amount: + description: 剩余金额 + type: string + balance_days: + description: 剩余天数 + type: integer + create_at: + description: 创建时间 + type: string + days: + description: 天数 + type: integer + receive_days: + description: 领取天数 + type: integer + state: + description: 状态(0:待领取 1:领取中 2:已领取 3:已冻结) + type: integer + system_id: + description: 系统中记录的 ID + type: integer + total_amount: + description: 金额 + type: string + uid: + description: 用户 ID + type: integer + update_at: + description: 修改时间 + type: string + type: object md.NewUserRedPackageUpdateBasicReq: properties: days: @@ -999,12 +1086,6 @@ definitions: description: 奖励系数 type: number type: object - md.PaginateResp: - properties: - list: {} - paginate: - $ref: '#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate' - type: object md.PlatformRevenueDataNode: properties: balance_amount: @@ -1970,124 +2051,6 @@ paths: summary: 制度中心-绿色能量持有者明细-绿色能量(获取) tags: - 公排管理 - /api/institutionalManagement/newUserRedPackage/getBasic: - 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.NewUserRedPackageGetBasicResp' - "400": - description: 具体错误 - schema: - $ref: '#/definitions/md.Response' - summary: 制度中心-新人红包-新人红包设置(获取) - tags: - - 新人红包 - /api/institutionalManagement/newUserRedPackage/recordFlowList: - 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.NewUserRedPackageRecordFlowListReq' - produces: - - application/json - responses: - "200": - description: 具体数据 - schema: - $ref: '#/definitions/md.PaginateResp' - "400": - description: 具体错误 - schema: - $ref: '#/definitions/md.Response' - summary: 制度中心-新人红包-新人红包列表明细(查询) - tags: - - 新人红包 - /api/institutionalManagement/newUserRedPackage/recordList: - 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.NewUserRedPackageRecordListReq' - produces: - - application/json - responses: - "200": - description: 具体数据 - schema: - $ref: '#/definitions/md.PaginateResp' - "400": - description: 具体错误 - schema: - $ref: '#/definitions/md.Response' - summary: 制度中心-新人红包-新人红包列表(查询) - tags: - - 新人红包 - /api/institutionalManagement/newUserRedPackage/updateBasic: - put: - 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.NewUserRedPackageUpdateBasicReq' - produces: - - application/json - responses: - "200": - description: success - schema: - type: string - "400": - description: 具体错误 - schema: - $ref: '#/definitions/md.Response' - summary: 制度中心-新人红包-新人红包设置(修改) - tags: - - 新人红包 /api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd: post: consumes: @@ -2513,6 +2476,124 @@ paths: summary: 登陆 tags: - 登录 + /api/marketingApplications/newUserRedPackage/getBasic: + 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.NewUserRedPackageGetBasicResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-营销应用-新人红包设置(获取) + tags: + - 营销应用 + /api/marketingApplications/newUserRedPackage/recordFlowList: + 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.NewUserRedPackageRecordFlowListReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.NewUserRedPackageRecordFlowListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-营销应用-新人红包列表明细(查询) + tags: + - 营销应用 + /api/marketingApplications/newUserRedPackage/recordList: + 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.NewUserRedPackageRecordListReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.NewUserRedPackageRecordListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-营销应用-新人红包列表(查询) + tags: + - 营销应用 + /api/marketingApplications/newUserRedPackage/updateBasic: + put: + 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.NewUserRedPackageUpdateBasicReq' + produces: + - application/json + responses: + "200": + description: success + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-营销应用-新人红包设置(修改) + tags: + - 营销应用 securityDefinitions: MasterID: in: header diff --git a/go.mod b/go.mod index f1bc22a..eae610f 100644 --- a/go.mod +++ b/go.mod @@ -2,9 +2,9 @@ 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 +// replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules require ( github.com/boombuler/barcode v1.0.1