Parcourir la source

update

master
shenjiachi il y a 1 semaine
Parent
révision
26b534df53
8 fichiers modifiés avec 1432 ajouts et 25 suppressions
  1. +4
    -2
      app/hdl/institutional_management/public_platoon/hdl_basic.go
  2. +247
    -6
      app/hdl/member_center/hdl_level__management.go
  3. +52
    -6
      app/md/institutional_management/member_center/md_level_management.go
  4. +5
    -0
      app/router/router.go
  5. +418
    -3
      docs/docs.go
  6. +418
    -3
      docs/swagger.json
  7. +286
    -3
      docs/swagger.yaml
  8. +2
    -2
      go.mod

+ 4
- 2
app/hdl/institutional_management/public_platoon/hdl_basic.go Voir le fichier

@@ -53,7 +53,7 @@ func GetPublicPlatoonBasic(c *gin.Context) {
}
userDb := implement.NewUserDb(db.Db)
originator, err := userDb.UserGetOneByParams(map[string]interface{}{
"key": "uid",
"key": "id",
"value": publicPlatoonBasic.OriginatorUid,
})
if err != nil {
@@ -64,13 +64,15 @@ func GetPublicPlatoonBasic(c *gin.Context) {
resp = md.GetPublicPlatoonBasicResp{
IsOpen: publicPlatoonBasic.IsOpen,
OriginatorUid: publicPlatoonBasic.OriginatorUid,
OriginatorName: originator.Nickname,
SeveralTimes: publicPlatoonBasic.SeveralTimes,
SeveralRows: publicPlatoonBasic.SeveralRows,
SystemPunishReplace: publicPlatoonBasic.SystemPunishReplace,
SystemPunishReplaceValue: publicPlatoonBasic.SystemPunishReplaceValue,
IsSelfActiveGetTeamRevenue: publicPlatoonBasic.IsSelfActiveGetTeamRevenue,
}
if originator != nil {
resp.OriginatorName = originator.Nickname
}

e.OutSuc(c, resp, nil)
}


+ 247
- 6
app/hdl/member_center/hdl_level__management.go Voir le fichier

@@ -7,7 +7,10 @@ import (
"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/enum"
"errors"
"github.com/gin-gonic/gin"
"time"
)

// GetLevelList
@@ -67,6 +70,165 @@ func GetLevelList(c *gin.Context) {
e.OutSuc(c, resp, nil)
}

// GetOneLevel
// @Summary 制度中心-会员中心-等级管理-等级明细(获取)
// @Tags 会员中心
// @Description 等级明细(获取)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param level_id query int true "等级 ID"
// @Success 200 {object} md.GetOneLevelResp "具体数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/memberCenter/levelManagement/getOneLevel [get]
func GetOneLevel(c *gin.Context) {
id := c.Query("level_id")
if id == "" {
e.OutErr(c, e.ERR_INVALID_ARGS, errors.New("必须传入等级ID"))
return
}

taskType := []map[string]interface{}{
{
"name": enum.UserLevelTaskType.String(enum.DirectPushMembersNum),
"value": enum.DirectPushMembersNum,
},
{
"name": enum.UserLevelTaskType.String(enum.DirectPushActiveDayNum),
"value": enum.DirectPushMembersNum,
},
{
"name": enum.UserLevelTaskType.String(enum.DirectPushLevel),
"value": enum.DirectPushLevel,
},
}

levelDb := implement.NewUserLevelDb(db.Db)
level, err := levelDb.UserLevelByID(id)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}

userLevelTaskDb := implement.NewUserLevelTaskDb(db.Db)
tasks, err := userLevelTaskDb.UserLevelTaskFindByParams(map[string]interface{}{
"key": "level_id",
"value": id,
})
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}

resp := md.GetOneLevelResp{
TaskType: taskType,
LevelID: level.Id,
IsUse: level.IsUse,
LevelName: level.LevelName,
Memo: level.Memo,
AutoUpdate: level.AutoUpdate,
ChoosableNum: level.ChoosableNum,
LevelWeight: level.LevelWeight,
UserLevelTasks: tasks,
}

e.OutSuc(c, resp, nil)
}

