@@ -0,0 +1,205 @@ | |||||
package new_user_red_package | |||||
import ( | |||||
"applet/app/db" | |||||
"applet/app/e" | |||||
md "applet/app/md/institutional_management/new_user_red_package" | |||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement" | |||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" | |||||
"github.com/gin-gonic/gin" | |||||
"time" | |||||
) | |||||
// NewUserRedPackageGetBasic | |||||
// @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] | |||||
func NewUserRedPackageGetBasic(c *gin.Context) { | |||||
redPackageDb := implement.NewNewUserRedPackageDb(db.Db) | |||||
setting, err := redPackageDb.NewUserRedPackageGetOne() | |||||
if err != nil { | |||||
e.OutErr(c, e.ERR_DB_ORM, err.Error()) | |||||
return | |||||
} | |||||
if setting == nil { | |||||
now := time.Now() | |||||
setting = &model.NewUserRedPackage{ | |||||
IsOpen: 0, | |||||
TotalAmount: "", | |||||
Days: 0, | |||||
IsDouble: 0, | |||||
CreateAt: now.Format("2006-01-02 15:04:05"), | |||||
UpdateAt: now.Format("2006-01-02 15:04:05"), | |||||
} | |||||
_, err := redPackageDb.NewUserRedPackageInsert(setting) | |||||
if err != nil { | |||||
e.OutErr(c, e.ERR_DB_ORM, err.Error()) | |||||
return | |||||
} | |||||
} | |||||
resp := md.NewUserRedPackageGetBasicResp{ | |||||
IsOpen: setting.IsOpen, | |||||
TotalAmount: setting.TotalAmount, | |||||
Days: setting.Days, | |||||
IsDouble: setting.IsDouble, | |||||
CreateAt: setting.CreateAt, | |||||
UpdateAt: setting.UpdateAt, | |||||
} | |||||
e.OutSuc(c, resp, nil) | |||||
} | |||||
// NewUserRedPackageUpdateBasic | |||||
// @Summary 制度中心-新人红包-新人红包设置(修改) | |||||
// @Tags 新人红包 | |||||
// @Description 新人红包设置(修改) | |||||
// @Accept json | |||||
// @Produce json | |||||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | |||||
// @Param req body md.NewUserRedPackageUpdateBasicReq true "新人红包设置表单" | |||||
// @Success 200 {string} "success" | |||||
// @Failure 400 {object} md.Response "具体错误" | |||||
// @Router /api/institutionalManagement/newUserRedPackage/updateBasic [put] | |||||
func NewUserRedPackageUpdateBasic(c *gin.Context) { | |||||
var req *md.NewUserRedPackageUpdateBasicReq | |||||
if err := c.ShouldBindJSON(&req); err != nil { | |||||
e.OutErr(c, e.ERR_INVALID_ARGS, err) | |||||
return | |||||
} | |||||
redPackageDb := implement.NewNewUserRedPackageDb(db.Db) | |||||
setting, err := redPackageDb.NewUserRedPackageGetOne() | |||||
if err != nil { | |||||
e.OutErr(c, e.ERR_DB_ORM, err.Error()) | |||||
return | |||||
} | |||||
forceColumns := []string{"is_open", "total_amount", "days", "is_double"} | |||||
newSetting := &model.NewUserRedPackage{ | |||||
Id: setting.Id, | |||||
IsOpen: req.IsOpen, | |||||
TotalAmount: req.TotalAmount, | |||||
Days: req.Days, | |||||
IsDouble: req.IsDouble, | |||||
} | |||||
affected, err := redPackageDb.NewUserRedPackageUpdate(setting.Id, newSetting, forceColumns...) | |||||
if err != nil { | |||||
e.OutErr(c, e.ERR_DB_ORM, err.Error()) | |||||
return | |||||
} | |||||
if affected <= 0 { | |||||
e.OutErr(c, e.ERR_DB_ORM, "更新数据表失败") | |||||
return | |||||
} | |||||
e.OutSuc(c, "success", nil) | |||||
} | |||||
// NewUserRedPackageRecordList | |||||
// @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 "具体数据" | |||||
// @Failure 400 {object} md.Response "具体错误" | |||||
// @Router /api/institutionalManagement/newUserRedPackage/recordList [post] | |||||
func NewUserRedPackageRecordList(c *gin.Context) { | |||||
var req *md.NewUserRedPackageRecordListReq | |||||
if err := c.ShouldBindJSON(&req); err != nil { | |||||
e.OutErr(c, e.ERR_INVALID_ARGS, err) | |||||
return | |||||
} | |||||
recordsDb := implement.NewNewUserRedPackageWithUserRecordsDb(db.Db) | |||||
records, total, err := recordsDb.NewUserRedPackageWithUserRecordsFind(req.Page, req.Limit, req.Uid, req.StartAt, req.EndAt) | |||||
if err != nil { | |||||
e.OutErr(c, e.ERR_DB_ORM, err.Error()) | |||||
return | |||||
} | |||||
list := make([]md.NewUserRedPackageRecordNode, len(*records)) | |||||
for i, record := range *records { | |||||
list[i].SystemID = record.Id | |||||
list[i].Uid = record.Uid | |||||
list[i].TotalAmount = record.TotalAmount | |||||
list[i].Days = record.Days | |||||
list[i].BalanceAmount = record.BalanceAmount | |||||
list[i].BalanceDays = record.BalanceDays | |||||
list[i].State = record.State | |||||
list[i].CreateAt = record.CreateAt | |||||
list[i].UpdateAt = record.UpdateAt | |||||
} | |||||
resp := md.PaginateResp{ | |||||
List: list, | |||||
Paginate: md.Paginate{ | |||||
Page: req.Page, | |||||
Limit: req.Limit, | |||||
Total: total, | |||||
}, | |||||
} | |||||
e.OutSuc(c, resp, nil) | |||||
} | |||||
// NewUserRedPackageRecordFlowList | |||||
// @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 "具体数据" | |||||
// @Failure 400 {object} md.Response "具体错误" | |||||
// @Router /api/institutionalManagement/newUserRedPackage/recordFlowList [post] | |||||
func NewUserRedPackageRecordFlowList(c *gin.Context) { | |||||
var req *md.NewUserRedPackageRecordFlowListReq | |||||
if err := c.ShouldBindJSON(&req); err != nil { | |||||
e.OutErr(c, e.ERR_INVALID_ARGS, err) | |||||
return | |||||
} | |||||
flowDb := implement.NewNewUserRedPackageWithUserRecordsFlowDb(db.Db) | |||||
flows, total, err := flowDb.NewUserRedPackageWithUserRecordsFlowFindAndCount(req.Page, req.Limit, req.Uid, req.StartAt, req.EndAt) | |||||
if err != nil { | |||||
e.OutErr(c, e.ERR_DB_ORM, err.Error()) | |||||
return | |||||
} | |||||
list := make([]md.NewUserRedPackageRecordFlowNode, len(*flows)) | |||||
for i, flow := range *flows { | |||||
list[i].Id = flow.Id | |||||
list[i].Uid = flow.Uid | |||||
list[i].BasicAmount = flow.BasicAmount | |||||
list[i].TotalAmount = flow.TotalAmount | |||||
list[i].DayNum = flow.DayNum | |||||
list[i].IsDouble = flow.IsDouble | |||||
list[i].DoubleRate = flow.DoubleRate | |||||
list[i].BalanceAmount = flow.BalanceAmount | |||||
list[i].BalanceDays = flow.BalanceDays | |||||
list[i].ReceiveDays = flow.ReceiveDays | |||||
list[i].CreateAt = flow.CreateAt | |||||
} | |||||
resp := md.PaginateResp{ | |||||
List: list, | |||||
Paginate: md.Paginate{ | |||||
Page: req.Page, | |||||
Limit: req.Limit, | |||||
Total: total, | |||||
}, | |||||
} | |||||
e.OutSuc(c, resp, nil) | |||||
} |
@@ -0,0 +1,76 @@ | |||||
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:"总金额"` | |||||
Days int `json:"days"` // 天数 | |||||
IsDouble int `json:"is_double"` // 是否翻倍 | |||||
CreateAt string `json:"create_at"` | |||||
UpdateAt string `json:"update_at"` | |||||
} | |||||
type NewUserRedPackageUpdateBasicReq struct { | |||||
IsOpen int `json:"is_open,required"` // 是否开启(1:开启 0:关闭) | |||||
TotalAmount string `json:"total_amount,required" example:"总金额"` | |||||
Days int `json:"days,required"` // 天数 | |||||
IsDouble int `json:"is_double,required"` // 是否翻倍 | |||||
} | |||||
type NewUserRedPackageRecordListReq struct { | |||||
Uid int64 `json:"uid"` // 用户 ID | |||||
Page int `json:"page,required"` // 页数 | |||||
Limit int `json:"limit,required"` // 每页大小 | |||||
StartAt string `json:"start_at"` // 开始时间 | |||||
EndAt string `json:"end_at"` // 结束时间 | |||||
} | |||||
type NewUserRedPackageRecordNode struct { | |||||
SystemID int `json:"system_id"` // 系统中记录的 ID | |||||
Uid int64 `json:"uid"` // 用户 ID | |||||
TotalAmount string `json:"total_amount"` // 金额 | |||||
Days int `json:"days"` // 天数 | |||||
BalanceAmount string `json:"balance_amount"` // 剩余金额 | |||||
BalanceDays int `json:"balance_days"` // 剩余天数 | |||||
ReceiveDays int `json:"receive_days"` // 领取天数 | |||||
State int `json:"state"` // 状态(0:待领取 1:领取中 2:已领取 3:已冻结) | |||||
CreateAt string `json:"create_at"` // 创建时间 | |||||
UpdateAt string `json:"update_at"` // 修改时间 | |||||
} | |||||
type NewUserRedPackageRecordFlowListReq struct { | |||||
Uid int64 `json:"uid,required"` // 用户 ID | |||||
Page int `json:"page,required"` // 页数 | |||||
Limit int `json:"limit,required"` // 每页大小 | |||||
StartAt string `json:"start_at"` // 开始时间 | |||||
EndAt string `json:"end_at"` // 结束时间 | |||||
} | |||||
type NewUserRedPackageRecordFlowNode struct { | |||||
Id int `json:"id"` // 流水 ID | |||||
Uid int64 `json:"uid"` // 用户 ID | |||||
BasicAmount string `json:"basic_amount"` // 基础金额 | |||||
TotalAmount string `json:"total_amount"` // 实际金额 | |||||
DayNum int `json:"day_num"` // 第x天 | |||||
IsDouble int `json:"is_double"` // 是否翻倍 | |||||
DoubleRate string `json:"double_rate"` // 倍率 | |||||
BalanceAmount string `json:"balance_amount"` // 剩余金额 | |||||
BalanceDays int `json:"balance_days"` // 剩余天数 | |||||
ReceiveDays int `json:"receive_days"` // 领取天数 | |||||
CreateAt string `json:"create_at"` // 创建时间 | |||||
} |
@@ -5,6 +5,7 @@ import ( | |||||
"applet/app/hdl" | "applet/app/hdl" | ||||
"applet/app/hdl/comm" | "applet/app/hdl/comm" | ||||
"applet/app/hdl/institutional_management/egg_energy" | "applet/app/hdl/institutional_management/egg_energy" | ||||
"applet/app/hdl/institutional_management/new_user_red_package" | |||||
"applet/app/hdl/institutional_management/public_platoon" | "applet/app/hdl/institutional_management/public_platoon" | ||||
"applet/app/hdl/setCenter/oss/aliyun" | "applet/app/hdl/setCenter/oss/aliyun" | ||||
"applet/app/mw" | "applet/app/mw" | ||||
@@ -128,6 +129,14 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理 | |||||
rPlatformRevenue.POST("/platformRevenueAdd", egg_energy.AddPlatformRevenue) | rPlatformRevenue.POST("/platformRevenueAdd", egg_energy.AddPlatformRevenue) | ||||
} | } | ||||
} | } | ||||
rNewUserRedPackage := r.Group("/newUserRedPackage") // 新人红包 | |||||
{ | |||||
rNewUserRedPackage.GET("/getBasic", new_user_red_package.NewUserRedPackageGetBasic) | |||||
rNewUserRedPackage.PUT("/updateBasic", new_user_red_package.NewUserRedPackageUpdateBasic) | |||||
rNewUserRedPackage.POST("/recordList", new_user_red_package.NewUserRedPackageRecordList) | |||||
rNewUserRedPackage.POST("/recordFlowList", new_user_red_package.NewUserRedPackageRecordFlowList) | |||||
} | |||||
} | } | ||||
func rComm(r *gin.RouterGroup) { | func rComm(r *gin.RouterGroup) { | ||||
@@ -909,6 +909,185 @@ const docTemplate = `{ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"/api/institutionalManagement/newUserRedPackage/getBasic": { | |||||
"get": { | |||||
"description": "新人红包设置(获取)", | |||||
"consumes": [ | |||||
"application/json" | |||||
], | |||||
"produces": [ | |||||
"application/json" | |||||
], | |||||
"tags": [ | |||||
"新人红包" | |||||
], | |||||
"summary": "制度中心-新人红包-新人红包设置(获取)", | |||||
"parameters": [ | |||||
{ | |||||
"type": "string", | |||||
"description": "验证参数Bearer和token空格拼接", | |||||
"name": "Authorization", | |||||
"in": "header", | |||||
"required": true | |||||
} | |||||
], | |||||
"responses": { | |||||
"200": { | |||||
"description": "具体数据", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.NewUserRedPackageGetBasicResp" | |||||
} | |||||
}, | |||||
"400": { | |||||
"description": "具体错误", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.Response" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"/api/institutionalManagement/newUserRedPackage/recordFlowList": { | |||||
"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.NewUserRedPackageRecordFlowListReq" | |||||
} | |||||
} | |||||
], | |||||
"responses": { | |||||
"200": { | |||||
"description": "具体数据", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.PaginateResp" | |||||
} | |||||
}, | |||||
"400": { | |||||
"description": "具体错误", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.Response" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"/api/institutionalManagement/newUserRedPackage/recordList": { | |||||
"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.NewUserRedPackageRecordListReq" | |||||
} | |||||
} | |||||
], | |||||
"responses": { | |||||
"200": { | |||||
"description": "具体数据", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.PaginateResp" | |||||
} | |||||
}, | |||||
"400": { | |||||
"description": "具体错误", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.Response" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"/api/institutionalManagement/newUserRedPackage/updateBasic": { | |||||
"put": { | |||||
"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.NewUserRedPackageUpdateBasicReq" | |||||
} | |||||
} | |||||
], | |||||
"responses": { | |||||
"200": { | |||||
"description": "success", | |||||
"schema": { | |||||
"type": "string" | |||||
} | |||||
}, | |||||
"400": { | |||||
"description": "具体错误", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.Response" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd": { | "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd": { | ||||
"post": { | "post": { | ||||
"description": "社区分红(新增)", | "description": "社区分红(新增)", | ||||
@@ -1604,6 +1783,20 @@ const docTemplate = `{ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"applet_app_md_institutional_management_new_user_red_package.Paginate": { | |||||
"type": "object", | |||||
"properties": { | |||||
"limit": { | |||||
"type": "integer" | |||||
}, | |||||
"page": { | |||||
"type": "integer" | |||||
}, | |||||
"total": { | |||||
"type": "integer" | |||||
} | |||||
} | |||||
}, | |||||
"applet_app_md_institutional_management_public_platoon.BasicSetting": { | "applet_app_md_institutional_management_public_platoon.BasicSetting": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -2881,6 +3074,104 @@ const docTemplate = `{ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"md.NewUserRedPackageGetBasicResp": { | |||||
"type": "object", | |||||
"properties": { | |||||
"create_at": { | |||||
"type": "string" | |||||
}, | |||||
"days": { | |||||
"description": "天数", | |||||
"type": "integer" | |||||
}, | |||||
"is_double": { | |||||
"description": "是否翻倍", | |||||
"type": "integer" | |||||
}, | |||||
"is_open": { | |||||
"description": "是否开启(1:开启 0:关闭)", | |||||
"type": "integer" | |||||
}, | |||||
"total_amount": { | |||||
"type": "string", | |||||
"example": "总金额" | |||||
}, | |||||
"update_at": { | |||||
"type": "string" | |||||
} | |||||
} | |||||
}, | |||||
"md.NewUserRedPackageRecordFlowListReq": { | |||||
"type": "object", | |||||
"properties": { | |||||
"end_at": { | |||||
"description": "结束时间", | |||||
"type": "string" | |||||
}, | |||||
"limit": { | |||||
"description": "每页大小", | |||||
"type": "integer" | |||||
}, | |||||
"page": { | |||||
"description": "页数", | |||||
"type": "integer" | |||||
}, | |||||
"start_at": { | |||||
"description": "开始时间", | |||||
"type": "string" | |||||
}, | |||||
"uid": { | |||||
"description": "用户 ID", | |||||
"type": "integer" | |||||
} | |||||
} | |||||
}, | |||||
"md.NewUserRedPackageRecordListReq": { | |||||
"type": "object", | |||||
"properties": { | |||||
"end_at": { | |||||
"description": "结束时间", | |||||
"type": "string" | |||||
}, | |||||
"limit": { | |||||
"description": "每页大小", | |||||
"type": "integer" | |||||
}, | |||||
"page": { | |||||
"description": "页数", | |||||
"type": "integer" | |||||
}, | |||||
"start_at": { | |||||
"description": "开始时间", | |||||
"type": "string" | |||||
}, | |||||
"uid": { | |||||
"description": "用户 ID", | |||||
"type": "integer" | |||||
} | |||||
} | |||||
}, | |||||
"md.NewUserRedPackageUpdateBasicReq": { | |||||
"type": "object", | |||||
"properties": { | |||||
"days": { | |||||
"description": "天数", | |||||
"type": "integer" | |||||
}, | |||||
"is_double": { | |||||
"description": "是否翻倍", | |||||
"type": "integer" | |||||
}, | |||||
"is_open": { | |||||
"description": "是否开启(1:开启 0:关闭)", | |||||
"type": "integer" | |||||
}, | |||||
"total_amount": { | |||||
"type": "string", | |||||
"example": "总金额" | |||||
} | |||||
} | |||||
}, | |||||
"md.NewUserRewardRules": { | "md.NewUserRewardRules": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -2898,6 +3189,15 @@ const docTemplate = `{ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"md.PaginateResp": { | |||||
"type": "object", | |||||
"properties": { | |||||
"list": {}, | |||||
"paginate": { | |||||
"$ref": "#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate" | |||||
} | |||||
} | |||||
}, | |||||
"md.PlatformRevenueDataNode": { | "md.PlatformRevenueDataNode": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -902,6 +902,185 @@ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"/api/institutionalManagement/newUserRedPackage/getBasic": { | |||||
"get": { | |||||
"description": "新人红包设置(获取)", | |||||
"consumes": [ | |||||
"application/json" | |||||
], | |||||
"produces": [ | |||||
"application/json" | |||||
], | |||||
"tags": [ | |||||
"新人红包" | |||||
], | |||||
"summary": "制度中心-新人红包-新人红包设置(获取)", | |||||
"parameters": [ | |||||
{ | |||||
"type": "string", | |||||
"description": "验证参数Bearer和token空格拼接", | |||||
"name": "Authorization", | |||||
"in": "header", | |||||
"required": true | |||||
} | |||||
], | |||||
"responses": { | |||||
"200": { | |||||
"description": "具体数据", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.NewUserRedPackageGetBasicResp" | |||||
} | |||||
}, | |||||
"400": { | |||||
"description": "具体错误", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.Response" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"/api/institutionalManagement/newUserRedPackage/recordFlowList": { | |||||
"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.NewUserRedPackageRecordFlowListReq" | |||||
} | |||||
} | |||||
], | |||||
"responses": { | |||||
"200": { | |||||
"description": "具体数据", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.PaginateResp" | |||||
} | |||||
}, | |||||
"400": { | |||||
"description": "具体错误", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.Response" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"/api/institutionalManagement/newUserRedPackage/recordList": { | |||||
"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.NewUserRedPackageRecordListReq" | |||||
} | |||||
} | |||||
], | |||||
"responses": { | |||||
"200": { | |||||
"description": "具体数据", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.PaginateResp" | |||||
} | |||||
}, | |||||
"400": { | |||||
"description": "具体错误", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.Response" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"/api/institutionalManagement/newUserRedPackage/updateBasic": { | |||||
"put": { | |||||
"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.NewUserRedPackageUpdateBasicReq" | |||||
} | |||||
} | |||||
], | |||||
"responses": { | |||||
"200": { | |||||
"description": "success", | |||||
"schema": { | |||||
"type": "string" | |||||
} | |||||
}, | |||||
"400": { | |||||
"description": "具体错误", | |||||
"schema": { | |||||
"$ref": "#/definitions/md.Response" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
}, | |||||
"/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd": { | "/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd": { | ||||
"post": { | "post": { | ||||
"description": "社区分红(新增)", | "description": "社区分红(新增)", | ||||
@@ -1597,6 +1776,20 @@ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"applet_app_md_institutional_management_new_user_red_package.Paginate": { | |||||
"type": "object", | |||||
"properties": { | |||||
"limit": { | |||||
"type": "integer" | |||||
}, | |||||
"page": { | |||||
"type": "integer" | |||||
}, | |||||
"total": { | |||||
"type": "integer" | |||||
} | |||||
} | |||||
}, | |||||
"applet_app_md_institutional_management_public_platoon.BasicSetting": { | "applet_app_md_institutional_management_public_platoon.BasicSetting": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -2874,6 +3067,104 @@ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"md.NewUserRedPackageGetBasicResp": { | |||||
"type": "object", | |||||
"properties": { | |||||
"create_at": { | |||||
"type": "string" | |||||
}, | |||||
"days": { | |||||
"description": "天数", | |||||
"type": "integer" | |||||
}, | |||||
"is_double": { | |||||
"description": "是否翻倍", | |||||
"type": "integer" | |||||
}, | |||||
"is_open": { | |||||
"description": "是否开启(1:开启 0:关闭)", | |||||
"type": "integer" | |||||
}, | |||||
"total_amount": { | |||||
"type": "string", | |||||
"example": "总金额" | |||||
}, | |||||
"update_at": { | |||||
"type": "string" | |||||
} | |||||
} | |||||
}, | |||||
"md.NewUserRedPackageRecordFlowListReq": { | |||||
"type": "object", | |||||
"properties": { | |||||
"end_at": { | |||||
"description": "结束时间", | |||||
"type": "string" | |||||
}, | |||||
"limit": { | |||||
"description": "每页大小", | |||||
"type": "integer" | |||||
}, | |||||
"page": { | |||||
"description": "页数", | |||||
"type": "integer" | |||||
}, | |||||
"start_at": { | |||||
"description": "开始时间", | |||||
"type": "string" | |||||
}, | |||||
"uid": { | |||||
"description": "用户 ID", | |||||
"type": "integer" | |||||
} | |||||
} | |||||
}, | |||||
"md.NewUserRedPackageRecordListReq": { | |||||
"type": "object", | |||||
"properties": { | |||||
"end_at": { | |||||
"description": "结束时间", | |||||
"type": "string" | |||||
}, | |||||
"limit": { | |||||
"description": "每页大小", | |||||
"type": "integer" | |||||
}, | |||||
"page": { | |||||
"description": "页数", | |||||
"type": "integer" | |||||
}, | |||||
"start_at": { | |||||
"description": "开始时间", | |||||
"type": "string" | |||||
}, | |||||
"uid": { | |||||
"description": "用户 ID", | |||||
"type": "integer" | |||||
} | |||||
} | |||||
}, | |||||
"md.NewUserRedPackageUpdateBasicReq": { | |||||
"type": "object", | |||||
"properties": { | |||||
"days": { | |||||
"description": "天数", | |||||
"type": "integer" | |||||
}, | |||||
"is_double": { | |||||
"description": "是否翻倍", | |||||
"type": "integer" | |||||
}, | |||||
"is_open": { | |||||
"description": "是否开启(1:开启 0:关闭)", | |||||
"type": "integer" | |||||
}, | |||||
"total_amount": { | |||||
"type": "string", | |||||
"example": "总金额" | |||||
} | |||||
} | |||||
}, | |||||
"md.NewUserRewardRules": { | "md.NewUserRewardRules": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -2891,6 +3182,15 @@ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"md.PaginateResp": { | |||||
"type": "object", | |||||
"properties": { | |||||
"list": {}, | |||||
"paginate": { | |||||
"$ref": "#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate" | |||||
} | |||||
} | |||||
}, | |||||
"md.PlatformRevenueDataNode": { | "md.PlatformRevenueDataNode": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -33,6 +33,15 @@ definitions: | |||||
description: 总数据量 | description: 总数据量 | ||||
type: integer | type: integer | ||||
type: object | type: object | ||||
applet_app_md_institutional_management_new_user_red_package.Paginate: | |||||
properties: | |||||
limit: | |||||
type: integer | |||||
page: | |||||
type: integer | |||||
total: | |||||
type: integer | |||||
type: object | |||||
applet_app_md_institutional_management_public_platoon.BasicSetting: | applet_app_md_institutional_management_public_platoon.BasicSetting: | ||||
properties: | properties: | ||||
id: | id: | ||||
@@ -908,6 +917,76 @@ definitions: | |||||
token: | token: | ||||
type: string | type: string | ||||
type: object | type: object | ||||
md.NewUserRedPackageGetBasicResp: | |||||
properties: | |||||
create_at: | |||||
type: string | |||||
days: | |||||
description: 天数 | |||||
type: integer | |||||
is_double: | |||||
description: 是否翻倍 | |||||
type: integer | |||||
is_open: | |||||
description: 是否开启(1:开启 0:关闭) | |||||
type: integer | |||||
total_amount: | |||||
example: 总金额 | |||||
type: string | |||||
update_at: | |||||
type: string | |||||
type: object | |||||
md.NewUserRedPackageRecordFlowListReq: | |||||
properties: | |||||
end_at: | |||||
description: 结束时间 | |||||
type: string | |||||
limit: | |||||
description: 每页大小 | |||||
type: integer | |||||
page: | |||||
description: 页数 | |||||
type: integer | |||||
start_at: | |||||
description: 开始时间 | |||||
type: string | |||||
uid: | |||||
description: 用户 ID | |||||
type: integer | |||||
type: object | |||||
md.NewUserRedPackageRecordListReq: | |||||
properties: | |||||
end_at: | |||||
description: 结束时间 | |||||
type: string | |||||
limit: | |||||
description: 每页大小 | |||||
type: integer | |||||
page: | |||||
description: 页数 | |||||
type: integer | |||||
start_at: | |||||
description: 开始时间 | |||||
type: string | |||||
uid: | |||||
description: 用户 ID | |||||
type: integer | |||||
type: object | |||||
md.NewUserRedPackageUpdateBasicReq: | |||||
properties: | |||||
days: | |||||
description: 天数 | |||||
type: integer | |||||
is_double: | |||||
description: 是否翻倍 | |||||
type: integer | |||||
is_open: | |||||
description: 是否开启(1:开启 0:关闭) | |||||
type: integer | |||||
total_amount: | |||||
example: 总金额 | |||||
type: string | |||||
type: object | |||||
md.NewUserRewardRules: | md.NewUserRewardRules: | ||||
properties: | properties: | ||||
continue_days: | continue_days: | ||||
@@ -920,6 +999,12 @@ definitions: | |||||
description: 奖励系数 | description: 奖励系数 | ||||
type: number | type: number | ||||
type: object | type: object | ||||
md.PaginateResp: | |||||
properties: | |||||
list: {} | |||||
paginate: | |||||
$ref: '#/definitions/applet_app_md_institutional_management_new_user_red_package.Paginate' | |||||
type: object | |||||
md.PlatformRevenueDataNode: | md.PlatformRevenueDataNode: | ||||
properties: | properties: | ||||
balance_amount: | balance_amount: | ||||
@@ -1885,6 +1970,124 @@ paths: | |||||
summary: 制度中心-绿色能量持有者明细-绿色能量(获取) | summary: 制度中心-绿色能量持有者明细-绿色能量(获取) | ||||
tags: | 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: | /api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd: | ||||
post: | post: | ||||
consumes: | consumes: | ||||
@@ -35,7 +35,6 @@ require ( | |||||
require ( | require ( | ||||
code.fnuoos.com/EggPlanet/egg_models.git v0.0.5 | code.fnuoos.com/EggPlanet/egg_models.git v0.0.5 | ||||
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.3 | |||||
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 | code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 | ||||
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible | github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible | ||||
github.com/go-sql-driver/mysql v1.8.1 | github.com/go-sql-driver/mysql v1.8.1 | ||||
@@ -45,6 +44,7 @@ require ( | |||||
) | ) | ||||
require ( | require ( | ||||
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.3 // indirect | |||||
filippo.io/edwards25519 v1.1.0 // indirect | filippo.io/edwards25519 v1.1.0 // indirect | ||||
github.com/BurntSushi/toml v1.4.0 // indirect | github.com/BurntSushi/toml v1.4.0 // indirect | ||||
github.com/KyleBanks/depth v1.2.1 // indirect | github.com/KyleBanks/depth v1.2.1 // indirect | ||||