// AddLevelTask
// @Summary 制度中心-会员中心-等级明细-等级任务(新增)
// @Tags 会员中心
// @Description 等级任务(新增)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.AddLevelTaskReq true "需要新增的任务信息"
// @Success 200 {int} "新增的任务ID"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/memberCenter/levelManagement/addLevelTask [post]
func AddLevelTask(c *gin.Context) {
var req *md.AddLevelTaskReq
if err := c.ShouldBindJSON(&req); err != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err.Error())
return
}

task := model.UserLevelTask{
Id: 0,
LevelId: utils.StrToInt(req.LevelID),
CreateAt: time.Now().Format("2006-01-02 15:04:05"),
}
if req.IsMustTask != "" {
task.IsMustTask = utils.StrToInt(req.IsMustTask)
}
if req.TaskType != "" {
task.TaskType = utils.StrToInt(req.TaskType)
}
if req.WithinDays != "" {
task.WithinDays = utils.StrToInt(req.WithinDays)
}
if req.FinishCount != "" {
task.FinishCount = utils.StrToInt(req.FinishCount)
}
if req.TaskTypeLevelId != "" {
task.TaskTypeLevelId = utils.StrToInt(req.TaskTypeLevelId)
}

taskDb := implement.NewUserLevelTaskDb(db.Db)
taskID, err := taskDb.UserLevelTaskInsert(&task)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
e.OutSuc(c, taskID, nil)
}

// UpdateLevelTask
// @Summary 制度中心-会员中心-等级明细-等级任务(更新)
// @Tags 会员中心
// @Description 等级任务(更新)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.UpdateLevelTaskReq true "需要修改的等级任务信息"
// @Success 200 {int} "成功修改数据条数"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/memberCenter/levelManagement/updateLevelTask [post]
func UpdateLevelTask(c *gin.Context) {
var req *md.UpdateLevelTaskReq
if err := c.ShouldBindJSON(&req); err != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err.Error())
return
}

task := &model.UserLevelTask{
Id: utils.StrToInt(req.TaskID),
}
if req.IsMustTask != "" {
task.IsMustTask = utils.StrToInt(req.IsMustTask)
}
if req.TaskType != "" {
task.TaskType = utils.StrToInt(req.TaskType)
}
if req.WithinDays != "" {
task.WithinDays = utils.StrToInt(req.WithinDays)
}
if req.FinishCount != "" {
task.FinishCount = utils.StrToInt(req.FinishCount)
}
if req.TaskTypeLevelId != "" {
task.TaskTypeLevelId = utils.StrToInt(req.TaskTypeLevelId)
}

taskDb := implement.NewUserLevelTaskDb(db.Db)
affected, err := taskDb.UserLevelTaskUpdate(task)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
e.OutSuc(c, affected, nil)
}

// UpdateLevel
// @Summary 制度中心-会员中心-等级管理(更新)
// @Tags 会员中心
@@ -86,11 +248,19 @@ func UpdateLevel(c *gin.Context) {
}

level := &model.UserLevel{
Id: utils.StrToInt(req.LevelID),
LevelName: req.LevelName,
LevelWeight: req.LevelWeight,
IsUse: req.IsUse,
Memo: req.Memo,
Id: utils.StrToInt(req.LevelID),
LevelName: req.LevelName,
Memo: req.Memo,
ChoosableNum: utils.StrToInt(req.ChoosableNum),
}
if req.LevelWeight != "" {
level.LevelWeight = utils.StrToInt(req.LevelWeight)
}
if req.IsUse == "0" || req.IsUse == "1" {
level.LevelWeight = utils.StrToInt(req.IsUse)
}
if req.AutoUpdate == "0" || req.AutoUpdate == "1" {
level.AutoUpdate = utils.StrToInt(req.AutoUpdate)
}
forceColumns := []string{"level_weight", "is_use"}
levelDb := implement.NewUserLevelDb(db.Db)
@@ -99,6 +269,77 @@ func UpdateLevel(c *gin.Context) {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}

e.OutSuc(c, affected, nil)
}

// AddLevel
// @Summary 制度中心-会员中心-等级管理(新增)
// @Tags 会员中心
// @Description 等级管理(新增)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.AddLevelReq true "需要新增的等级信息"
// @Success 200 {int} "新增等级ID"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/memberCenter/levelManagement/addLevel [post]
func AddLevel(c *gin.Context) {
var req *md.AddLevelReq
if err := c.ShouldBindJSON(&req); err != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err.Error())
return
}

level := &model.UserLevel{
LevelName: req.LevelName,
Memo: req.Memo,
ChoosableNum: utils.StrToInt(req.ChoosableNum),
CreateAt: time.Now().Format("2006-01-02 15:04:05"),
}
if req.LevelWeight != "" {
level.LevelWeight = utils.StrToInt(req.LevelWeight)
}
if req.IsUse == "0" || req.IsUse == "1" {
level.LevelWeight = utils.StrToInt(req.IsUse)
}
if req.AutoUpdate == "0" || req.AutoUpdate == "1" {
level.AutoUpdate = utils.StrToInt(req.AutoUpdate)
}

levelDb := implement.NewUserLevelDb(db.Db)
id, err := levelDb.UserLevelInsert(level)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
e.OutSuc(c, id, nil)
}

// DeleteLevelTask
// @Summary 制度中心-会员中心-等级管理-等级任务(删除)
// @Tags 会员中心
// @Description 等级任务(删除)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.DeleteTaskReq true "需要删除的等级任务ID"
// @Success 200 {int} "成功删除数据数量"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/memberCenter/levelManagement/deleteLevelTask [delete]
func DeleteLevelTask(c *gin.Context) {
var req *md.DeleteTaskReq
if err := c.ShouldBindJSON(&req); err != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err.Error())
return
}

taskDb := implement.NewUserLevelTaskDb(db.Db)
affected, err := taskDb.UserLevelTaskDelete(req.TaskID)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
e.OutSuc(c, affected, nil)
}

@@ -112,7 +353,7 @@ func UpdateLevel(c *gin.Context) {
// @Param req body md.DeleteLevelReq true "需要删除的等级 ID"
// @Success 200 {int} "成功删除数据数量"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/memberCenter/levelManagement/deleteLevel [post]
// @Router /api/memberCenter/levelManagement/deleteLevel [delete]
func DeleteLevel(c *gin.Context) {
var req *md.DeleteLevelReq
if err := c.ShouldBindJSON(&req); err != nil {


+ 52
- 6
app/md/institutional_management/member_center/md_level_management.go Voir le fichier

@@ -1,5 +1,7 @@
package md

import "code.fnuoos.com/EggPlanet/egg_models.git/src/model"

type LevelListNode struct {
LevelID int `json:"level_id"` // 等级 ID
LevelName string `json:"level_name"` // 等级名称
@@ -15,14 +17,58 @@ type GetLevelListResp struct {
Paginate Paginate `json:"paginate"`
}

type GetOneLevelResp struct {
TaskType []map[string]interface{} `json:"task_type"` // 任务类型关系
LevelID int `json:"level_id"` // 等级 ID
IsUse int `json:"is_use"` // 是否开启(0.否, 1.是)
LevelName string `json:"level_name"` // 等级名称
Memo string `json:"memo"` // 备注
AutoUpdate int `json:"auto_update"` // 自动升级 0关闭,1开启
ChoosableNum int `json:"choosable_num"` // 可选任务数量
LevelWeight int `json:"level_weight"` // 等级权重
UserLevelTasks []model.UserLevelTask `json:"user_level_tasks"`
}

type AddLevelTaskReq struct {
LevelID string `json:"level_id"` // 等级 ID
IsMustTask string `json:"is_must_task"` // 是否必做(0,1)
TaskType string `json:"task_type"` // 1:直推会员人数,2:直推会员活跃天数,3:直推会员等级
WithinDays string `json:"within_days"` // 多少天内完成
FinishCount string `json:"finish_count"` // 多少天内完成的指标
TaskTypeLevelId string `json:"task_type_level_id"` // 会员等级 ID (task_type=3时生效)
}

type UpdateLevelReq struct {
LevelID string `json:"level_id"`
IsUse int `json:"is_use"` // 是否开启(0.否, 1.是)
LevelName string `json:"level_name"` // 等级名称
Memo string `json:"memo"` // 备注
LevelWeight int `json:"level_weight"` // 等级权重
LevelID string `json:"level_id"`
IsUse string `json:"is_use"` // 是否开启(0.否, 1.是)
AutoUpdate string `json:"auto_update"` // 自动升级 0关闭 1开启
LevelName string `json:"level_name"` // 等级名称
Memo string `json:"memo"` // 备注
LevelWeight string `json:"level_weight"` // 等级权重
ChoosableNum string `json:"choosable_num"` // 可选任务数量
}

type AddLevelReq struct {
IsUse string `json:"is_use"` // 是否开启(0.否, 1.是)
AutoUpdate string `json:"auto_update"` // 自动升级 0关闭 1开启
LevelName string `json:"level_name"` // 等级名称
Memo string `json:"memo"` // 备注
LevelWeight string `json:"level_weight"` // 等级权重
ChoosableNum string `json:"choosable_num"` // 可选任务数量
}

type UpdateLevelTaskReq struct {
TaskID string `json:"task_id,required"` // 等级 ID
IsMustTask string `json:"is_must_task"` // 是否必做(0,1)
TaskType string `json:"task_type"` // 1:直推会员人数,2:直推会员活跃天数,3:直推会员等级
WithinDays string `json:"within_days"` // 多少天内完成
FinishCount string `json:"finish_count"` // 多少天内完成的指标
TaskTypeLevelId string `json:"task_type_level_id"` // 会员等级 ID (task_type=3时生效)
}

type DeleteLevelReq struct {
LevelID string `json:"level_id"`
LevelID string `json:"level_id,required"`
}
type DeleteTaskReq struct {
TaskID string `json:"task_id,required"`
}

+ 5
- 0
app/router/router.go Voir le fichier

@@ -176,8 +176,13 @@ func rMemberCenter(r *gin.RouterGroup) { // 会员中心
rLevelManagement := r.Group("/levelManagement")
{
rLevelManagement.GET("/getLevelList", member_center.GetLevelList)
rLevelManagement.GET("/getOneLevel", member_center.GetOneLevel)
rLevelManagement.POST("/updateLevel", member_center.UpdateLevel)
rLevelManagement.POST("/addLevel", member_center.AddLevel)
rLevelManagement.DELETE("/deleteLevel", member_center.DeleteLevel)
rLevelManagement.POST("/addLevelTask", member_center.AddLevelTask)
rLevelManagement.POST("/updateLevelTask", member_center.UpdateLevelTask)
rLevelManagement.DELETE("/deleteLevelTask", member_center.DeleteLevelTask)
}
}



+ 418
- 3
docs/docs.go Voir le fichier

@@ -2145,8 +2145,102 @@ const docTemplate = `{
}
}
},
"/api/memberCenter/levelManagement/deleteLevel": {
"/api/memberCenter/levelManagement/addLevel": {
"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.AddLevelReq"
}
}
],
"responses": {
"200": {
"description": "新增等级ID",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/memberCenter/levelManagement/addLevelTask": {
"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.AddLevelTaskReq"
}
}
],
"responses": {
"200": {
"description": "新增的任务ID",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/memberCenter/levelManagement/deleteLevel": {
"delete": {
"description": "等级管理(删除)",
"consumes": [
"application/json"
@@ -2192,6 +2286,53 @@ const docTemplate = `{
}
}
},
"/api/memberCenter/levelManagement/deleteLevelTask": {
"delete": {
"description": "等级任务(删除)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"会员中心"
],
"summary": "制度中心-会员中心-等级管理-等级任务(删除)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "需要删除的等级任务ID",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.DeleteTaskReq"
}
}
],
"responses": {
"200": {
"description": "成功删除数据数量",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/memberCenter/levelManagement/getLevelList": {
"get": {
"description": "标签管理(获取)",
@@ -2244,6 +2385,51 @@ const docTemplate = `{
}
}
},
"/api/memberCenter/levelManagement/getOneLevel": {
"get": {
"description": "等级明细(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"会员中心"
],
"summary": "制度中心-会员中心-等级管理-等级明细(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "integer",
"description": "等级 ID",
"name": "level_id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.GetOneLevelResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/memberCenter/levelManagement/updateLevel": {
"post": {
"description": "等级管理(更新)",
@@ -2291,6 +2477,53 @@ const docTemplate = `{
}
}
},
"/api/memberCenter/levelManagement/updateLevelTask": {
"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.UpdateLevelTaskReq"
}
}
],
"responses": {
"200": {
"description": "成功修改数据条数",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/memberCenter/tagManagement/addTag": {
"post": {
"description": "标签管理(新增)",
@@ -3030,6 +3263,64 @@ const docTemplate = `{
}
}
},
"md.AddLevelReq": {
"type": "object",
"properties": {
"auto_update": {
"description": "自动升级 0关闭 1开启",
"type": "string"
},
"choosable_num": {
"description": "可选任务数量",
"type": "string"
},
"is_use": {
"description": "是否开启(0.否, 1.是)",
"type": "string"
},
"level_name": {
"description": "等级名称",
"type": "string"
},
"level_weight": {
"description": "等级权重",
"type": "string"
},
"memo": {
"description": "备注",
"type": "string"
}
}
},
"md.AddLevelTaskReq": {
"type": "object",
"properties": {
"finish_count": {
"description": "多少天内完成的指标",
"type": "string"
},
"is_must_task": {
"description": "是否必做(0,1)",
"type": "string"
},
"level_id": {
"description": "等级 ID",
"type": "string"
},
"task_type": {
"description": "1:直推会员人数,2:直推会员活跃天数,3:直推会员等级",
"type": "string"
},
"task_type_level_id": {
"description": "会员等级 ID (task_type=3时生效)",
"type": "string"
},
"within_days": {
"description": "多少天内完成",
"type": "string"
}
}
},
"md.AddPlatformRevenueReq": {
"type": "object",
"properties": {
@@ -3245,6 +3536,14 @@ const docTemplate = `{
}
}
},
"md.DeleteTaskReq": {
"type": "object",
"properties": {
"task_id": {
"type": "string"
}
}
},
"md.DestructionSettingStruct": {
"type": "object",
"properties": {
@@ -4171,6 +4470,53 @@ const docTemplate = `{
}
}
},
"md.GetOneLevelResp": {
"type": "object",
"properties": {
"auto_update": {
"description": "自动升级 0关闭,1开启",
"type": "integer"
},
"choosable_num": {
"description": "可选任务数量",
"type": "integer"
},
"is_use": {
"description": "是否开启(0.否, 1.是)",
"type": "integer"
},
"level_id": {
"description": "等级 ID",
"type": "integer"
},
"level_name": {
"description": "等级名称",
"type": "string"
},
"level_weight": {
"description": "等级权重",
"type": "integer"
},
"memo": {
"description": "备注",
"type": "string"
},
"task_type": {
"description": "任务类型关系",
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"user_level_tasks": {
"type": "array",
"items": {
"$ref": "#/definitions/model.UserLevelTask"
}
}
}
},
"md.GetPriceCurveResp": {
"type": "object",
"properties": {
@@ -5340,9 +5686,17 @@ const docTemplate = `{
"md.UpdateLevelReq": {
"type": "object",
"properties": {
"auto_update": {
"description": "自动升级 0关闭 1开启",
"type": "string"
},
"choosable_num": {
"description": "可选任务数量",
"type": "string"
},
"is_use": {
"description": "是否开启(0.否, 1.是)",
"type": "integer"
"type": "string"
},
"level_id": {
"type": "string"
@@ -5353,7 +5707,7 @@ const docTemplate = `{
},
"level_weight": {
"description": "等级权重",
"type": "integer"
"type": "string"
},
"memo": {
"description": "备注",
@@ -5361,6 +5715,35 @@ const docTemplate = `{
}
}
},
"md.UpdateLevelTaskReq": {
"type": "object",
"properties": {
"finish_count": {
"description": "多少天内完成的指标",
"type": "string"
},
"is_must_task": {
"description": "是否必做(0,1)",
"type": "string"
},
"task_id": {
"description": "等级 ID",
"type": "string"
},
"task_type": {
"description": "1:直推会员人数,2:直推会员活跃天数,3:直推会员等级",
"type": "string"
},
"task_type_level_id": {
"description": "会员等级 ID (task_type=3时生效)",
"type": "string"
},
"within_days": {
"description": "多少天内完成",
"type": "string"
}
}
},
"md.UpdatePublicPlatoonBasicReq": {
"type": "object",
"properties": {
@@ -6325,6 +6708,38 @@ const docTemplate = `{
"type": "string"
}
}
},
"model.UserLevelTask": {
"type": "object",
"properties": {
"create_at": {
"type": "string"
},
"finish_count": {
"type": "integer"
},
"id": {
"type": "integer"
},
"is_must_task": {
"type": "integer"
},
"level_id": {
"type": "integer"
},
"task_type": {
"type": "integer"
},
"task_type_level_id": {
"type": "integer"
},
"update_at": {
"type": "string"
},
"within_days": {
"type": "integer"
}
}
}
},
"securityDefinitions": {


+ 418
- 3
docs/swagger.json Voir le fichier

@@ -2138,8 +2138,102 @@
}
}
},
"/api/memberCenter/levelManagement/deleteLevel": {
"/api/memberCenter/levelManagement/addLevel": {
"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.AddLevelReq"
}
}
],
"responses": {
"200": {
"description": "新增等级ID",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/memberCenter/levelManagement/addLevelTask": {
"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.AddLevelTaskReq"
}
}
],
"responses": {
"200": {
"description": "新增的任务ID",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/memberCenter/levelManagement/deleteLevel": {
"delete": {
"description": "等级管理(删除)",
"consumes": [
"application/json"
@@ -2185,6 +2279,53 @@
}
}
},
"/api/memberCenter/levelManagement/deleteLevelTask": {
"delete": {
"description": "等级任务(删除)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"会员中心"
],
"summary": "制度中心-会员中心-等级管理-等级任务(删除)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "需要删除的等级任务ID",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.DeleteTaskReq"
}
}
],
"responses": {
"200": {
"description": "成功删除数据数量",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/memberCenter/levelManagement/getLevelList": {
"get": {
"description": "标签管理(获取)",
@@ -2237,6 +2378,51 @@
}
}
},
"/api/memberCenter/levelManagement/getOneLevel": {
"get": {
"description": "等级明细(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"会员中心"
],
"summary": "制度中心-会员中心-等级管理-等级明细(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "integer",
"description": "等级 ID",
"name": "level_id",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.GetOneLevelResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/memberCenter/levelManagement/updateLevel": {
"post": {
"description": "等级管理(更新)",
@@ -2284,6 +2470,53 @@
}
}
},
"/api/memberCenter/levelManagement/updateLevelTask": {
"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.UpdateLevelTaskReq"
}
}
],
"responses": {
"200": {
"description": "成功修改数据条数",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/memberCenter/tagManagement/addTag": {
"post": {
"description": "标签管理(新增)",
@@ -3023,6 +3256,64 @@
}
}
},
"md.AddLevelReq": {
"type": "object",
"properties": {
"auto_update": {
"description": "自动升级 0关闭 1开启",
"type": "string"
},
"choosable_num": {
"description": "可选任务数量",
"type": "string"
},
"is_use": {
"description": "是否开启(0.否, 1.是)",
"type": "string"
},
"level_name": {
"description": "等级名称",
"type": "string"
},
"level_weight": {
"description": "等级权重",
"type": "string"
},
"memo": {
"description": "备注",
"type": "string"
}
}
},
"md.AddLevelTaskReq": {
"type": "object",
"properties": {
"finish_count": {
"description": "多少天内完成的指标",
"type": "string"
},
"is_must_task": {
"description": "是否必做(0,1)",
"type": "string"
},
"level_id": {
"description": "等级 ID",
"type": "string"
},
"task_type": {
"description": "1:直推会员人数,2:直推会员活跃天数,3:直推会员等级",
"type": "string"
},
"task_type_level_id": {
"description": "会员等级 ID (task_type=3时生效)",
"type": "string"
},
"within_days": {
"description": "多少天内完成",
"type": "string"
}
}
},
"md.AddPlatformRevenueReq": {
"type": "object",
"properties": {
@@ -3238,6 +3529,14 @@
}
}
},
"md.DeleteTaskReq": {
"type": "object",
"properties": {
"task_id": {
"type": "string"
}
}
},
"md.DestructionSettingStruct": {
"type": "object",
"properties": {
@@ -4164,6 +4463,53 @@
}
}
},
"md.GetOneLevelResp": {
"type": "object",
"properties": {
"auto_update": {
"description": "自动升级 0关闭,1开启",
"type": "integer"
},
"choosable_num": {
"description": "可选任务数量",
"type": "integer"
},
"is_use": {
"description": "是否开启(0.否, 1.是)",
"type": "integer"
},
"level_id": {
"description": "等级 ID",
"type": "integer"
},
"level_name": {
"description": "等级名称",
"type": "string"
},
"level_weight": {
"description": "等级权重",
"type": "integer"
},
"memo": {
"description": "备注",
"type": "string"
},
"task_type": {
"description": "任务类型关系",
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"user_level_tasks": {
"type": "array",
"items": {
"$ref": "#/definitions/model.UserLevelTask"
}
}
}
},
"md.GetPriceCurveResp": {
"type": "object",
"properties": {
@@ -5333,9 +5679,17 @@
"md.UpdateLevelReq": {
"type": "object",
"properties": {
"auto_update": {
"description": "自动升级 0关闭 1开启",
"type": "string"
},
"choosable_num": {
"description": "可选任务数量",
"type": "string"
},
"is_use": {
"description": "是否开启(0.否, 1.是)",
"type": "integer"
"type": "string"
},
"level_id": {
"type": "string"
@@ -5346,7 +5700,7 @@
},
"level_weight": {
"description": "等级权重",
"type": "integer"
"type": "string"
},
"memo": {
"description": "备注",
@@ -5354,6 +5708,35 @@
}
}
},
"md.UpdateLevelTaskReq": {
"type": "object",
"properties": {
"finish_count": {
"description": "多少天内完成的指标",
"type": "string"
},
"is_must_task": {
"description": "是否必做(0,1)",
"type": "string"
},
"task_id": {
"description": "等级 ID",
"type": "string"
},
"task_type": {
"description": "1:直推会员人数,2:直推会员活跃天数,3:直推会员等级",
"type": "string"
},
"task_type_level_id": {
"description": "会员等级 ID (task_type=3时生效)",
"type": "string"
},
"within_days": {
"description": "多少天内完成",
"type": "string"
}
}
},
"md.UpdatePublicPlatoonBasicReq": {
"type": "object",
"properties": {
@@ -6318,6 +6701,38 @@
"type": "string"
}
}
},
"model.UserLevelTask": {
"type": "object",
"properties": {
"create_at": {
"type": "string"
},
"finish_count": {
"type": "integer"
},
"id": {
"type": "integer"
},
"is_must_task": {
"type": "integer"
},
"level_id": {
"type": "integer"
},
"task_type": {
"type": "integer"
},
"task_type_level_id": {
"type": "integer"
},
"update_at": {
"type": "string"
},
"within_days": {
"type": "integer"
}
}
}
},
"securityDefinitions": {


+ 286
- 3
docs/swagger.yaml Voir le fichier

@@ -148,6 +148,48 @@ definitions:
description: 金额
type: string
type: object
md.AddLevelReq:
properties:
auto_update:
description: 自动升级 0关闭 1开启
type: string
choosable_num:
description: 可选任务数量
type: string
is_use:
description: 是否开启(0.否, 1.是)
type: string
level_name:
description: 等级名称
type: string
level_weight:
description: 等级权重
type: string
memo:
description: 备注
type: string
type: object
md.AddLevelTaskReq:
properties:
finish_count:
description: 多少天内完成的指标
type: string
is_must_task:
description: 是否必做(0,1)
type: string
level_id:
description: 等级 ID
type: string
task_type:
description: 1:直推会员人数,2:直推会员活跃天数,3:直推会员等级
type: string
task_type_level_id:
description: 会员等级 ID (task_type=3时生效)
type: string
within_days:
description: 多少天内完成
type: string
type: object
md.AddPlatformRevenueReq:
properties:
frequency:
@@ -304,6 +346,11 @@ definitions:
description: 标签 ID
type: string
type: object
md.DeleteTaskReq:
properties:
task_id:
type: string
type: object
md.DestructionSettingStruct:
properties:
community_dividends:
@@ -932,6 +979,40 @@ definitions:
paginate:
$ref: '#/definitions/applet_app_md_institutional_management_member_center.Paginate'
type: object
md.GetOneLevelResp:
properties:
auto_update:
description: 自动升级 0关闭,1开启
type: integer
choosable_num:
description: 可选任务数量
type: integer
is_use:
description: 是否开启(0.否, 1.是)
type: integer
level_id:
description: 等级 ID
type: integer
level_name:
description: 等级名称
type: string
level_weight:
description: 等级权重
type: integer
memo:
description: 备注
type: string
task_type:
description: 任务类型关系
items:
additionalProperties: true
type: object
type: array
user_level_tasks:
items:
$ref: '#/definitions/model.UserLevelTask'
type: array
type: object
md.GetPriceCurveResp:
properties:
x_data:
@@ -1741,9 +1822,15 @@ definitions:
type: object
md.UpdateLevelReq:
properties:
auto_update:
description: 自动升级 0关闭 1开启
type: string
choosable_num:
description: 可选任务数量
type: string
is_use:
description: 是否开启(0.否, 1.是)
type: integer
type: string
level_id:
type: string
level_name:
@@ -1751,11 +1838,32 @@ definitions:
type: string
level_weight:
description: 等级权重
type: integer
type: string
memo:
description: 备注
type: string
type: object
md.UpdateLevelTaskReq:
properties:
finish_count:
description: 多少天内完成的指标
type: string
is_must_task:
description: 是否必做(0,1)
type: string
task_id:
description: 等级 ID
type: string
task_type:
description: 1:直推会员人数,2:直推会员活跃天数,3:直推会员等级
type: string
task_type_level_id:
description: 会员等级 ID (task_type=3时生效)
type: string
within_days:
description: 多少天内完成
type: string
type: object
md.UpdatePublicPlatoonBasicReq:
properties:
is_open:
@@ -2437,6 +2545,27 @@ definitions:
violate_nums:
type: string
type: object
model.UserLevelTask:
properties:
create_at:
type: string
finish_count:
type: integer
id:
type: integer
is_must_task:
type: integer
level_id:
type: integer
task_type:
type: integer
task_type_level_id:
type: integer
update_at:
type: string
within_days:
type: integer
type: object
host: localhost:4001
info:
contact:
@@ -3850,8 +3979,70 @@ paths:
summary: 制度中心-营销应用-新人红包设置(修改)
tags:
- 营销应用
/api/memberCenter/levelManagement/deleteLevel:
/api/memberCenter/levelManagement/addLevel:
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.AddLevelReq'
produces:
- application/json
responses:
"200":
description: 新增等级ID
schema:
type: int
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-会员中心-等级管理(新增)
tags:
- 会员中心
/api/memberCenter/levelManagement/addLevelTask:
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.AddLevelTaskReq'
produces:
- application/json
responses:
"200":
description: 新增的任务ID
schema:
type: int
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-会员中心-等级明细-等级任务(新增)
tags:
- 会员中心
/api/memberCenter/levelManagement/deleteLevel:
delete:
consumes:
- application/json
description: 等级管理(删除)
@@ -3881,6 +4072,37 @@ paths:
summary: 制度中心-会员中心-等级管理(删除)
tags:
- 会员中心
/api/memberCenter/levelManagement/deleteLevelTask:
delete:
consumes:
- application/json
description: 等级任务(删除)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 需要删除的等级任务ID
in: body
name: req
required: true
schema:
$ref: '#/definitions/md.DeleteTaskReq'
produces:
- application/json
responses:
"200":
description: 成功删除数据数量
schema:
type: int
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-会员中心-等级管理-等级任务(删除)
tags:
- 会员中心
/api/memberCenter/levelManagement/getLevelList:
get:
consumes:
@@ -3916,6 +4138,36 @@ paths:
summary: 制度中心-会员中心-等级管理(获取)
tags:
- 会员中心
/api/memberCenter/levelManagement/getOneLevel:
get:
consumes:
- application/json
description: 等级明细(获取)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 等级 ID
in: query
name: level_id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: 具体数据
schema:
$ref: '#/definitions/md.GetOneLevelResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-会员中心-等级管理-等级明细(获取)
tags:
- 会员中心
/api/memberCenter/levelManagement/updateLevel:
post:
consumes:
@@ -3947,6 +4199,37 @@ paths:
summary: 制度中心-会员中心-等级管理(更新)
tags:
- 会员中心
/api/memberCenter/levelManagement/updateLevelTask:
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.UpdateLevelTaskReq'
produces:
- application/json
responses:
"200":
description: 成功修改数据条数
schema:
type: int
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-会员中心-等级明细-等级任务(更新)
tags:
- 会员中心
/api/memberCenter/tagManagement/addTag:
post:
consumes:


+ 2
- 2
go.mod Voir le fichier

@@ -33,8 +33,8 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241119094250-95864f7c9763
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241119094006-9ba1ab4607e9
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241119114643-e5842e3aad32
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241119120223-896224742c0d
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible


Chargement…
Annuler
Enregistrer