diff --git a/app/enum/enum_role.go b/app/enum/enum_role.go new file mode 100644 index 0000000..bd8763c --- /dev/null +++ b/app/enum/enum_role.go @@ -0,0 +1,19 @@ +package enum + +type RoleState int32 + +const ( + RoleStateForNormal = 1 + RoleStateForFreeze = 2 +) + +func (gt RoleState) String() string { + switch gt { + case RoleStateForNormal: + return "正常" + case RoleStateForFreeze: + return "冻结" + default: + return "未知" + } +} diff --git a/app/hdl/comm/hdl_comm.go b/app/hdl/comm/hdl_comm.go index 1589179..93eb8b5 100644 --- a/app/hdl/comm/hdl_comm.go +++ b/app/hdl/comm/hdl_comm.go @@ -17,11 +17,21 @@ import ( "strings" ) +// MenuList +// @Summary 通用请求-权限列表-菜单栏列表(获取) +// @Tags 权限列表 +// @Description 菜单栏列表(获取) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Success 200 {object} map[string]interface{} "具体路由" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/comm/getMenuList [POST] func MenuList(c *gin.Context) { engine := db.Db admin := svc.GetUser(c) qrcodeWithBatchRecordsDb := implement.NewPermissionGroupDb(engine) - groupList, err := qrcodeWithBatchRecordsDb.FindPermissionGroupV2() + groupList, err := qrcodeWithBatchRecordsDb.FindPermissionGroup() if err != nil { e.OutErr(c, e.ERR_DB_ORM, err.Error()) return diff --git a/app/hdl/hdl_home_page.go b/app/hdl/hdl_home_page.go index 7bb653e..f80313d 100644 --- a/app/hdl/hdl_home_page.go +++ b/app/hdl/hdl_home_page.go @@ -146,7 +146,8 @@ func GetGrowData(c *gin.Context) { return } kind := req.Kind - + var yData []interface{} + var xData []interface{} now := time.Now() dataDb := implement.NewPlatformGrowDataDb(db.Db) m, has, err := dataDb.PlatformGrowDataGetLastOne() @@ -155,11 +156,14 @@ func GetGrowData(c *gin.Context) { return } if !has { - e.OutErr(c, e.ERR_NO_DATA, "未查询到数据") + resp := md.GetPriceCurveResp{ + XData: xData, + YData: yData, + } + e.OutSuc(c, resp, nil) return } - var yData []interface{} - var xData []interface{} + switch kind { case "1": // 日 diff --git a/app/hdl/hdl_role.go b/app/hdl/hdl_role.go new file mode 100644 index 0000000..6c66448 --- /dev/null +++ b/app/hdl/hdl_role.go @@ -0,0 +1,652 @@ +package hdl + +import ( + "applet/app/db" + "applet/app/e" + "applet/app/enum" + "applet/app/lib/validate" + "applet/app/md" + "applet/app/svc" + "applet/app/utils" + "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" + "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + "github.com/gin-gonic/gin" + "time" +) + +// PermissionGroupList +// @Summary 权限组列表 +// @Tags 权限管理 +// @Description 权限管理-权限组列表 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @param adm_id query string true "管理员id" +// @Success 200 {string} "具体看返回内容" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/permissionGroupList [GET] +func PermissionGroupList(c *gin.Context) { + roleId := c.DefaultQuery("role_id", "") + engine := db.Db + qrcodeWithBatchRecordsDb := implement.NewPermissionGroupDb(engine) + groupList, err := qrcodeWithBatchRecordsDb.FindPermissionGroup() + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + roleDb := implement.NewRoleDb(engine, utils.StrToInt(roleId)) + list, _, err := roleDb.FindPermissionGroupByRole(utils.StrToInt(roleId)) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + var isHasPermissionGroupId []string + for _, v := range list { + isHasPermissionGroupId = append(isHasPermissionGroupId, utils.IntToStr(v.PermissionGroup.Id)) + } + + var tempRespMap = map[string]*md.PermissionGroupListResp{} + var tempRespMapKeys []string + for _, v := range *groupList { + isCheck := false + if utils.InArr(utils.IntToStr(v.Id), isHasPermissionGroupId) { + isCheck = true + } + tempRespMap[utils.IntToStr(v.Id)] = &md.PermissionGroupListResp{ + Id: v.Id, + Name: v.Name, + Key: v.Key, + State: v.State, + ParentId: v.ParentId, + CreateAt: v.CreateAt, + UpdateAt: v.UpdateAt, + IsCheck: isCheck, + } + tempRespMapKeys = append(tempRespMapKeys, utils.IntToStr(v.Id)) + } + for _, v := range tempRespMap { + if v.ParentId != 0 && tempRespMap[utils.IntToStr(v.ParentId)].ParentId != 0 { + tempRespMap[utils.IntToStr(v.ParentId)].SubPermissionGroupList = append(tempRespMap[utils.IntToStr(v.ParentId)].SubPermissionGroupList, *v) + } + } + for _, v := range tempRespMap { + if v.ParentId != 0 && tempRespMap[utils.IntToStr(v.ParentId)].ParentId == 0 { + tempRespMap[utils.IntToStr(v.ParentId)].SubPermissionGroupList = append(tempRespMap[utils.IntToStr(v.ParentId)].SubPermissionGroupList, *v) + } + } + + var resp []*md.PermissionGroupListResp + for _, v := range tempRespMapKeys { + if tempRespMap[v].ParentId == 0 { + resp = append(resp, tempRespMap[v]) + } + } + + e.OutSuc(c, map[string]interface{}{ + "list": resp, + "state": []map[string]interface{}{ + { + "name": enum.PermissionGroupState(enum.PermissionGroupStateForNormal).String(), + "value": enum.PermissionGroupStateForNormal, + }, + { + "name": enum.PermissionGroupState(enum.PermissionGroupStateForDiscard).String(), + "value": enum.PermissionGroupStateForDiscard, + }, + }, + }, nil) + return +} + +// RoleList +// @Summary 角色列表 +// @Tags 权限管理 +// @Description 权限管理-角色列表 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Success 200 {string} "具体看返回内容" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/roleList [GET] +func RoleList(c *gin.Context) { + engine := db.Db + roleDb := implement.NewRoleDb(engine, 0) + roleList, err := roleDb.FindRole() + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + adminRoleDb := implement.NewAdminRoleDb(engine) + adminDb := implement.NewAdminDb(engine) + var result []*md.RoleListResp + for _, v := range *roleList { + var temp md.RoleListResp + temp.Data = v + adminRoles, err1 := adminRoleDb.FindAdminRoleByRoleId(v.Id) + if err1 != nil { + e.OutErr(c, e.ERR_DB_ORM, err1.Error()) + return + } + for _, adminRole := range *adminRoles { + admin, err2 := adminDb.GetAdmin(adminRole.AdmId) + if err2 != nil { + e.OutErr(c, e.ERR_DB_ORM, err2.Error()) + return + } + temp.AdminList = append(temp.AdminList, struct { + Name string `json:"name"` + }{ + Name: admin.Username, + }) + } + result = append(result, &temp) + } + e.OutSuc(c, map[string]interface{}{ + "list": result, + "state": []map[string]interface{}{ + { + "name": enum.RoleState(enum.RoleStateForNormal).String(), + "value": enum.RoleStateForNormal, + }, + { + "name": enum.RoleState(enum.RoleStateForFreeze).String(), + "value": enum.RoleStateForFreeze, + }, + }, + }, nil) + return +} + +// AddRole +// @Summary 添加角色 +// @Tags 权限管理 +// @Description 权限管理-添加角色 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.AddRoleReq true "请求参数" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/addRole [POST] +func AddRole(c *gin.Context) { + var req md.AddRoleReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := db.Db + roleDb := implement.NewRoleDb(engine, 0) + now := time.Now() + _, err = roleDb.RoleInsert(&model.Role{ + Name: req.Name, + State: enum.RoleStateForNormal, + Memo: req.Memo, + CreateAt: now.Format("2006-01-02 15:04:05"), + UpdateAt: now.Format("2006-01-02 15:04:05"), + }) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + e.OutSuc(c, "success", nil) + return +} + +// UpdateRole +// @Summary 修改角色 +// @Tags 权限管理 +// @Description 权限管理-修改角色 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.UpdateRoleReq true "请求参数" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/updateRole [POST] +func UpdateRole(c *gin.Context) { + var req md.UpdateRoleReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := db.Db + roleDb := implement.NewRoleDb(engine, req.RoleId) + role, err := roleDb.GetRole() + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if role == nil { + e.OutErr(c, e.ERR_NO_DATA, "未查询到相应记录") + return + } + role.Name = req.Name + role.Memo = req.Memo + _, err = roleDb.UpdateRole(role, "name", "memo") + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + e.OutSuc(c, "success", nil) + return +} + +// RoleBindPermissionGroup +// @Summary 角色绑定权限组 +// @Tags 权限管理 +// @Description 权限管理-角色绑定权限组 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.RoleBindPermissionGroupReq true "请求参数" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/roleBindPermissionGroup [POST] +func RoleBindPermissionGroup(c *gin.Context) { + var req md.RoleBindPermissionGroupReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + err = svc.RoleBindPermissionGroup(req) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + + e.OutSuc(c, "success", nil) + return +} + +// UpdateRoleState +// @Summary 修改角色状态 +// @Tags 权限管理 +// @Description 权限管理-修改角色状态 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.UpdateRoleStateReq true "请求参数" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/updateRoleState [POST] +func UpdateRoleState(c *gin.Context) { + var req md.UpdateRoleStateReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := db.Db + roleDb := implement.NewRoleDb(engine, req.RoleId) + role, err := roleDb.GetRole() + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if role == nil { + e.OutErr(c, e.ERR_NO_DATA, "未查询到相应记录") + return + } + role.State = req.State + _, err = roleDb.UpdateRole(role, "state") + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + e.OutSuc(c, "success", nil) + return +} + +// DeleteRole +// @Summary 删除角色 +// @Tags 权限管理 +// @Description 权限管理-删除角色 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.UpdateRoleStateReq true "请求参数" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/deleteRole/{$id} [DELETE] +func DeleteRole(c *gin.Context) { + id := c.Param("id") + engine := db.Db + roleDb := implement.NewRoleDb(engine, utils.StrToInt(id)) + role, err := roleDb.GetRole() + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if role == nil { + e.OutErr(c, e.ERR_NO_DATA, "未查询到相应记录") + return + } + + err = svc.DeleteRole(c, utils.StrToInt(id)) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + + e.OutSuc(c, "success", nil) + return +} + +// AdminList +// @Summary 管理员列表 +// @Tags 权限管理 +// @Description 权限管理-管理员列表 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.AdminListReq true "请求参数" +// @Success 200 {string} "具体看返回内容" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/adminList [POST] +func AdminList(c *gin.Context) { + var req md.AdminListReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + if req.Limit == 0 { + req.Limit = 10 + } + if req.Page == 0 { + req.Page = 10 + } + engine := db.Db + adminDb := implement.NewAdminDb(engine) + adminList, total, err := adminDb.FindAdmin(req.UserName, req.State, req.Page, req.Limit) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + var result []md.AdminListResp + for _, v := range adminList { + permissionGroupList, _, err1 := adminDb.FindAdminRolePermissionGroup(v.AdmId) + if err1 != nil { + e.OutErr(c, e.ERR_DB_ORM, err1.Error()) + return + } + var roleList []string + for _, v1 := range permissionGroupList { + roleList = append(roleList, v1.Role.Name) + } + + result = append(result, md.AdminListResp{ + AdmId: v.AdmId, + Username: v.Username, + State: v.State, + IsSuperAdministrator: v.IsSuperAdministrator, + Memo: v.Memo, + CreateAt: v.CreateAt, + UpdateAt: v.UpdateAt, + RoleList: roleList, + }) + } + + e.OutSuc(c, map[string]interface{}{ + "list": result, + "total": total, + "state": []map[string]interface{}{ + { + "name": enum.RoleState(enum.RoleStateForNormal).String(), + "value": enum.RoleStateForNormal, + }, + { + "name": enum.RoleState(enum.RoleStateForFreeze).String(), + "value": enum.RoleStateForFreeze, + }, + }, + }, nil) + return +} + +// UpdateAdminState +// @Summary 修改管理员状态 +// @Tags 权限管理 +// @Description 权限管理-修改管理员状态 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.UpdateAdminStateReq true "请求参数" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/updateAdminState [POST] +func UpdateAdminState(c *gin.Context) { + var req md.UpdateAdminStateReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + + engine := db.Db + admDb := implement.NewAdminDb(engine) + admin, err := admDb.GetAdmin(req.AdmId) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if admin == nil { + e.OutErr(c, e.ERR_NO_DATA, "未查询到相应记录") + return + } + admin.State = req.State + _, err = admDb.UpdateAdmin(admin, "state") + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + e.OutSuc(c, "success", nil) + return +} + +// UpdateAdmin +// @Summary 修改管理员信息 +// @Tags 权限管理 +// @Description 权限管理-修改管理员信息 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.UpdateAdminReq true "请求参数" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/updateAdmin [POST] +func UpdateAdmin(c *gin.Context) { + var req md.UpdateAdminReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := db.Db + admDb := implement.NewAdminDb(engine) + admin, err := admDb.GetAdmin(req.AdmId) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if admin == nil { + e.OutErr(c, e.ERR_NO_DATA, "未查询到相应记录") + return + } + admin.Username = req.Username + admin.Memo = req.Memo + if req.Password != "" { + admin.Password = utils.Md5(req.Password) + } + _, err = admDb.UpdateAdmin(admin, "username", "memo", "password", "show_time") + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + e.OutSuc(c, "success", nil) + return +} + +// AddAdmin +// @Summary 新增管理员 +// @Tags 权限管理 +// @Description 权限管理-新增管理员 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.AddAdminReq true "请求参数" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/addAdmin [POST] +func AddAdmin(c *gin.Context) { + var req md.AddAdminReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + engine := db.Db + admDb := implement.NewAdminDb(engine) + isHasAdmin, err := admDb.GetAdminByUserName(req.Username) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if isHasAdmin != nil { + e.OutErr(c, e.ERR, "当前用户名已存在,请勿重复添加") + return + } + + admId, err := admDb.CreateAdminId() + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + admin := model.Admin{ + + AdmId: admId, + Username: req.Username, + Password: utils.Md5(req.Password), + State: enum.AdminStateForNormal, + IsSuperAdministrator: 0, + Memo: req.Memo, + CreateAt: time.Now().Format("2006-01-02 15:04:05"), + UpdateAt: time.Now().Format("2006-01-02 15:04:05"), + } + _, err = admDb.AdminInsert(&admin) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + e.OutSuc(c, "success", nil) + return +} + +// DeleteAdmin +// @Summary 删除管理员 +// @Tags 权限管理 +// @Description 权限管理-删除管理员 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/deleteAdmin/{$adm_id} [DELETE] +func DeleteAdmin(c *gin.Context) { + admId := c.Param("adm_id") + err := svc.AdminDelete([]int{utils.StrToInt(admId)}) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + e.OutSuc(c, "success", nil) + return +} + +// BindAdminRole +// @Summary 管理员绑定角色 +// @Tags 权限管理 +// @Description 权限管理-管理员绑定角色 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @Param args body md.BindAdminRoleReq true "请求参数" +// @Success 200 {string} "success" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/bindAdminRole [POST] +func BindAdminRole(c *gin.Context) { + var req md.BindAdminRoleReq + err := c.ShouldBindJSON(&req) + if err != nil { + err = validate.HandleValidateErr(err) + err1 := err.(e.E) + e.OutErr(c, err1.Code, err1.Error()) + return + } + err = svc.BindAdminRole(c, req) + if err != nil { + e.OutErr(c, e.ERR, err.Error()) + return + } + e.OutSuc(c, "success", nil) + return +} + +// AdminInfo +// @Summary 管理员信息 +// @Tags 权限管理 +// @Description 权限管理-管理员信息 +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Accept json +// @Produce json +// @param adm_id query string true "管理员id" +// @Success 200 {string} "具体看返回内容" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/role/adminInfo [GET] +func AdminInfo(c *gin.Context) { + admId := c.DefaultQuery("adm_id", "") + engine := db.Db + admDb := implement.NewAdminDb(engine) + admin, err := admDb.GetAdmin(utils.StrToInt(admId)) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + admin.Password = "" + e.OutSuc(c, map[string]interface{}{ + "info": admin, + "state": []map[string]interface{}{ + { + "name": enum.RoleState(enum.RoleStateForNormal).String(), + "value": enum.RoleStateForNormal, + }, + { + "name": enum.RoleState(enum.RoleStateForFreeze).String(), + "value": enum.RoleStateForFreeze, + }, + }, + }, nil) + return +} diff --git a/app/hdl/member_center/hdl_level__management.go b/app/hdl/member_center/hdl_level__management.go index db81d6d..ada68d3 100644 --- a/app/hdl/member_center/hdl_level__management.go +++ b/app/hdl/member_center/hdl_level__management.go @@ -30,34 +30,11 @@ func GetLevelList(c *gin.Context) { page := c.DefaultQuery("page", "1") limit := c.DefaultQuery("limit", "10") - levelDb := implement.NewUserLevelDb(db.Db) - levels, total, err := levelDb.UserLevelAllByAscByPage(utils.StrToInt(page), utils.StrToInt(limit)) - if err != nil { - e.OutErr(c, e.ERR_DB_ORM, err.Error()) - return - } - - sql := "SElECT count(distinct id) as total, level FROM `user` GROUP BY level" - results, err := db.QueryNativeString(db.Db, sql) + list, total, err := svc.LevelManagementGetLevelList(page, limit) if err != nil { e.OutErr(c, e.ERR_DB_ORM, err.Error()) return } - var countMap = map[int]string{} - for _, res := range results { - countMap[utils.StrToInt(res["level"])] = res["total"] - } - - list := make([]md2.LevelListNode, len(levels)) - for i, level := range levels { - list[i].LevelWeight = level.LevelWeight - list[i].LevelID = level.Id - list[i].LevelName = level.LevelName - list[i].Count = countMap[level.Id] - list[i].CreateAt = level.CreateAt - list[i].IsUse = level.IsUse - list[i].Memo = level.Memo - } resp := md2.GetLevelListResp{ List: list, @@ -165,6 +142,21 @@ func UpdateLevel(c *gin.Context) { forceColumns = append(forceColumns, "level_weight") } if req.IsUse == "0" || req.IsUse == "1" { + // 判断当前该等级有没有被使用 + userDb := implement.NewUserDb(db.Db) + has, err := userDb.UserExistByParams(map[string]interface{}{ + "key": "level", + "value": req.IsUse, + }) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if has { + e.OutErr(c, e.ERR, errors.New("该等级下存在会员,无法关闭该会员等级,请移除对应等级下会员或将会员移动到其他等级").Error()) + return + } + level.LevelWeight = utils.StrToInt(req.IsUse) forceColumns = append(forceColumns, "is_use") } @@ -201,10 +193,12 @@ func UpdateLevel(c *gin.Context) { } // 2.2 添加更新后的任务 - err = svc.BatchAddLevelTask(session, req.UserLevelTasks, utils.StrToInt(req.LevelID)) - if err != nil { - e.OutErr(c, e.ERR_DB_ORM, err.Error()) - return + if len(req.UserLevelTasks) > 0 { + err = svc.BatchAddLevelTask(session, req.UserLevelTasks, utils.StrToInt(req.LevelID)) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } } err = session.Commit() @@ -262,10 +256,12 @@ func AddLevel(c *gin.Context) { } // 2. 创建任务信息 - err = svc.BatchAddLevelTask(session, req.UserLevelTasks, id) - if err != nil { - e.OutErr(c, e.ERR_DB_ORM, err.Error()) - return + if len(req.UserLevelTasks) > 0 { + err = svc.BatchAddLevelTask(session, req.UserLevelTasks, id) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } } err = session.Commit() diff --git a/app/hdl/member_center/hdl_tag__management.go b/app/hdl/member_center/hdl_tag__management.go index 89bc7e1..b40b72c 100644 --- a/app/hdl/member_center/hdl_tag__management.go +++ b/app/hdl/member_center/hdl_tag__management.go @@ -4,9 +4,11 @@ import ( "applet/app/db" "applet/app/e" md2 "applet/app/md/member_center" + svc "applet/app/svc/member_center" "applet/app/utils" "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + "errors" "github.com/gin-gonic/gin" "time" ) @@ -27,34 +29,12 @@ func GetTagList(c *gin.Context) { page := c.DefaultQuery("page", "1") limit := c.DefaultQuery("limit", "10") - sql := "SElECT count(distinct uid) as total, tag_id FROM `user_tag_records` GROUP BY tag_id" - results, err := db.QueryNativeString(db.Db, sql) - if err != nil { - e.OutErr(c, e.ERR_DB_ORM, err.Error()) - return - } - var countMap = map[int64]string{} - for _, res := range results { - countMap[utils.StrToInt64(res["tag_id"])] = res["total"] - } - - tagDb := implement.NewUserTagDb(db.Db) - tags, total, err := tagDb.UserTagAllByAscByPage(utils.StrToInt(page), utils.StrToInt(limit)) + list, total, err := svc.TagManagementGetList(page, limit) if err != nil { e.OutErr(c, e.ERR_DB_ORM, err.Error()) return } - list := make([]md2.TagListNode, len(*tags)) - for i, tag := range *tags { - list[i].Name = tag.TagName - list[i].Count = countMap[int64(tag.Id)] - list[i].CreateAt = tag.CreateAt - list[i].Memo = tag.Memo - list[i].TagID = utils.IntToStr(tag.Id) - list[i].IsPunish = tag.IsPunish - } - resp := md2.GetTagListResp{ List: list, Paginate: md2.Paginate{ @@ -119,16 +99,43 @@ func UpdateTag(c *gin.Context) { return } tagID := utils.StrToInt(req.TagID) - + tagDb := implement.NewUserTagDb(db.Db) + oldTag, err := tagDb.UserTagGetOneByParams(map[string]interface{}{"key": "id", "value": tagID}) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if oldTag == nil { + e.OutErr(c, e.ERR_NO_DATA, errors.New("标签不存在").Error()) + return + } + if req.IsPunish != "" && oldTag.IsPunish != utils.StrToInt(req.IsPunish) { + // 标签在被使用情况下不允许修改是否为处罚标签 + recordsDb := implement.NewUserTagRecordsDb(db.Db) + exist, err := recordsDb.UserTagRecordsExist(0, tagID) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if exist { + e.OutErr(c, e.ERR, errors.New("该标签已被使用,无法修改是否为处罚标签").Error()) + return + } + } tag := &model.UserTag{ - Id: tagID, - TagName: req.Name, - Memo: req.Memo, + Id: tagID, + } + + if req.Name != "" { + tag.TagName = req.Name + } + + if req.Memo != "" { + tag.Memo = req.Memo } forceColumns := []string{"tag_name", "memo", "is_punish"} - tagDb := implement.NewUserTagDb(db.Db) affected, err := tagDb.UserTagUpdate(tagID, tag, forceColumns...) if err != nil { e.OutErr(c, e.ERR_DB_ORM, err.Error()) @@ -160,7 +167,17 @@ func DeleteTag(c *gin.Context) { session := db.Db.NewSession() defer session.Close() - _, err := tagDb.UserTagDeleteBySession(session, req.TagID) + isUsed, err := recordsDb.UserTagRecordsIsUsedBySession(session, utils.StrToInt(req.TagID)) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + if isUsed { + e.OutErr(c, e.ERR, errors.New("该标签已被使用,无法删除").Error()) + return + } + + _, err = tagDb.UserTagDeleteBySession(session, req.TagID) if err != nil { session.Rollback() e.OutErr(c, e.ERR_DB_ORM, err.Error()) diff --git a/app/hdl/member_center/hdl_user_management.go b/app/hdl/member_center/hdl_user_management.go index 157ea91..9950bf6 100644 --- a/app/hdl/member_center/hdl_user_management.go +++ b/app/hdl/member_center/hdl_user_management.go @@ -75,13 +75,13 @@ func UserManagementGetUserList(c *gin.Context) { }, } - users, total, err3 := svc.UserManagementGetUsers(db.Db, req) + users, total, err3 := svc.UserManagementGetUsers(req) if err3 != nil { e.OutErr(c, e.ERR_DB_ORM, err3.Error()) return } - userIDs := make([]int64, len(*users)) - for i, user := range *users { + userIDs := make([]int64, len(users)) + for i, user := range users { userIDs[i] = user.Id } @@ -102,9 +102,9 @@ func UserManagementGetUserList(c *gin.Context) { return } - userMap := make(map[int64]int, len(*users)) - list := make([]md.UserManagementGetUserListNode, len(*users)) - for i, user := range *users { + userMap := make(map[int64]int, len(users)) + list := make([]md.UserManagementGetUserListNode, len(users)) + for i, user := range users { list[i] = md.UserManagementGetUserListNode{ ID: user.Id, Sex: user.Sex, diff --git a/app/hdl/notice/hdl_aliyun_sms.go b/app/hdl/notice/hdl_aliyun_sms.go index f652422..fcf7523 100644 --- a/app/hdl/notice/hdl_aliyun_sms.go +++ b/app/hdl/notice/hdl_aliyun_sms.go @@ -1,7 +1,14 @@ package notice import ( + "applet/app/db" + "applet/app/e" + "applet/app/md" + svc2 "applet/app/svc" + svc "applet/app/svc/member_center" "applet/app/svc/notice" + "applet/app/utils" + "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" "github.com/gin-gonic/gin" ) @@ -124,3 +131,210 @@ func AliyunSmsPushList(c *gin.Context) { func AliyunSmsPushSave(c *gin.Context) { notice.AliyunSmsPushSave(c) } + +// AliyunSmsGetUserList +// @Summary 消息中心-短信推送记录-获取用户信息 +// @Tags 消息中心 +// @Description 获取用户信息 +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.JPushGetUserListReq true "(分页信息必填)" +// @Success 200 {Object} md.JPushGetUserListResp "具体数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/notice/aliyunSms/getUserList [post] +func AliyunSmsGetUserList(c *gin.Context) { + var req *md.AliyunSmsUserListReq + if err := c.ShouldBindJSON(&req); err != nil { + e.OutErr(c, e.ERR_INVALID_ARGS, err.Error()) + return + } + + levelDb := implement.NewUserLevelDb(db.Db) + levels, err1 := levelDb.UserLevelAllByAsc() + if err1 != nil { + e.OutErr(c, e.ERR_DB_ORM, err1.Error()) + return + } + levelsList := make([]map[string]interface{}, 0) + levelsMap := make(map[int]string) + for _, level := range levels { + levelsList = append(levelsList, map[string]interface{}{ + "id": level.Id, + "name": level.LevelName, + }) + levelsMap[level.Id] = level.LevelName + } + + tagDb := implement.NewUserTagDb(db.Db) + tags, err2 := tagDb.UserTagAllByAsc() + if err2 != nil { + e.OutErr(c, e.ERR_DB_ORM, err2.Error()) + return + } + tagsList := make([]map[string]interface{}, 0) + tagsMap := make(map[int]string) + for _, tag := range tags { + tagsList = append(tagsList, map[string]interface{}{ + "id": tag.Id, + "name": tag.TagName, + }) + tagsMap[tag.Id] = tag.TagName + } + + stateList := []map[string]interface{}{ + { + "name": "正常", + "value": "1", + }, + { + "name": "冻结", + "value": "2", + }, + } + userMemberRequest := req.ToUserMemberRequest() + users, total, err3 := svc.UserManagementGetUsers(userMemberRequest) + if err3 != nil { + e.OutErr(c, e.ERR_DB_ORM, err3.Error()) + return + } + userIDs := make([]int64, len(users)) + for i, user := range users { + userIDs[i] = user.Id + } + + recordsDb := implement.NewUserTagRecordsDb(db.Db) + records, err := recordsDb.UserTagRecordsFindByParams(map[string]interface{}{ + "key": "uid", + "value": userIDs, + }) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + var levelCounts []md.LevelCount + err4 := db.Db.Table("user").Select("level, Count(*) AS count").GroupBy("level").Find(&levelCounts) + if err4 != nil { + e.OutErr(c, e.ERR_DB_ORM, err4.Error()) + return + } + + userMap := make(map[int64]int, len(users)) + list := make([]md.GetUserListNode, len(users)) + for i, user := range users { + list[i] = md.GetUserListNode{ + ID: user.Id, + Sex: user.Sex, + Avatar: svc2.GetOssUrl(user.Avatar), + Nickname: user.Nickname, + Phone: user.Phone, + IsRealName: user.IsRealName, + InviteCode: user.SystemInviteCode, + ParentID: user.ParentUid, + ParentInviteCode: user.ParentSystemInviteCode, + ParentPhone: user.Phone, + RegisterTime: user.CreateAt, + Memo: user.Memo, + Wechat: user.UnionId, + RegisterType: user.RegisterType, + State: user.State, + LastLoginAt: user.UpdateAt, + } + var tempTagList []md.TagNode + list[i].Tag = tempTagList + userMap[user.Id] = i + level, ok := levelsMap[user.Level] + if ok { + list[i].LevelName = level + } + } + + for _, record := range *records { + tempTagNode := md.TagNode{ + TagID: record.TagId, + TagName: tagsMap[record.TagId], + } + list[userMap[record.Uid]].Tag = append(list[userMap[record.Uid]].Tag, tempTagNode) + } + + resp := md.AliyunSmsGetUserListResp{ + LevelsList: levelsList, + TagsList: tagsList, + StateList: stateList, + List: list, + Paginate: md.Paginate{ + Limit: req.Limit, + Page: req.Page, + Total: total, + }, + } + e.OutSuc(c, resp, nil) +} + +// AliyunSmsTagList +// @Summary 消息中心-短信推送记录-标签管理(获取) +// @Tags 消息中心 +// @Description 标签管理(获取) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param limit query int true "每页大小" +// @Param page query int true "页数" +// @Success 200 {object} md.AliyunSmsGetTagListResp "具体数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/notice/aliyunSms/getTagList [get] +func AliyunSmsTagList(c *gin.Context) { + page := c.DefaultQuery("page", "1") + limit := c.DefaultQuery("limit", "10") + + list, total, err := svc.TagManagementGetList(page, limit) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + resp := md.AliyunSmsGetTagListResp{ + List: list, + Paginate: md.Paginate{ + Limit: utils.StrToInt(limit), + Page: utils.StrToInt(page), + Total: total, + }, + } + e.OutSuc(c, resp, nil) +} + +// AliyunSmsGetLevelList +// @Summary 消息中心-短信推送记录-等级管理(获取) +// @Tags 消息中心 +// @Description 等级管理(获取) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param limit query int true "每页大小" +// @Param page query int true "页数" +// @Success 200 {object} md.AliyunSmsGetLevelListResp "具体数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/notice/aliyunSms/getLevelList [get] +func AliyunSmsGetLevelList(c *gin.Context) { + page := c.DefaultQuery("page", "1") + limit := c.DefaultQuery("limit", "10") + + list, total, err := svc.LevelManagementGetLevelList(page, limit) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + resp := md.AliyunSmsGetLevelListResp{ + List: list, + Paginate: md.Paginate{ + Limit: utils.StrToInt(limit), + Page: utils.StrToInt(page), + Total: total, + }, + } + + e.OutSuc(c, resp, nil) +} diff --git a/app/hdl/notice/hdl_notice.go b/app/hdl/notice/hdl_notice.go index 6f7b9d3..1ff1985 100644 --- a/app/hdl/notice/hdl_notice.go +++ b/app/hdl/notice/hdl_notice.go @@ -1,7 +1,14 @@ package notice import ( + "applet/app/db" + "applet/app/e" + "applet/app/md" + svc2 "applet/app/svc" + svc "applet/app/svc/member_center" "applet/app/svc/notice" + "applet/app/utils" + "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" "github.com/gin-gonic/gin" ) @@ -79,3 +86,210 @@ func PushList(c *gin.Context) { func PushSave(c *gin.Context) { notice.PushSave(c) } + +// JPushGetUserList +// @Summary 消息中心-基本配置-获取用户信息 +// @Tags 消息中心 +// @Description 获取用户信息 +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param req body md.JPushGetUserListReq true "(分页信息必填)" +// @Success 200 {Object} md.JPushGetUserListResp "具体数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/notice/jPush/getUserList [post] +func JPushGetUserList(c *gin.Context) { + var req *md.JPushGetUserListReq + if err := c.ShouldBindJSON(&req); err != nil { + e.OutErr(c, e.ERR_INVALID_ARGS, err.Error()) + return + } + + levelDb := implement.NewUserLevelDb(db.Db) + levels, err1 := levelDb.UserLevelAllByAsc() + if err1 != nil { + e.OutErr(c, e.ERR_DB_ORM, err1.Error()) + return + } + levelsList := make([]map[string]interface{}, 0) + levelsMap := make(map[int]string) + for _, level := range levels { + levelsList = append(levelsList, map[string]interface{}{ + "id": level.Id, + "name": level.LevelName, + }) + levelsMap[level.Id] = level.LevelName + } + + tagDb := implement.NewUserTagDb(db.Db) + tags, err2 := tagDb.UserTagAllByAsc() + if err2 != nil { + e.OutErr(c, e.ERR_DB_ORM, err2.Error()) + return + } + tagsList := make([]map[string]interface{}, 0) + tagsMap := make(map[int]string) + for _, tag := range tags { + tagsList = append(tagsList, map[string]interface{}{ + "id": tag.Id, + "name": tag.TagName, + }) + tagsMap[tag.Id] = tag.TagName + } + + stateList := []map[string]interface{}{ + { + "name": "正常", + "value": "1", + }, + { + "name": "冻结", + "value": "2", + }, + } + userMemberRequest := req.ToUserMemberRequest() + users, total, err3 := svc.UserManagementGetUsers(userMemberRequest) + if err3 != nil { + e.OutErr(c, e.ERR_DB_ORM, err3.Error()) + return + } + userIDs := make([]int64, len(users)) + for i, user := range users { + userIDs[i] = user.Id + } + + recordsDb := implement.NewUserTagRecordsDb(db.Db) + records, err := recordsDb.UserTagRecordsFindByParams(map[string]interface{}{ + "key": "uid", + "value": userIDs, + }) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + var levelCounts []md.LevelCount + err4 := db.Db.Table("user").Select("level, Count(*) AS count").GroupBy("level").Find(&levelCounts) + if err4 != nil { + e.OutErr(c, e.ERR_DB_ORM, err4.Error()) + return + } + + userMap := make(map[int64]int, len(users)) + list := make([]md.GetUserListNode, len(users)) + for i, user := range users { + list[i] = md.GetUserListNode{ + ID: user.Id, + Sex: user.Sex, + Avatar: svc2.GetOssUrl(user.Avatar), + Nickname: user.Nickname, + Phone: user.Phone, + IsRealName: user.IsRealName, + InviteCode: user.SystemInviteCode, + ParentID: user.ParentUid, + ParentInviteCode: user.ParentSystemInviteCode, + ParentPhone: user.Phone, + RegisterTime: user.CreateAt, + Memo: user.Memo, + Wechat: user.UnionId, + RegisterType: user.RegisterType, + State: user.State, + LastLoginAt: user.UpdateAt, + } + var tempTagList []md.TagNode + list[i].Tag = tempTagList + userMap[user.Id] = i + level, ok := levelsMap[user.Level] + if ok { + list[i].LevelName = level + } + } + + for _, record := range *records { + tempTagNode := md.TagNode{ + TagID: record.TagId, + TagName: tagsMap[record.TagId], + } + list[userMap[record.Uid]].Tag = append(list[userMap[record.Uid]].Tag, tempTagNode) + } + + resp := md.JPushGetUserListResp{ + LevelsList: levelsList, + TagsList: tagsList, + StateList: stateList, + List: list, + Paginate: md.Paginate{ + Limit: req.Limit, + Page: req.Page, + Total: total, + }, + } + e.OutSuc(c, resp, nil) +} + +// JPushGetTagList +// @Summary 消息中心-基本配置-标签管理(获取) +// @Tags 消息中心 +// @Description 标签管理(获取) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param limit query int true "每页大小" +// @Param page query int true "页数" +// @Success 200 {object} md.JPushGetTagListResp "具体数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/notice/jPush/getTagList [get] +func JPushGetTagList(c *gin.Context) { + page := c.DefaultQuery("page", "1") + limit := c.DefaultQuery("limit", "10") + + list, total, err := svc.TagManagementGetList(page, limit) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + resp := md.JPushGetTagListResp{ + List: list, + Paginate: md.Paginate{ + Limit: utils.StrToInt(limit), + Page: utils.StrToInt(page), + Total: total, + }, + } + e.OutSuc(c, resp, nil) +} + +// JPushGetLevelList +// @Summary 消息中心-基本配置-等级管理(获取) +// @Tags 消息中心 +// @Description 等级管理(获取) +// @Accept json +// @Produce json +// @param Authorization header string true "验证参数Bearer和token空格拼接" +// @Param limit query int true "每页大小" +// @Param page query int true "页数" +// @Success 200 {object} md.JPushGetLevelListResp "具体数据" +// @Failure 400 {object} md.Response "具体错误" +// @Router /api/notice/jPush/getLevelList [get] +func JPushGetLevelList(c *gin.Context) { + page := c.DefaultQuery("page", "1") + limit := c.DefaultQuery("limit", "10") + + list, total, err := svc.LevelManagementGetLevelList(page, limit) + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, err.Error()) + return + } + + resp := md.JPushGetLevelListResp{ + List: list, + Paginate: md.Paginate{ + Limit: utils.StrToInt(limit), + Page: utils.StrToInt(page), + Total: total, + }, + } + + e.OutSuc(c, resp, nil) +} diff --git a/app/md/md_notice.go b/app/md/md_notice.go index 6ba5834..81522fc 100644 --- a/app/md/md_notice.go +++ b/app/md/md_notice.go @@ -1,5 +1,10 @@ package md +import ( + md "applet/app/md/member_center" + "code.fnuoos.com/EggPlanet/egg_models.git/src/model" +) + type NoticeListReq struct { Page string `json:"page,required"` // 页数 Limit string `json:"limit,required"` // 每页大小 @@ -118,3 +123,187 @@ type NoticeAliyunSmsPushSaveReq struct { TagList []string `json:"tag_list"` Level []string `json:"level"` } + +type Paginate struct { + Limit int `json:"limit"` // 每页大小 + Page int `json:"page"` // 页数 + Total int64 `json:"total"` // 总数据量 +} + +type JPushGetUserListResp struct { + LevelsList []map[string]interface{} `json:"levels_list"` // 等级列表 + TagsList []map[string]interface{} `json:"tags_list"` // 标签列表 + StateList []map[string]interface{} `json:"state_list"` // 状态列表 + List []GetUserListNode `json:"list"` + Paginate Paginate `json:"paginate"` // 分页信息 +} + +type TagNode struct { + TagID int `json:"tag_id"` // 标签 ID + TagName string `json:"tag_name"` // 标签名称 +} +type LevelCount struct { + Level int `xorm:"level"` + Count int `xorm:"count"` +} + +type GetUserListNode struct { + ID int64 `json:"id"` // 会员 ID + Tag []TagNode `json:"tag"` // 会员标签 + Sex int `json:"sex"` // 性别(0:未知 1:男 2:女) + Avatar string `json:"avatar"` // 头像 + Nickname string `json:"nickname"` // 昵称 + Phone string `json:"phone"` // 手机号 + IsRealName int `json:"is_real_name"` // 是否实名 0.未实名,1.已实名 + LevelName string `json:"level_name"` // 会员等级 + InviteCode string `json:"invite_code" example:"会员邀请码"` + ParentID int64 `json:"parent_id"` // 推荐人 ID + ParentInviteCode string `json:"parent_invite_code" example:"推荐人邀请码"` + ParentPhone string `json:"parent_phone" example:"推荐人手机号"` + RegisterTime string `json:"register_time"` // 注册时间 + Memo string `json:"memo"` // 备注 + Wechat string `json:"wechat"` // 微信号 + RegisterType int `json:"register_type"` // 注册类型 + State int `json:"state"` // 状态 + LastLoginAt string `json:"last_login_at"` // 最后登录时间 +} + +type JPushGetUserListReq struct { + ID int64 `json:"id"` // 会员 ID + Nickname string `json:"nickname" example:"会员昵称"` + RecommendID int64 `json:"recommend_id"` // 推荐人 ID + Tag int `json:"tag"` // 标签 id + Phone string `json:"phone" example:"会员手机号"` + InviteCode string `json:"invite_code" example:"会员邀请码"` + ParentInviteCode string `json:"parent_invite_code" example:"上级邀请码"` + ParentPhone string `json:"parent_phone" example:"上级手机号"` + Sex int `json:"sex"` // 性别(0:未知 1:男 2:女) + UnionId string `json:"union_id" example:"微信号"` + Level int `json:"level"` // 会员等级 + RegisterType int `json:"register_type"` // 注册类型(1:APP注册、2:H5注册) + State int `json:"state"` // 状态 + Effective int `json:"effective"` // 有效会员 + IsRealName int `json:"is_real_name"` // 是否实名 0.未实名,1.已实名 + Memo string `json:"memo"` // 备注 + RegisterBefore string `json:"register_before"` // 注册时间起点 + RegisterAfter string `json:"register_after"` // 注册时间终点 + LoginBefore string `json:"login_before"` // 最近登录开始时间 + LoginAfter string `json:"login_after"` // 最近登录结束时间 + Page int `json:"page,required"` + Limit int `json:"limit,required"` +} + +type UserInfo struct { + model.User `xorm:"extends"` + TagID int `xorm:"tag_id"` + ParentPhone string `xorm:"parent_phone"` + ParentSystemInviteCode string `xorm:"parent_system_invite_code"` + ParentCustomInviteCode string `xorm:"parent_custom_invite_code"` +} + +type JPushGetTagListResp struct { + List []md.TagListNode `json:"list"` + Paginate Paginate `json:"paginate"` +} + +type JPushGetLevelListResp struct { + List []md.LevelListNode `json:"list"` + Paginate Paginate `json:"paginate"` +} + +type AliyunSmsGetUserListResp struct { + LevelsList []map[string]interface{} `json:"levels_list"` // 等级列表 + TagsList []map[string]interface{} `json:"tags_list"` // 标签列表 + StateList []map[string]interface{} `json:"state_list"` // 状态列表 + List []GetUserListNode `json:"list"` + Paginate Paginate `json:"paginate"` // 分页信息 +} + +type AliyunSmsUserListReq struct { + ID int64 `json:"id"` // 会员 ID + Nickname string `json:"nickname" example:"会员昵称"` + RecommendID int64 `json:"recommend_id"` // 推荐人 ID + Tag int `json:"tag"` // 标签 id + Phone string `json:"phone" example:"会员手机号"` + InviteCode string `json:"invite_code" example:"会员邀请码"` + ParentInviteCode string `json:"parent_invite_code" example:"上级邀请码"` + ParentPhone string `json:"parent_phone" example:"上级手机号"` + Sex int `json:"sex"` // 性别(0:未知 1:男 2:女) + UnionId string `json:"union_id" example:"微信号"` + Level int `json:"level"` // 会员等级 + RegisterType int `json:"register_type"` // 注册类型(1:APP注册、2:H5注册) + State int `json:"state"` // 状态 + Effective int `json:"effective"` // 有效会员 + IsRealName int `json:"is_real_name"` // 是否实名 0.未实名,1.已实名 + Memo string `json:"memo"` // 备注 + RegisterBefore string `json:"register_before"` // 注册时间起点 + RegisterAfter string `json:"register_after"` // 注册时间终点 + LoginBefore string `json:"login_before"` // 最近登录开始时间 + LoginAfter string `json:"login_after"` // 最近登录结束时间 + Page int `json:"page,required"` + Limit int `json:"limit,required"` +} + +type AliyunSmsGetTagListResp struct { + List []md.TagListNode `json:"list"` + Paginate Paginate `json:"paginate"` +} + +type AliyunSmsGetLevelListResp struct { + List []md.LevelListNode `json:"list"` + Paginate Paginate `json:"paginate"` +} + +func (req JPushGetUserListReq) ToUserMemberRequest() *md.UserManagementGetUserListReq { + return &md.UserManagementGetUserListReq{ + ID: req.ID, + Nickname: req.Nickname, + RecommendID: req.RecommendID, + Tag: req.Tag, + Phone: req.Phone, + InviteCode: req.InviteCode, + ParentInviteCode: req.ParentInviteCode, + ParentPhone: req.ParentPhone, + Sex: req.Sex, + UnionId: req.UnionId, + Level: req.Level, + RegisterType: req.RegisterType, + State: req.State, + Effective: req.Effective, + IsRealName: req.IsRealName, + Memo: req.Memo, + RegisterBefore: req.RegisterBefore, + RegisterAfter: req.RegisterAfter, + LoginBefore: req.LoginBefore, + LoginAfter: req.LoginAfter, + Page: req.Page, + Limit: req.Limit, + } +} + +func (req AliyunSmsUserListReq) ToUserMemberRequest() *md.UserManagementGetUserListReq { + return &md.UserManagementGetUserListReq{ + ID: req.ID, + Nickname: req.Nickname, + RecommendID: req.RecommendID, + Tag: req.Tag, + Phone: req.Phone, + InviteCode: req.InviteCode, + ParentInviteCode: req.ParentInviteCode, + ParentPhone: req.ParentPhone, + Sex: req.Sex, + UnionId: req.UnionId, + Level: req.Level, + RegisterType: req.RegisterType, + State: req.State, + Effective: req.Effective, + IsRealName: req.IsRealName, + Memo: req.Memo, + RegisterBefore: req.RegisterBefore, + RegisterAfter: req.RegisterAfter, + LoginBefore: req.LoginBefore, + LoginAfter: req.LoginAfter, + Page: req.Page, + Limit: req.Limit, + } +} diff --git a/app/md/md_role.go b/app/md/md_role.go index 5e8c173..a3b3338 100644 --- a/app/md/md_role.go +++ b/app/md/md_role.go @@ -17,22 +17,14 @@ type UpdateRoleStateReq struct { } type AddRoleReq struct { - Name string `json:"name" binding:"required" label:"名称"` - Memo string `json:"memo" binding:"required" label:"备注"` - Logo string `json:"logo" label:"左边图标"` - Label string `json:"label" label:"身份标签"` - SeoLogo string `json:"seo_logo" label:"seo"` - SeoTitle string `json:"seo_title" label:"seo"` + Name string `json:"name" binding:"required" label:"名称"` + Memo string `json:"memo" binding:"required" label:"备注"` } type UpdateRoleReq struct { - RoleId int `json:"role_id" binding:"required" label:"id"` - Name string `json:"name" binding:"required" label:"名称"` - Memo string `json:"memo" binding:"required" label:"备注"` - Logo string `json:"logo" label:"左边图标"` - Label string `json:"label" label:"身份标签"` - SeoLogo string `json:"seo_logo" label:"seo"` - SeoTitle string `json:"seo_title" label:"seo"` + RoleId int `json:"role_id" binding:"required" label:"id"` + Name string `json:"name" binding:"required" label:"名称"` + Memo string `json:"memo" binding:"required" label:"备注"` } type RoleBindPermissionGroupReq struct { diff --git a/app/md/member_center/md_tag_management.go b/app/md/member_center/md_tag_management.go index 8a05c2b..fd6bc13 100644 --- a/app/md/member_center/md_tag_management.go +++ b/app/md/member_center/md_tag_management.go @@ -21,9 +21,10 @@ type AddTagReq struct { } type UpdateTagReq struct { - TagID string `json:"tag_id,required"` // 标签 ID - Name string `json:"name,required"` // 标签名称 - Memo string `json:"memo,required"` // 备注 + TagID string `json:"tag_id,required"` // 标签 ID + Name string `json:"name,required"` // 标签名称 + Memo string `json:"memo,required"` // 备注 + IsPunish string `json:"is_punish"` // 是否是惩罚标签 } type DeleteTagReq struct { diff --git a/app/router/router.go b/app/router/router.go index b44e812..5adb49b 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -89,6 +89,7 @@ func route(r *gin.RouterGroup) { r.GET("/config", hdl.Config) rIm(r.Group("/im")) r.Use(mw.CheckPermission) // 检测权限 + rRole(r.Group("/role")) rInstitutionalManagement(r.Group("/institutionalManagement")) rMarketingApplications(r.Group("/marketingApplications")) rMemberCenter(r.Group("/memberCenter")) @@ -147,17 +148,17 @@ func rNotice(r *gin.RouterGroup) { rJpush := r.Group("/jPush") //极光 { rJpush.POST("/push/list", notice.PushList) - rJpush.POST("/getUserList", member_center.UserManagementGetUserList) - rJpush.GET("/getTagList", member_center.GetTagList) - rJpush.GET("/getLevelList", member_center.GetLevelList) + rJpush.POST("/getUserList", notice.JPushGetUserList) + rJpush.GET("/getTagList", notice.JPushGetTagList) + rJpush.GET("/getLevelList", notice.JPushGetLevelList) rJpush.POST("/push/save", notice.PushSave) } rAliyunSms := r.Group("/aliyunSms") //阿里云短信 { rAliyunSms.POST("/file/phone", notice.AliyunSmsFilePhone) - rAliyunSms.POST("/getUserList", member_center.UserManagementGetUserList) - rAliyunSms.GET("/getTagList", member_center.GetTagList) - rAliyunSms.GET("/getLevelList", member_center.GetLevelList) + rAliyunSms.POST("/getUserList", notice.AliyunSmsGetUserList) + rAliyunSms.GET("/getTagList", notice.AliyunSmsTagList) + rAliyunSms.GET("/getLevelList", notice.AliyunSmsGetLevelList) rAliyunSms.GET("/sale/base", notice.AliyunSmsSaleBase) rAliyunSms.POST("/sale/save", notice.AliyunSmsSaleSave) rAliyunSms.POST("/push/list", notice.AliyunSmsPushList) @@ -410,6 +411,23 @@ func rFriendCircleSettings(r *gin.RouterGroup) { } } +func rRole(r *gin.RouterGroup) { + r.GET("/roleList", hdl.RoleList) // 角色列表 + r.POST("/addRole", hdl.AddRole) // 角色添加 + r.POST("/roleBindPermissionGroup", hdl.RoleBindPermissionGroup) // 角色绑定权限组 + r.POST("/updateRoleState", hdl.UpdateRoleState) // 修改角色状态 + r.POST("/updateRole", hdl.UpdateRole) // 修改角色状态 + r.DELETE("/deleteRole/:id", hdl.DeleteRole) // 删除角色 + r.GET("/permissionGroupList", hdl.PermissionGroupList) // 权限组列表 + r.POST("/adminList", hdl.AdminList) // 管理员列表 + r.POST("/updateAdminState", hdl.UpdateAdminState) // 修改管理员状态 + r.POST("/updateAdmin", hdl.UpdateAdmin) // 修改管理员信息 + r.POST("/addAdmin", hdl.AddAdmin) // 新增管理员 + r.DELETE("/deleteAdmin/:adm_id", hdl.DeleteAdmin) // 删除管理员 + r.GET("/adminInfo", hdl.AdminInfo) // 获取管理员信息 + r.POST("/bindAdminRole", hdl.BindAdminRole) // 绑定角色 +} + func rComm(r *gin.RouterGroup) { r.POST("/getMenuList", comm.MenuList) // 获取菜单栏列表 r.POST("/getOssUrl", comm.GetOssUrl) // 获取阿里云上传PutObject所需的签名URL diff --git a/app/svc/member_center/svc_level_management.go b/app/svc/member_center/svc_level_management.go index 4a19be4..a160868 100644 --- a/app/svc/member_center/svc_level_management.go +++ b/app/svc/member_center/svc_level_management.go @@ -45,3 +45,34 @@ func BatchAddLevelTask(session *xorm.Session, tasks []md.LevelTaskNode, levelId return nil } + +func LevelManagementGetLevelList(page, limit string) ([]md.LevelListNode, int64, error) { + levelDb := implement.NewUserLevelDb(db.Db) + levels, total, err := levelDb.UserLevelAllByAscByPage(utils.StrToInt(page), utils.StrToInt(limit)) + if err != nil { + return nil, 0, err + } + + sql := "SElECT count(distinct id) as total, level FROM `user` GROUP BY level" + results, err := db.QueryNativeString(db.Db, sql) + if err != nil { + return nil, 0, err + } + var countMap = map[int]string{} + for _, res := range results { + countMap[utils.StrToInt(res["level"])] = res["total"] + } + + list := make([]md.LevelListNode, len(levels)) + for i, level := range levels { + list[i].LevelWeight = level.LevelWeight + list[i].LevelID = level.Id + list[i].LevelName = level.LevelName + list[i].Count = countMap[level.Id] + list[i].CreateAt = level.CreateAt + list[i].IsUse = level.IsUse + list[i].Memo = level.Memo + } + + return list, total, nil +} diff --git a/app/svc/member_center/svc_tag__management.go b/app/svc/member_center/svc_tag__management.go new file mode 100644 index 0000000..b37183e --- /dev/null +++ b/app/svc/member_center/svc_tag__management.go @@ -0,0 +1,38 @@ +package svc + +import ( + "applet/app/db" + md "applet/app/md/member_center" + "applet/app/utils" + "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" +) + +func TagManagementGetList(page, limit string) ([]md.TagListNode, int64, error) { + sql := "SElECT count(distinct uid) as total, tag_id FROM `user_tag_records` GROUP BY tag_id" + results, err := db.QueryNativeString(db.Db, sql) + if err != nil { + return nil, 0, err + } + var countMap = map[int64]string{} + for _, res := range results { + countMap[utils.StrToInt64(res["tag_id"])] = res["total"] + } + + tagDb := implement.NewUserTagDb(db.Db) + tags, total, err := tagDb.UserTagAllByAscByPage(utils.StrToInt(page), utils.StrToInt(limit)) + if err != nil { + return nil, 0, err + } + + list := make([]md.TagListNode, len(*tags)) + for i, tag := range *tags { + list[i].Name = tag.TagName + list[i].Count = countMap[int64(tag.Id)] + list[i].CreateAt = tag.CreateAt + list[i].Memo = tag.Memo + list[i].TagID = utils.IntToStr(tag.Id) + list[i].IsPunish = tag.IsPunish + } + + return list, total, nil +} diff --git a/app/svc/member_center/svc_user_management.go b/app/svc/member_center/svc_user_management.go index e8976f7..b349dd4 100644 --- a/app/svc/member_center/svc_user_management.go +++ b/app/svc/member_center/svc_user_management.go @@ -6,14 +6,31 @@ import ( "applet/app/utils" "code.fnuoos.com/EggPlanet/egg_models.git/src/implement" "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + "fmt" "strings" "time" "xorm.io/xorm" ) -func UserManagementGetUsers(engine *xorm.Engine, req *md.UserManagementGetUserListReq) (*[]md.UserInfo, int64, error) { - users := make([]md.UserInfo, 0) - session := engine.Table("user").Alias("a").Distinct("a.id"). +func UserManagementGetUsers(req *md.UserManagementGetUserListReq) ([]*md.UserInfo, int64, error) { + users := make([]*md.UserInfo, 0) + pageSess := userManagementGetUsersBindQuery(db.Db, req) + countSess := userManagementGetUsersBindQuery(db.Db, req) + total, err := countSess.Distinct("a.id").Count(&md.UserInfo{}) + if err != nil { + fmt.Println(err.Error()) + return nil, 0, err + } + + err = pageSess.Distinct("a.*").Limit(req.Limit, (req.Page-1)*req.Limit).Asc("a.id").Find(&users) + if err != nil { + return nil, 0, err + } + return users, total, nil +} + +func userManagementGetUsersBindQuery(engine *xorm.Engine, req *md.UserManagementGetUserListReq) *xorm.Session { + session := engine.Table("user").Alias("a"). Join("LEFT OUTER", []string{"user", "b"}, "a.parent_uid = b.id"). Join("LEFT OUTER", "user_tag_records", "user_tag_records.uid = a.id") if req.ID != 0 { @@ -67,13 +84,8 @@ func UserManagementGetUsers(engine *xorm.Engine, req *md.UserManagementGetUserLi if req.LoginBefore != "" && req.LoginAfter != "" { session = session.Where("a.update_at > ? and a.update_at < ?", req.LoginBefore, req.LoginAfter) } - total, err := session.Limit(req.Limit, (req.Page-1)*req.Limit).Asc("a.id").FindAndCount(&users) - if err != nil { - return nil, 0, err - } - return &users, total, nil + return session } - func UserManagementUpdateUserInfo(engine *xorm.Engine, req *md.UserManagementUpdateUserInfoReq) (int64, error) { session := engine.NewSession() defer session.Close() diff --git a/app/svc/svc_role.go b/app/svc/svc_role.go index 79bafd1..87ad38f 100644 --- a/app/svc/svc_role.go +++ b/app/svc/svc_role.go @@ -101,7 +101,7 @@ func DeleteRole(c *gin.Context, roleId int) (err error) { return session.Commit() } -func RoleBindPermissionGroup(c *gin.Context, req md.RoleBindPermissionGroupReq) (err error) { +func RoleBindPermissionGroup(req md.RoleBindPermissionGroupReq) (err error) { engine := db.Db session := engine.NewSession() defer session.Close() @@ -194,3 +194,27 @@ func BindAdminRole(c *gin.Context, req md.BindAdminRoleReq) (err error) { return session.Commit() } + +func AdminDelete(admIds []int) (err error) { + engine := db.Db + session := engine.NewSession() + defer session.Close() + session.Begin() + //1、删除 `admin` + adminDb := implement.NewAdminDb(engine) + _, err = adminDb.AdminDeleteBySession(session, admIds) + if err != nil { + _ = session.Rollback() + return + } + + //2、删除 `admin_role` + adminRoleDb := implement.NewAdminRoleDb(engine) + _, err = adminRoleDb.AdminDeleteBySessionForAdmId(session, admIds) + if err != nil { + _ = session.Rollback() + return + } + + return session.Commit() +} diff --git a/docs/docs.go b/docs/docs.go index 9ee420c..a1f96bf 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,5 +1,4 @@ -// Code generated by swaggo/swag. DO NOT EDIT. - +// Package docs Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" @@ -1334,6 +1333,45 @@ const docTemplate = `{ } } }, + "/api/comm/getMenuList": { + "post": { + "description": "菜单栏列表(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限列表" + ], + "summary": "通用请求-权限列表-菜单栏列表(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "具体路由", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, "/api/comm/getOssUrl": { "post": { "description": "上传许可链接(获取)", @@ -1438,9 +1476,7 @@ const docTemplate = `{ "name": "req", "in": "body", "required": true, - "schema": { - "type": "object" - } + "schema": {} } ], "responses": { @@ -5521,147 +5557,6 @@ const docTemplate = `{ } } }, - "/api/memberCenter/certificate/del": { - "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.AdvertisingDelReq" - } - } - ], - "responses": { - "200": { - "description": "具体数据", - "schema": { - "type": "string" - } - }, - "400": { - "description": "具体错误", - "schema": { - "$ref": "#/definitions/md.Response" - } - } - } - } - }, - "/api/memberCenter/certificate/list": { - "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.AdvertisingListReq" - } - } - ], - "responses": { - "200": { - "description": "具体数据", - "schema": { - "$ref": "#/definitions/md.AdvertisingListResp" - } - }, - "400": { - "description": "具体错误", - "schema": { - "$ref": "#/definitions/md.Response" - } - } - } - } - }, - "/api/memberCenter/certificate/save": { - "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.AdvertisingSaveReq" - } - } - ], - "responses": { - "200": { - "description": "具体数据", - "schema": { - "type": "string" - } - }, - "400": { - "description": "具体错误", - "schema": { - "$ref": "#/definitions/md.Response" - } - } - } - } - }, "/api/memberCenter/levelManagement/addLevel": { "post": { "description": "等级管理(新增)", @@ -6515,9 +6410,9 @@ const docTemplate = `{ } } }, - "/api/notice/aliyunSms/push/list": { - "post": { - "description": "短信推送记录-推送记录列表", + "/api/notice/aliyunSms/getLevelList": { + "get": { + "description": "等级管理(获取)", "consumes": [ "application/json" ], @@ -6527,7 +6422,7 @@ const docTemplate = `{ "tags": [ "消息中心" ], - "summary": "消息中心-短信推送记录-推送记录列表", + "summary": "消息中心-短信推送记录-等级管理(获取)", "parameters": [ { "type": "string", @@ -6537,20 +6432,25 @@ const docTemplate = `{ "required": true }, { - "description": "(分页信息必填)", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.NoticeAliyunSmsListReq" - } + "type": "integer", + "description": "每页大小", + "name": "limit", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "页数", + "name": "page", + "in": "query", + "required": true } ], "responses": { "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.NoticePushListResp" + "$ref": "#/definitions/md.AliyunSmsGetLevelListResp" } }, "400": { @@ -6562,9 +6462,9 @@ const docTemplate = `{ } } }, - "/api/notice/aliyunSms/push/save": { - "post": { - "description": "短信推送记录-推送记录添加-发送 (不做编辑了)", + "/api/notice/aliyunSms/getTagList": { + "get": { + "description": "标签管理(获取)", "consumes": [ "application/json" ], @@ -6574,7 +6474,7 @@ const docTemplate = `{ "tags": [ "消息中心" ], - "summary": "消息中心-短信推送记录-推送记录添加-发送(不做编辑了)", + "summary": "消息中心-短信推送记录-标签管理(获取)", "parameters": [ { "type": "string", @@ -6584,20 +6484,25 @@ const docTemplate = `{ "required": true }, { - "description": "(分页信息必填)", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.NoticeAliyunSmsSaveReq" - } + "type": "integer", + "description": "每页大小", + "name": "limit", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "页数", + "name": "page", + "in": "query", + "required": true } ], "responses": { "200": { "description": "具体数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AliyunSmsGetTagListResp" } }, "400": { @@ -6609,9 +6514,9 @@ const docTemplate = `{ } } }, - "/api/notice/aliyunSms/sale/base": { - "get": { - "description": "短信推送记录-营销短信-通知模板", + "/api/notice/aliyunSms/getUserList": { + "post": { + "description": "获取用户信息", "consumes": [ "application/json" ], @@ -6621,7 +6526,7 @@ const docTemplate = `{ "tags": [ "消息中心" ], - "summary": "消息中心-短信推送记录-营销短信-通知模板", + "summary": "消息中心-短信推送记录-获取用户信息", "parameters": [ { "type": "string", @@ -6629,13 +6534,22 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "(分页信息必填)", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.JPushGetUserListReq" + } } ], "responses": { "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.NoticeAliyunSmsListResp" + "type": "Object" } }, "400": { @@ -6647,9 +6561,9 @@ const docTemplate = `{ } } }, - "/api/notice/aliyunSms/sale/save": { + "/api/notice/aliyunSms/push/list": { "post": { - "description": "短信推送记录-营销短信-通知模板添加编辑", + "description": "短信推送记录-推送记录列表", "consumes": [ "application/json" ], @@ -6659,7 +6573,7 @@ const docTemplate = `{ "tags": [ "消息中心" ], - "summary": "消息中心-短信推送记录-营销短信-通知模板添加编辑", + "summary": "消息中心-短信推送记录-推送记录列表", "parameters": [ { "type": "string", @@ -6669,12 +6583,12 @@ const docTemplate = `{ "required": true }, { - "description": "数组 把列表的数组传过来", + "description": "(分页信息必填)", "name": "req", "in": "body", "required": true, "schema": { - "type": "string" + "$ref": "#/definitions/md.NoticeAliyunSmsListReq" } } ], @@ -6682,7 +6596,7 @@ const docTemplate = `{ "200": { "description": "具体数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.NoticePushListResp" } }, "400": { @@ -6694,9 +6608,9 @@ const docTemplate = `{ } } }, - "/api/notice/base/del": { + "/api/notice/aliyunSms/push/save": { "post": { - "description": "基本配置-通知模板删除", + "description": "短信推送记录-推送记录添加-发送 (不做编辑了)", "consumes": [ "application/json" ], @@ -6706,7 +6620,7 @@ const docTemplate = `{ "tags": [ "消息中心" ], - "summary": "消息中心-基本配置-通知模板删除", + "summary": "消息中心-短信推送记录-推送记录添加-发送(不做编辑了)", "parameters": [ { "type": "string", @@ -6721,7 +6635,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticeDelReq" + "$ref": "#/definitions/md.NoticeAliyunSmsSaveReq" } } ], @@ -6741,8 +6655,140 @@ const docTemplate = `{ } } }, - "/api/notice/base/list": { - "post": { + "/api/notice/aliyunSms/sale/base": { + "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.NoticeAliyunSmsListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/aliyunSms/sale/save": { + "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": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/base/del": { + "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.NoticeDelReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/base/list": { + "post": { "description": "基本配置-通知模板", "consumes": [ "application/json" @@ -6751,9 +6797,666 @@ const docTemplate = `{ "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.NoticeListReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.NoticeListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/base/save": { + "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.NoticeSaveReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/jPush/getLevelList": { + "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": "每页大小", + "name": "limit", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "页数", + "name": "page", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.JPushGetLevelListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/jPush/getTagList": { + "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": "每页大小", + "name": "limit", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "页数", + "name": "page", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.JPushGetTagListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/jPush/getUserList": { + "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.JPushGetUserListReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "type": "Object" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/jPush/push/list": { + "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.NoticeListReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.NoticePushListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/jPush/push/save": { + "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.NoticePushSaveReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/addAdmin": { + "post": { + "description": "权限管理-新增管理员", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "新增管理员", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AddAdminReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/addRole": { + "post": { + "description": "权限管理-添加角色", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "添加角色", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AddRoleReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/adminInfo": { + "get": { + "description": "权限管理-管理员信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "管理员信息", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "type": "string", + "description": "管理员id", + "name": "adm_id", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体看返回内容", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/adminList": { + "post": { + "description": "权限管理-管理员列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "管理员列表", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AdminListReq" + } + } + ], + "responses": { + "200": { + "description": "具体看返回内容", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/bindAdminRole": { + "post": { + "description": "权限管理-管理员绑定角色", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "管理员绑定角色", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.BindAdminRoleReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/deleteAdmin/{$adm_id}": { + "delete": { + "description": "权限管理-删除管理员", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "删除管理员", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/deleteRole/{$id}": { + "delete": { + "description": "权限管理-删除角色", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "删除角色", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateRoleStateReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/permissionGroupList": { + "get": { + "description": "权限管理-权限组列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" ], - "summary": "消息中心-基本配置-通知模板", + "summary": "权限组列表", "parameters": [ { "type": "string", @@ -6763,20 +7466,65 @@ const docTemplate = `{ "required": true }, { - "description": "(分页信息必填)", - "name": "req", + "type": "string", + "description": "管理员id", + "name": "adm_id", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体看返回内容", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/roleBindPermissionGroup": { + "post": { + "description": "权限管理-角色绑定权限组", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "角色绑定权限组", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticeListReq" + "$ref": "#/definitions/md.RoleBindPermissionGroupReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", "schema": { - "$ref": "#/definitions/md.NoticeListResp" + "type": "string" } }, "400": { @@ -6788,9 +7536,47 @@ const docTemplate = `{ } } }, - "/api/notice/base/save": { + "/api/role/roleList": { + "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": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/updateAdmin": { "post": { - "description": "基本配置-通知模板添加编辑", + "description": "权限管理-修改管理员信息", "consumes": [ "application/json" ], @@ -6798,9 +7584,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "消息中心" + "权限管理" ], - "summary": "消息中心-基本配置-通知模板添加编辑", + "summary": "修改管理员信息", "parameters": [ { "type": "string", @@ -6810,18 +7596,18 @@ const docTemplate = `{ "required": true }, { - "description": "(分页信息必填)", - "name": "req", + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticeSaveReq" + "$ref": "#/definitions/md.UpdateAdminReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", "schema": { "type": "string" } @@ -6835,9 +7621,9 @@ const docTemplate = `{ } } }, - "/api/notice/jPush/push/list": { + "/api/role/updateAdminState": { "post": { - "description": "基本配置-推送记录列表", + "description": "权限管理-修改管理员状态", "consumes": [ "application/json" ], @@ -6845,9 +7631,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "消息中心" + "权限管理" ], - "summary": "消息中心-基本配置-推送记录列表", + "summary": "修改管理员状态", "parameters": [ { "type": "string", @@ -6857,20 +7643,20 @@ const docTemplate = `{ "required": true }, { - "description": "(分页信息必填)", - "name": "req", + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticeListReq" + "$ref": "#/definitions/md.UpdateAdminStateReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", "schema": { - "$ref": "#/definitions/md.NoticePushListResp" + "type": "string" } }, "400": { @@ -6882,9 +7668,9 @@ const docTemplate = `{ } } }, - "/api/notice/jPush/push/save": { + "/api/role/updateRole": { "post": { - "description": "基本配置-推送记录添加-发送 (不做编辑了)", + "description": "权限管理-修改角色", "consumes": [ "application/json" ], @@ -6892,9 +7678,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "消息中心" + "权限管理" ], - "summary": "消息中心-基本配置-推送记录添加-发送(不做编辑了)", + "summary": "修改角色", "parameters": [ { "type": "string", @@ -6904,18 +7690,65 @@ const docTemplate = `{ "required": true }, { - "description": "(分页信息必填)", - "name": "req", + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticePushSaveReq" + "$ref": "#/definitions/md.UpdateRoleReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/updateRoleState": { + "post": { + "description": "权限管理-修改角色状态", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "修改角色状态", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateRoleStateReq" + } + } + ], + "responses": { + "200": { + "description": "success", "schema": { "type": "string" } @@ -7654,54 +8487,7 @@ const docTemplate = `{ } } }, - "/api/website/certificate": { - "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.CertificateReq" - } - } - ], - "responses": { - "200": { - "description": "具体数据", - "schema": { - "$ref": "#/definitions/md.CertificateResp" - } - }, - "400": { - "description": "具体错误", - "schema": { - "$ref": "#/definitions/md.Response" - } - } - } - } - }, - "/api/website/getModuleSetting": { + "/api/v1/website/getModuleSetting": { "get": { "description": "页面样式", "consumes": [ @@ -7786,6 +8572,23 @@ const docTemplate = `{ } }, "definitions": { + "applet_app_md.Paginate": { + "type": "object", + "properties": { + "limit": { + "description": "每页大小", + "type": "integer" + }, + "page": { + "description": "页数", + "type": "integer" + }, + "total": { + "description": "总数据量", + "type": "integer" + } + } + }, "applet_app_md_financial_center.Paginate": { "type": "object", "properties": { @@ -8281,6 +9084,24 @@ const docTemplate = `{ } } }, + "md.AddAdminReq": { + "type": "object", + "required": [ + "password", + "username" + ], + "properties": { + "memo": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, "md.AddBlackListReq": { "type": "object", "properties": { @@ -8454,6 +9275,21 @@ const docTemplate = `{ } } }, + "md.AddRoleReq": { + "type": "object", + "required": [ + "memo", + "name" + ], + "properties": { + "memo": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, "md.AddTagReq": { "type": "object", "properties": { @@ -8461,12 +9297,29 @@ const docTemplate = `{ "description": "是否为处罚标签(0:否 1:是)", "type": "string" }, - "memo": { - "description": "备注", - "type": "string" + "memo": { + "description": "备注", + "type": "string" + }, + "name": { + "description": "标签名称", + "type": "string" + } + } + }, + "md.AdminListReq": { + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "page": { + "type": "integer" }, - "name": { - "description": "标签名称", + "state": { + "type": "integer" + }, + "username": { "type": "string" } } @@ -8728,6 +9581,34 @@ const docTemplate = `{ } } }, + "md.AliyunSmsGetLevelListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.LevelListNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md.Paginate" + } + } + }, + "md.AliyunSmsGetTagListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.TagListNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md.Paginate" + } + } + }, "md.ArticleCateDelReq": { "type": "object", "properties": { @@ -9089,53 +9970,20 @@ const docTemplate = `{ } } }, - "md.CertificateReq": { - "type": "object", - "properties": { - "no": { - "type": "string", - "example": "DD123" - } - } - }, - "md.CertificateResp": { + "md.BindAdminRoleReq": { "type": "object", + "required": [ + "adm_id" + ], "properties": { - "bg_img": { - "type": "string", - "example": "背景图" - }, - "end_time": { - "type": "string", - "example": "结束时间" - }, - "logo": { - "type": "string", - "example": "logo" - }, - "medal": { - "type": "string", - "example": "勋章" - }, - "name": { - "type": "string", - "example": "姓名" - }, - "name_icon": { - "type": "string", - "example": "蛋蛋星球文字图" - }, - "no": { - "type": "string", - "example": "编号" - }, - "seal": { - "type": "string", - "example": "印章" + "adm_id": { + "type": "integer" }, - "start_time": { - "type": "string", - "example": "开始时间" + "role_ids": { + "type": "array", + "items": { + "type": "integer" + } } } }, @@ -11385,6 +12233,125 @@ const docTemplate = `{ } } }, + "md.JPushGetLevelListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.LevelListNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md.Paginate" + } + } + }, + "md.JPushGetTagListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.TagListNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md.Paginate" + } + } + }, + "md.JPushGetUserListReq": { + "type": "object", + "properties": { + "effective": { + "description": "有效会员", + "type": "integer" + }, + "id": { + "description": "会员 ID", + "type": "integer" + }, + "invite_code": { + "type": "string", + "example": "会员邀请码" + }, + "is_real_name": { + "description": "是否实名 0.未实名,1.已实名", + "type": "integer" + }, + "level": { + "description": "会员等级", + "type": "integer" + }, + "limit": { + "type": "integer" + }, + "login_after": { + "description": "最近登录结束时间", + "type": "string" + }, + "login_before": { + "description": "最近登录开始时间", + "type": "string" + }, + "memo": { + "description": "备注", + "type": "string" + }, + "nickname": { + "type": "string", + "example": "会员昵称" + }, + "page": { + "type": "integer" + }, + "parent_invite_code": { + "type": "string", + "example": "上级邀请码" + }, + "parent_phone": { + "type": "string", + "example": "上级手机号" + }, + "phone": { + "type": "string", + "example": "会员手机号" + }, + "recommend_id": { + "description": "推荐人 ID", + "type": "integer" + }, + "register_after": { + "description": "注册时间终点", + "type": "string" + }, + "register_before": { + "description": "注册时间起点", + "type": "string" + }, + "register_type": { + "description": "注册类型(1:APP注册、2:H5注册)", + "type": "integer" + }, + "sex": { + "description": "性别(0:未知 1:男 2:女)", + "type": "integer" + }, + "state": { + "description": "状态", + "type": "integer" + }, + "tag": { + "description": "标签 id", + "type": "integer" + }, + "union_id": { + "type": "string", + "example": "微信号" + } + } + }, "md.LevelListNode": { "type": "object", "properties": { @@ -12520,6 +13487,23 @@ const docTemplate = `{ } } }, + "md.RoleBindPermissionGroupReq": { + "type": "object", + "required": [ + "role_id" + ], + "properties": { + "permission_ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "role_id": { + "type": "integer" + } + } + }, "md.SelectData": { "type": "object", "properties": { @@ -12941,6 +13925,43 @@ const docTemplate = `{ } } }, + "md.UpdateAdminReq": { + "type": "object", + "required": [ + "adm_id", + "password", + "username" + ], + "properties": { + "adm_id": { + "type": "integer" + }, + "memo": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "md.UpdateAdminStateReq": { + "type": "object", + "required": [ + "adm_id", + "state" + ], + "properties": { + "adm_id": { + "type": "integer" + }, + "state": { + "type": "integer" + } + } + }, "md.UpdateContributionValueBasicSettingReq": { "type": "object", "properties": { @@ -13209,9 +14230,47 @@ const docTemplate = `{ } } }, + "md.UpdateRoleReq": { + "type": "object", + "required": [ + "memo", + "name", + "role_id" + ], + "properties": { + "memo": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role_id": { + "type": "integer" + } + } + }, + "md.UpdateRoleStateReq": { + "type": "object", + "required": [ + "role_id", + "state" + ], + "properties": { + "role_id": { + "type": "integer" + }, + "state": { + "type": "integer" + } + } + }, "md.UpdateTagReq": { "type": "object", "properties": { + "is_punish": { + "description": "是否是惩罚标签", + "type": "string" + }, "memo": { "description": "备注", "type": "string" @@ -14847,6 +15906,8 @@ var SwaggerInfo = &swag.Spec{ Description: "管理后台接口文档", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, + LeftDelim: "{{", + RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index f1b6de9..7a3e0b4 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1326,6 +1326,45 @@ } } }, + "/api/comm/getMenuList": { + "post": { + "description": "菜单栏列表(获取)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限列表" + ], + "summary": "通用请求-权限列表-菜单栏列表(获取)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "具体路由", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, "/api/comm/getOssUrl": { "post": { "description": "上传许可链接(获取)", @@ -1430,9 +1469,7 @@ "name": "req", "in": "body", "required": true, - "schema": { - "type": "object" - } + "schema": {} } ], "responses": { @@ -5513,147 +5550,6 @@ } } }, - "/api/memberCenter/certificate/del": { - "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.AdvertisingDelReq" - } - } - ], - "responses": { - "200": { - "description": "具体数据", - "schema": { - "type": "string" - } - }, - "400": { - "description": "具体错误", - "schema": { - "$ref": "#/definitions/md.Response" - } - } - } - } - }, - "/api/memberCenter/certificate/list": { - "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.AdvertisingListReq" - } - } - ], - "responses": { - "200": { - "description": "具体数据", - "schema": { - "$ref": "#/definitions/md.AdvertisingListResp" - } - }, - "400": { - "description": "具体错误", - "schema": { - "$ref": "#/definitions/md.Response" - } - } - } - } - }, - "/api/memberCenter/certificate/save": { - "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.AdvertisingSaveReq" - } - } - ], - "responses": { - "200": { - "description": "具体数据", - "schema": { - "type": "string" - } - }, - "400": { - "description": "具体错误", - "schema": { - "$ref": "#/definitions/md.Response" - } - } - } - } - }, "/api/memberCenter/levelManagement/addLevel": { "post": { "description": "等级管理(新增)", @@ -6507,9 +6403,9 @@ } } }, - "/api/notice/aliyunSms/push/list": { - "post": { - "description": "短信推送记录-推送记录列表", + "/api/notice/aliyunSms/getLevelList": { + "get": { + "description": "等级管理(获取)", "consumes": [ "application/json" ], @@ -6519,7 +6415,7 @@ "tags": [ "消息中心" ], - "summary": "消息中心-短信推送记录-推送记录列表", + "summary": "消息中心-短信推送记录-等级管理(获取)", "parameters": [ { "type": "string", @@ -6529,20 +6425,25 @@ "required": true }, { - "description": "(分页信息必填)", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.NoticeAliyunSmsListReq" - } + "type": "integer", + "description": "每页大小", + "name": "limit", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "页数", + "name": "page", + "in": "query", + "required": true } ], "responses": { "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.NoticePushListResp" + "$ref": "#/definitions/md.AliyunSmsGetLevelListResp" } }, "400": { @@ -6554,9 +6455,9 @@ } } }, - "/api/notice/aliyunSms/push/save": { - "post": { - "description": "短信推送记录-推送记录添加-发送 (不做编辑了)", + "/api/notice/aliyunSms/getTagList": { + "get": { + "description": "标签管理(获取)", "consumes": [ "application/json" ], @@ -6566,7 +6467,7 @@ "tags": [ "消息中心" ], - "summary": "消息中心-短信推送记录-推送记录添加-发送(不做编辑了)", + "summary": "消息中心-短信推送记录-标签管理(获取)", "parameters": [ { "type": "string", @@ -6576,20 +6477,25 @@ "required": true }, { - "description": "(分页信息必填)", - "name": "req", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/md.NoticeAliyunSmsSaveReq" - } + "type": "integer", + "description": "每页大小", + "name": "limit", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "页数", + "name": "page", + "in": "query", + "required": true } ], "responses": { "200": { "description": "具体数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AliyunSmsGetTagListResp" } }, "400": { @@ -6601,9 +6507,9 @@ } } }, - "/api/notice/aliyunSms/sale/base": { - "get": { - "description": "短信推送记录-营销短信-通知模板", + "/api/notice/aliyunSms/getUserList": { + "post": { + "description": "获取用户信息", "consumes": [ "application/json" ], @@ -6613,7 +6519,7 @@ "tags": [ "消息中心" ], - "summary": "消息中心-短信推送记录-营销短信-通知模板", + "summary": "消息中心-短信推送记录-获取用户信息", "parameters": [ { "type": "string", @@ -6621,13 +6527,22 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "(分页信息必填)", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.JPushGetUserListReq" + } } ], "responses": { "200": { "description": "具体数据", "schema": { - "$ref": "#/definitions/md.NoticeAliyunSmsListResp" + "type": "Object" } }, "400": { @@ -6639,9 +6554,9 @@ } } }, - "/api/notice/aliyunSms/sale/save": { + "/api/notice/aliyunSms/push/list": { "post": { - "description": "短信推送记录-营销短信-通知模板添加编辑", + "description": "短信推送记录-推送记录列表", "consumes": [ "application/json" ], @@ -6651,7 +6566,7 @@ "tags": [ "消息中心" ], - "summary": "消息中心-短信推送记录-营销短信-通知模板添加编辑", + "summary": "消息中心-短信推送记录-推送记录列表", "parameters": [ { "type": "string", @@ -6661,12 +6576,12 @@ "required": true }, { - "description": "数组 把列表的数组传过来", + "description": "(分页信息必填)", "name": "req", "in": "body", "required": true, "schema": { - "type": "string" + "$ref": "#/definitions/md.NoticeAliyunSmsListReq" } } ], @@ -6674,7 +6589,7 @@ "200": { "description": "具体数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.NoticePushListResp" } }, "400": { @@ -6686,9 +6601,9 @@ } } }, - "/api/notice/base/del": { + "/api/notice/aliyunSms/push/save": { "post": { - "description": "基本配置-通知模板删除", + "description": "短信推送记录-推送记录添加-发送 (不做编辑了)", "consumes": [ "application/json" ], @@ -6698,7 +6613,7 @@ "tags": [ "消息中心" ], - "summary": "消息中心-基本配置-通知模板删除", + "summary": "消息中心-短信推送记录-推送记录添加-发送(不做编辑了)", "parameters": [ { "type": "string", @@ -6713,7 +6628,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticeDelReq" + "$ref": "#/definitions/md.NoticeAliyunSmsSaveReq" } } ], @@ -6733,9 +6648,798 @@ } } }, - "/api/notice/base/list": { - "post": { - "description": "基本配置-通知模板", + "/api/notice/aliyunSms/sale/base": { + "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.NoticeAliyunSmsListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/aliyunSms/sale/save": { + "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": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/base/del": { + "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.NoticeDelReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/base/list": { + "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.NoticeListReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.NoticeListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/base/save": { + "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.NoticeSaveReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/jPush/getLevelList": { + "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": "每页大小", + "name": "limit", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "页数", + "name": "page", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.JPushGetLevelListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/jPush/getTagList": { + "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": "每页大小", + "name": "limit", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "页数", + "name": "page", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.JPushGetTagListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/jPush/getUserList": { + "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.JPushGetUserListReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "type": "Object" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/jPush/push/list": { + "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.NoticeListReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "$ref": "#/definitions/md.NoticePushListResp" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/notice/jPush/push/save": { + "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.NoticePushSaveReq" + } + } + ], + "responses": { + "200": { + "description": "具体数据", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/addAdmin": { + "post": { + "description": "权限管理-新增管理员", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "新增管理员", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AddAdminReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/addRole": { + "post": { + "description": "权限管理-添加角色", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "添加角色", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AddRoleReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/adminInfo": { + "get": { + "description": "权限管理-管理员信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "管理员信息", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "type": "string", + "description": "管理员id", + "name": "adm_id", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体看返回内容", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/adminList": { + "post": { + "description": "权限管理-管理员列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "管理员列表", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AdminListReq" + } + } + ], + "responses": { + "200": { + "description": "具体看返回内容", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/bindAdminRole": { + "post": { + "description": "权限管理-管理员绑定角色", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "管理员绑定角色", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.BindAdminRoleReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/deleteAdmin/{$adm_id}": { + "delete": { + "description": "权限管理-删除管理员", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "删除管理员", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/deleteRole/{$id}": { + "delete": { + "description": "权限管理-删除角色", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "删除角色", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateRoleStateReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/permissionGroupList": { + "get": { + "description": "权限管理-权限组列表", "consumes": [ "application/json" ], @@ -6743,9 +7447,9 @@ "application/json" ], "tags": [ - "消息中心" + "权限管理" ], - "summary": "消息中心-基本配置-通知模板", + "summary": "权限组列表", "parameters": [ { "type": "string", @@ -6755,20 +7459,65 @@ "required": true }, { - "description": "(分页信息必填)", - "name": "req", + "type": "string", + "description": "管理员id", + "name": "adm_id", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "具体看返回内容", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/roleBindPermissionGroup": { + "post": { + "description": "权限管理-角色绑定权限组", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "角色绑定权限组", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticeListReq" + "$ref": "#/definitions/md.RoleBindPermissionGroupReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", "schema": { - "$ref": "#/definitions/md.NoticeListResp" + "type": "string" } }, "400": { @@ -6780,9 +7529,47 @@ } } }, - "/api/notice/base/save": { + "/api/role/roleList": { + "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": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/updateAdmin": { "post": { - "description": "基本配置-通知模板添加编辑", + "description": "权限管理-修改管理员信息", "consumes": [ "application/json" ], @@ -6790,9 +7577,9 @@ "application/json" ], "tags": [ - "消息中心" + "权限管理" ], - "summary": "消息中心-基本配置-通知模板添加编辑", + "summary": "修改管理员信息", "parameters": [ { "type": "string", @@ -6802,18 +7589,18 @@ "required": true }, { - "description": "(分页信息必填)", - "name": "req", + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticeSaveReq" + "$ref": "#/definitions/md.UpdateAdminReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", "schema": { "type": "string" } @@ -6827,9 +7614,9 @@ } } }, - "/api/notice/jPush/push/list": { + "/api/role/updateAdminState": { "post": { - "description": "基本配置-推送记录列表", + "description": "权限管理-修改管理员状态", "consumes": [ "application/json" ], @@ -6837,9 +7624,9 @@ "application/json" ], "tags": [ - "消息中心" + "权限管理" ], - "summary": "消息中心-基本配置-推送记录列表", + "summary": "修改管理员状态", "parameters": [ { "type": "string", @@ -6849,20 +7636,20 @@ "required": true }, { - "description": "(分页信息必填)", - "name": "req", + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticeListReq" + "$ref": "#/definitions/md.UpdateAdminStateReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", "schema": { - "$ref": "#/definitions/md.NoticePushListResp" + "type": "string" } }, "400": { @@ -6874,9 +7661,9 @@ } } }, - "/api/notice/jPush/push/save": { + "/api/role/updateRole": { "post": { - "description": "基本配置-推送记录添加-发送 (不做编辑了)", + "description": "权限管理-修改角色", "consumes": [ "application/json" ], @@ -6884,9 +7671,9 @@ "application/json" ], "tags": [ - "消息中心" + "权限管理" ], - "summary": "消息中心-基本配置-推送记录添加-发送(不做编辑了)", + "summary": "修改角色", "parameters": [ { "type": "string", @@ -6896,18 +7683,65 @@ "required": true }, { - "description": "(分页信息必填)", - "name": "req", + "description": "请求参数", + "name": "args", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.NoticePushSaveReq" + "$ref": "#/definitions/md.UpdateRoleReq" } } ], "responses": { "200": { - "description": "具体数据", + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/updateRoleState": { + "post": { + "description": "权限管理-修改角色状态", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "权限管理" + ], + "summary": "修改角色状态", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.UpdateRoleStateReq" + } + } + ], + "responses": { + "200": { + "description": "success", "schema": { "type": "string" } @@ -7646,54 +8480,7 @@ } } }, - "/api/website/certificate": { - "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.CertificateReq" - } - } - ], - "responses": { - "200": { - "description": "具体数据", - "schema": { - "$ref": "#/definitions/md.CertificateResp" - } - }, - "400": { - "description": "具体错误", - "schema": { - "$ref": "#/definitions/md.Response" - } - } - } - } - }, - "/api/website/getModuleSetting": { + "/api/v1/website/getModuleSetting": { "get": { "description": "页面样式", "consumes": [ @@ -7778,6 +8565,23 @@ } }, "definitions": { + "applet_app_md.Paginate": { + "type": "object", + "properties": { + "limit": { + "description": "每页大小", + "type": "integer" + }, + "page": { + "description": "页数", + "type": "integer" + }, + "total": { + "description": "总数据量", + "type": "integer" + } + } + }, "applet_app_md_financial_center.Paginate": { "type": "object", "properties": { @@ -8273,6 +9077,24 @@ } } }, + "md.AddAdminReq": { + "type": "object", + "required": [ + "password", + "username" + ], + "properties": { + "memo": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, "md.AddBlackListReq": { "type": "object", "properties": { @@ -8446,6 +9268,21 @@ } } }, + "md.AddRoleReq": { + "type": "object", + "required": [ + "memo", + "name" + ], + "properties": { + "memo": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, "md.AddTagReq": { "type": "object", "properties": { @@ -8453,12 +9290,29 @@ "description": "是否为处罚标签(0:否 1:是)", "type": "string" }, - "memo": { - "description": "备注", - "type": "string" + "memo": { + "description": "备注", + "type": "string" + }, + "name": { + "description": "标签名称", + "type": "string" + } + } + }, + "md.AdminListReq": { + "type": "object", + "properties": { + "limit": { + "type": "integer" + }, + "page": { + "type": "integer" }, - "name": { - "description": "标签名称", + "state": { + "type": "integer" + }, + "username": { "type": "string" } } @@ -8720,6 +9574,34 @@ } } }, + "md.AliyunSmsGetLevelListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.LevelListNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md.Paginate" + } + } + }, + "md.AliyunSmsGetTagListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.TagListNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md.Paginate" + } + } + }, "md.ArticleCateDelReq": { "type": "object", "properties": { @@ -9081,53 +9963,20 @@ } } }, - "md.CertificateReq": { - "type": "object", - "properties": { - "no": { - "type": "string", - "example": "DD123" - } - } - }, - "md.CertificateResp": { + "md.BindAdminRoleReq": { "type": "object", + "required": [ + "adm_id" + ], "properties": { - "bg_img": { - "type": "string", - "example": "背景图" - }, - "end_time": { - "type": "string", - "example": "结束时间" - }, - "logo": { - "type": "string", - "example": "logo" - }, - "medal": { - "type": "string", - "example": "勋章" - }, - "name": { - "type": "string", - "example": "姓名" - }, - "name_icon": { - "type": "string", - "example": "蛋蛋星球文字图" - }, - "no": { - "type": "string", - "example": "编号" - }, - "seal": { - "type": "string", - "example": "印章" + "adm_id": { + "type": "integer" }, - "start_time": { - "type": "string", - "example": "开始时间" + "role_ids": { + "type": "array", + "items": { + "type": "integer" + } } } }, @@ -11377,6 +12226,125 @@ } } }, + "md.JPushGetLevelListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.LevelListNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md.Paginate" + } + } + }, + "md.JPushGetTagListResp": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/md.TagListNode" + } + }, + "paginate": { + "$ref": "#/definitions/applet_app_md.Paginate" + } + } + }, + "md.JPushGetUserListReq": { + "type": "object", + "properties": { + "effective": { + "description": "有效会员", + "type": "integer" + }, + "id": { + "description": "会员 ID", + "type": "integer" + }, + "invite_code": { + "type": "string", + "example": "会员邀请码" + }, + "is_real_name": { + "description": "是否实名 0.未实名,1.已实名", + "type": "integer" + }, + "level": { + "description": "会员等级", + "type": "integer" + }, + "limit": { + "type": "integer" + }, + "login_after": { + "description": "最近登录结束时间", + "type": "string" + }, + "login_before": { + "description": "最近登录开始时间", + "type": "string" + }, + "memo": { + "description": "备注", + "type": "string" + }, + "nickname": { + "type": "string", + "example": "会员昵称" + }, + "page": { + "type": "integer" + }, + "parent_invite_code": { + "type": "string", + "example": "上级邀请码" + }, + "parent_phone": { + "type": "string", + "example": "上级手机号" + }, + "phone": { + "type": "string", + "example": "会员手机号" + }, + "recommend_id": { + "description": "推荐人 ID", + "type": "integer" + }, + "register_after": { + "description": "注册时间终点", + "type": "string" + }, + "register_before": { + "description": "注册时间起点", + "type": "string" + }, + "register_type": { + "description": "注册类型(1:APP注册、2:H5注册)", + "type": "integer" + }, + "sex": { + "description": "性别(0:未知 1:男 2:女)", + "type": "integer" + }, + "state": { + "description": "状态", + "type": "integer" + }, + "tag": { + "description": "标签 id", + "type": "integer" + }, + "union_id": { + "type": "string", + "example": "微信号" + } + } + }, "md.LevelListNode": { "type": "object", "properties": { @@ -12512,6 +13480,23 @@ } } }, + "md.RoleBindPermissionGroupReq": { + "type": "object", + "required": [ + "role_id" + ], + "properties": { + "permission_ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "role_id": { + "type": "integer" + } + } + }, "md.SelectData": { "type": "object", "properties": { @@ -12933,6 +13918,43 @@ } } }, + "md.UpdateAdminReq": { + "type": "object", + "required": [ + "adm_id", + "password", + "username" + ], + "properties": { + "adm_id": { + "type": "integer" + }, + "memo": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "md.UpdateAdminStateReq": { + "type": "object", + "required": [ + "adm_id", + "state" + ], + "properties": { + "adm_id": { + "type": "integer" + }, + "state": { + "type": "integer" + } + } + }, "md.UpdateContributionValueBasicSettingReq": { "type": "object", "properties": { @@ -13201,9 +14223,47 @@ } } }, + "md.UpdateRoleReq": { + "type": "object", + "required": [ + "memo", + "name", + "role_id" + ], + "properties": { + "memo": { + "type": "string" + }, + "name": { + "type": "string" + }, + "role_id": { + "type": "integer" + } + } + }, + "md.UpdateRoleStateReq": { + "type": "object", + "required": [ + "role_id", + "state" + ], + "properties": { + "role_id": { + "type": "integer" + }, + "state": { + "type": "integer" + } + } + }, "md.UpdateTagReq": { "type": "object", "properties": { + "is_punish": { + "description": "是否是惩罚标签", + "type": "string" + }, "memo": { "description": "备注", "type": "string" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 5d260a1..e56a533 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,4 +1,16 @@ definitions: + applet_app_md.Paginate: + properties: + limit: + description: 每页大小 + type: integer + page: + description: 页数 + type: integer + total: + description: 总数据量 + type: integer + type: object applet_app_md_financial_center.Paginate: properties: limit: @@ -349,6 +361,18 @@ definitions: example: 手机号 type: string type: object + md.AddAdminReq: + properties: + memo: + type: string + password: + type: string + username: + type: string + required: + - password + - username + type: object md.AddBlackListReq: properties: memo: @@ -472,6 +496,16 @@ definitions: description: 金额 type: string type: object + md.AddRoleReq: + properties: + memo: + type: string + name: + type: string + required: + - memo + - name + type: object md.AddTagReq: properties: is_punish: @@ -484,6 +518,17 @@ definitions: description: 标签名称 type: string type: object + md.AdminListReq: + properties: + limit: + type: integer + page: + type: integer + state: + type: integer + username: + type: string + type: object md.AdvertisingBase: properties: android_ad_is_open: @@ -660,6 +705,24 @@ definitions: example: 名称 type: string type: object + md.AliyunSmsGetLevelListResp: + properties: + list: + items: + $ref: '#/definitions/md.LevelListNode' + type: array + paginate: + $ref: '#/definitions/applet_app_md.Paginate' + type: object + md.AliyunSmsGetTagListResp: + properties: + list: + items: + $ref: '#/definitions/md.TagListNode' + type: array + paginate: + $ref: '#/definitions/applet_app_md.Paginate' + type: object md.ArticleCateDelReq: properties: id: @@ -910,41 +973,16 @@ definitions: description: 发送模式(1:所有用户 2:指定用户) type: integer type: object - md.CertificateReq: - properties: - "no": - example: DD123 - type: string - type: object - md.CertificateResp: + md.BindAdminRoleReq: properties: - bg_img: - example: 背景图 - type: string - end_time: - example: 结束时间 - type: string - logo: - example: logo - type: string - medal: - example: 勋章 - type: string - name: - example: 姓名 - type: string - name_icon: - example: 蛋蛋星球文字图 - type: string - "no": - example: 编号 - type: string - seal: - example: 印章 - type: string - start_time: - example: 开始时间 - type: string + adm_id: + type: integer + role_ids: + items: + type: integer + type: array + required: + - adm_id type: object md.CloudBundleBaseResp: properties: @@ -2493,6 +2531,91 @@ definitions: content_image_url: type: string type: object + md.JPushGetLevelListResp: + properties: + list: + items: + $ref: '#/definitions/md.LevelListNode' + type: array + paginate: + $ref: '#/definitions/applet_app_md.Paginate' + type: object + md.JPushGetTagListResp: + properties: + list: + items: + $ref: '#/definitions/md.TagListNode' + type: array + paginate: + $ref: '#/definitions/applet_app_md.Paginate' + type: object + md.JPushGetUserListReq: + properties: + effective: + description: 有效会员 + type: integer + id: + description: 会员 ID + type: integer + invite_code: + example: 会员邀请码 + type: string + is_real_name: + description: 是否实名 0.未实名,1.已实名 + type: integer + level: + description: 会员等级 + type: integer + limit: + type: integer + login_after: + description: 最近登录结束时间 + type: string + login_before: + description: 最近登录开始时间 + type: string + memo: + description: 备注 + type: string + nickname: + example: 会员昵称 + type: string + page: + type: integer + parent_invite_code: + example: 上级邀请码 + type: string + parent_phone: + example: 上级手机号 + type: string + phone: + example: 会员手机号 + type: string + recommend_id: + description: 推荐人 ID + type: integer + register_after: + description: 注册时间终点 + type: string + register_before: + description: 注册时间起点 + type: string + register_type: + description: 注册类型(1:APP注册、2:H5注册) + type: integer + sex: + description: 性别(0:未知 1:男 2:女) + type: integer + state: + description: 状态 + type: integer + tag: + description: 标签 id + type: integer + union_id: + example: 微信号 + type: string + type: object md.LevelListNode: properties: count: @@ -3295,6 +3418,17 @@ definitions: description: 奖励值 type: string type: object + md.RoleBindPermissionGroupReq: + properties: + permission_ids: + items: + type: integer + type: array + role_id: + type: integer + required: + - role_id + type: object md.SelectData: properties: direction: @@ -3589,6 +3723,31 @@ definitions: uid: type: integer type: object + md.UpdateAdminReq: + properties: + adm_id: + type: integer + memo: + type: string + password: + type: string + username: + type: string + required: + - adm_id + - password + - username + type: object + md.UpdateAdminStateReq: + properties: + adm_id: + type: integer + state: + type: integer + required: + - adm_id + - state + type: object md.UpdateContributionValueBasicSettingReq: properties: hand_out_red_package: @@ -3768,8 +3927,34 @@ definitions: description: xx天未活跃,处罚滑落 type: integer type: object + md.UpdateRoleReq: + properties: + memo: + type: string + name: + type: string + role_id: + type: integer + required: + - memo + - name + - role_id + type: object + md.UpdateRoleStateReq: + properties: + role_id: + type: integer + state: + type: integer + required: + - role_id + - state + type: object md.UpdateTagReq: properties: + is_punish: + description: 是否是惩罚标签 + type: string memo: description: 备注 type: string @@ -5762,6 +5947,32 @@ paths: summary: 通用请求-获取管理员信息 tags: - 通用请求 + /api/comm/getMenuList: + post: + consumes: + - application/json + description: 菜单栏列表(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 具体路由 + schema: + additionalProperties: true + type: object + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 通用请求-权限列表-菜单栏列表(获取) + tags: + - 权限列表 /api/comm/getOssUrl: post: consumes: @@ -5828,8 +6039,7 @@ paths: in: body name: req required: true - schema: - type: object + schema: {} produces: - application/json responses: @@ -8525,190 +8735,97 @@ paths: summary: 制度中心-营销应用-新人红包设置(修改) tags: - 营销应用 - /api/memberCenter/certificate/del: + /api/memberCenter/levelManagement/addLevel: post: consumes: - application/json - description: 会员中心-证书管理-删除 + description: 等级管理(新增) parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: (分页信息必填) + - description: 需要新增的等级信息 in: body name: req required: true schema: - $ref: '#/definitions/md.AdvertisingDelReq' + $ref: '#/definitions/md.AddLevelReq' produces: - application/json responses: "200": - description: 具体数据 + description: 新增等级ID schema: - type: string + type: int "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 会员中心-证书管理-删除 + summary: 制度中心-会员中心-等级管理(新增) tags: - 会员中心 - /api/memberCenter/certificate/list: - post: + /api/memberCenter/levelManagement/deleteLevel: + delete: consumes: - application/json - description: 会员中心-证书管理 + description: 等级管理(删除) parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: (分页信息必填) + - description: 需要删除的等级 ID in: body name: req required: true schema: - $ref: '#/definitions/md.AdvertisingListReq' + $ref: '#/definitions/md.DeleteLevelReq' produces: - application/json responses: "200": - description: 具体数据 + description: 成功删除数据数量 schema: - $ref: '#/definitions/md.AdvertisingListResp' + type: int "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 会员中心-证书管理 + summary: 制度中心-会员中心-等级管理(删除) tags: - 会员中心 - /api/memberCenter/certificate/save: - post: + /api/memberCenter/levelManagement/deleteLevelTask: + delete: consumes: - application/json - description: 会员中心-证书管理-保存 + description: 等级任务(删除) parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: (分页信息必填) + - description: 需要删除的等级任务ID in: body name: req required: true schema: - $ref: '#/definitions/md.AdvertisingSaveReq' + $ref: '#/definitions/md.DeleteTaskReq' produces: - application/json responses: "200": - description: 具体数据 + description: 成功删除数据数量 schema: - type: string + type: int "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 会员中心-证书管理-保存 - tags: - - 会员中心 - /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/deleteLevel: - 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.DeleteLevelReq' - produces: - - application/json - responses: - "200": - description: 成功删除数据数量 - schema: - type: int - "400": - description: 具体错误 - schema: - $ref: '#/definitions/md.Response' - 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: 制度中心-会员中心-等级管理-等级任务(删除) + summary: 制度中心-会员中心-等级管理-等级任务(删除) tags: - 会员中心 /api/memberCenter/levelManagement/getLevelList: @@ -9012,454 +9129,1076 @@ paths: "200": description: 具体数据 schema: - $ref: '#/definitions/md.UserManagementGetFansResp' + $ref: '#/definitions/md.UserManagementGetFansResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-会员中心-用户管理-会员明细粉丝情况(获取) + tags: + - 会员中心 + /api/memberCenter/userManagement/getUserList: + post: + consumes: + - application/json + description: 用户信息管理(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 分页信息必填 + in: body + name: req + required: true + schema: + $ref: '#/definitions/md.UserManagementGetUserListReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.UserManagementGetUserListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-会员中心-用户管理-用户信息管理(获取) + tags: + - 会员中心 + /api/memberCenter/userManagement/getVirtualCoinDetail: + get: + consumes: + - application/json + description: 会员明细(积分明细获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 用户 ID + in: query + name: uid + required: true + type: string + - description: 货币 ID + in: query + name: coinId + required: true + type: string + - description: 每页大小 + in: query + name: limit + required: true + type: string + - description: 页数 + in: query + name: page + required: true + type: string + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.UserManagementGetVirtualCoinDetailResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-会员中心-用户管理-会员明细(积分明细获取) + tags: + - 会员中心 + /api/memberCenter/userManagement/updateUserInfo: + 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.UserManagementUpdateUserInfoReq' + produces: + - application/json + responses: + "200": + description: 修改数据行数 + schema: + type: int + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-会员中心-用户管理-用户信息管理(更新) + tags: + - 会员中心 + /api/memberCenter/userManagement/userData: + get: + consumes: + - application/json + description: 会员明细概况(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 用户 ID + in: query + name: uid + required: true + type: string + produces: + - application/json + responses: + "200": + description: 会员明细概况具体数据 + schema: + $ref: '#/definitions/md.UserManagementGetOneBasicResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-会员中心-用户管理-会员明细概况(获取) + tags: + - 会员中心 + /api/notice/aliyunSms/file/phone: + post: + consumes: + - application/json + description: 短信推送记录-通知模板 + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 参数 file-----文件上传格式 + in: formData + name: file + required: true + type: string + produces: + - application/json + responses: + "200": + description: phone 一个数组 + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-短信推送记录-通知模板 + tags: + - 消息中心 + /api/notice/aliyunSms/getLevelList: + get: + consumes: + - application/json + description: 等级管理(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 每页大小 + in: query + name: limit + required: true + type: integer + - description: 页数 + in: query + name: page + required: true + type: integer + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.AliyunSmsGetLevelListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-短信推送记录-等级管理(获取) + tags: + - 消息中心 + /api/notice/aliyunSms/getTagList: + get: + consumes: + - application/json + description: 标签管理(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 每页大小 + in: query + name: limit + required: true + type: integer + - description: 页数 + in: query + name: page + required: true + type: integer + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.AliyunSmsGetTagListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-短信推送记录-标签管理(获取) + tags: + - 消息中心 + /api/notice/aliyunSms/getUserList: + 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.JPushGetUserListReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + type: Object + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-短信推送记录-获取用户信息 + tags: + - 消息中心 + /api/notice/aliyunSms/push/list: + 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.NoticeAliyunSmsListReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.NoticePushListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-短信推送记录-推送记录列表 + tags: + - 消息中心 + /api/notice/aliyunSms/push/save: + 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.NoticeAliyunSmsSaveReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-短信推送记录-推送记录添加-发送(不做编辑了) + tags: + - 消息中心 + /api/notice/aliyunSms/sale/base: + 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.NoticeAliyunSmsListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-短信推送记录-营销短信-通知模板 + tags: + - 消息中心 + /api/notice/aliyunSms/sale/save: + 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: + type: string + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-短信推送记录-营销短信-通知模板添加编辑 + tags: + - 消息中心 + /api/notice/base/del: + 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.NoticeDelReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-基本配置-通知模板删除 + tags: + - 消息中心 + /api/notice/base/list: + 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.NoticeListReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.NoticeListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-基本配置-通知模板 + tags: + - 消息中心 + /api/notice/base/save: + 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.NoticeSaveReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-基本配置-通知模板添加编辑 + tags: + - 消息中心 + /api/notice/jPush/getLevelList: + get: + consumes: + - application/json + description: 等级管理(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 每页大小 + in: query + name: limit + required: true + type: integer + - description: 页数 + in: query + name: page + required: true + type: integer + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.JPushGetLevelListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-基本配置-等级管理(获取) + tags: + - 消息中心 + /api/notice/jPush/getTagList: + get: + consumes: + - application/json + description: 标签管理(获取) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 每页大小 + in: query + name: limit + required: true + type: integer + - description: 页数 + in: query + name: page + required: true + type: integer + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + $ref: '#/definitions/md.JPushGetTagListResp' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-基本配置-标签管理(获取) + tags: + - 消息中心 + /api/notice/jPush/getUserList: + 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.JPushGetUserListReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + type: Object "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 制度中心-会员中心-用户管理-会员明细粉丝情况(获取) + summary: 消息中心-基本配置-获取用户信息 tags: - - 会员中心 - /api/memberCenter/userManagement/getUserList: + - 消息中心 + /api/notice/jPush/push/list: post: consumes: - application/json - description: 用户信息管理(获取) + description: 基本配置-推送记录列表 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: 分页信息必填 + - description: (分页信息必填) in: body name: req required: true schema: - $ref: '#/definitions/md.UserManagementGetUserListReq' + $ref: '#/definitions/md.NoticeListReq' produces: - application/json responses: "200": description: 具体数据 schema: - $ref: '#/definitions/md.UserManagementGetUserListResp' + $ref: '#/definitions/md.NoticePushListResp' "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 制度中心-会员中心-用户管理-用户信息管理(获取) + summary: 消息中心-基本配置-推送记录列表 tags: - - 会员中心 - /api/memberCenter/userManagement/getVirtualCoinDetail: - get: + - 消息中心 + /api/notice/jPush/push/save: + post: consumes: - application/json - description: 会员明细(积分明细获取) + description: 基本配置-推送记录添加-发送 (不做编辑了) parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: 用户 ID - in: query - name: uid - required: true - type: string - - description: 货币 ID - in: query - name: coinId + - description: (分页信息必填) + in: body + name: req required: true - type: string - - description: 每页大小 - in: query - name: limit + schema: + $ref: '#/definitions/md.NoticePushSaveReq' + produces: + - application/json + responses: + "200": + description: 具体数据 + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 消息中心-基本配置-推送记录添加-发送(不做编辑了) + tags: + - 消息中心 + /api/role/addAdmin: + post: + consumes: + - application/json + description: 权限管理-新增管理员 + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization required: true type: string - - description: 页数 - in: query - name: page + - description: 请求参数 + in: body + name: args required: true - type: string + schema: + $ref: '#/definitions/md.AddAdminReq' produces: - application/json responses: "200": - description: 具体数据 + description: success schema: - $ref: '#/definitions/md.UserManagementGetVirtualCoinDetailResp' + type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 制度中心-会员中心-用户管理-会员明细(积分明细获取) + summary: 新增管理员 tags: - - 会员中心 - /api/memberCenter/userManagement/updateUserInfo: + - 权限管理 + /api/role/addRole: post: consumes: - application/json - description: 用户信息管理(更新) + description: 权限管理-添加角色 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: 用户ID 必传 + - description: 请求参数 in: body - name: req + name: args required: true schema: - $ref: '#/definitions/md.UserManagementUpdateUserInfoReq' + $ref: '#/definitions/md.AddRoleReq' produces: - application/json responses: "200": - description: 修改数据行数 + description: success schema: - type: int + type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 制度中心-会员中心-用户管理-用户信息管理(更新) + summary: 添加角色 tags: - - 会员中心 - /api/memberCenter/userManagement/userData: + - 权限管理 + /api/role/adminInfo: get: consumes: - application/json - description: 会员明细概况(获取) + description: 权限管理-管理员信息 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: 用户 ID + - description: 管理员id in: query - name: uid + name: adm_id required: true type: string produces: - application/json responses: "200": - description: 会员明细概况具体数据 + description: 具体看返回内容 schema: - $ref: '#/definitions/md.UserManagementGetOneBasicResp' + type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 制度中心-会员中心-用户管理-会员明细概况(获取) + summary: 管理员信息 tags: - - 会员中心 - /api/notice/aliyunSms/file/phone: + - 权限管理 + /api/role/adminList: post: consumes: - application/json - description: 短信推送记录-通知模板 + description: 权限管理-管理员列表 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: 参数 file-----文件上传格式 - in: formData - name: file + - description: 请求参数 + in: body + name: args required: true - type: string + schema: + $ref: '#/definitions/md.AdminListReq' produces: - application/json responses: "200": - description: phone 一个数组 + description: 具体看返回内容 schema: type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 消息中心-短信推送记录-通知模板 + summary: 管理员列表 tags: - - 消息中心 - /api/notice/aliyunSms/push/list: + - 权限管理 + /api/role/bindAdminRole: post: consumes: - application/json - description: 短信推送记录-推送记录列表 + description: 权限管理-管理员绑定角色 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: (分页信息必填) + - description: 请求参数 in: body - name: req + name: args required: true schema: - $ref: '#/definitions/md.NoticeAliyunSmsListReq' + $ref: '#/definitions/md.BindAdminRoleReq' produces: - application/json responses: "200": - description: 具体数据 + description: success schema: - $ref: '#/definitions/md.NoticePushListResp' + type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 消息中心-短信推送记录-推送记录列表 + summary: 管理员绑定角色 tags: - - 消息中心 - /api/notice/aliyunSms/push/save: - post: + - 权限管理 + /api/role/deleteAdmin/{$adm_id}: + delete: consumes: - application/json - description: 短信推送记录-推送记录添加-发送 (不做编辑了) + description: 权限管理-删除管理员 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: (分页信息必填) + produces: + - application/json + responses: + "200": + description: success + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 删除管理员 + tags: + - 权限管理 + /api/role/deleteRole/{$id}: + delete: + consumes: + - application/json + description: 权限管理-删除角色 + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 请求参数 in: body - name: req + name: args required: true schema: - $ref: '#/definitions/md.NoticeAliyunSmsSaveReq' + $ref: '#/definitions/md.UpdateRoleStateReq' produces: - application/json responses: "200": - description: 具体数据 + description: success schema: type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 消息中心-短信推送记录-推送记录添加-发送(不做编辑了) + summary: 删除角色 tags: - - 消息中心 - /api/notice/aliyunSms/sale/base: + - 权限管理 + /api/role/permissionGroupList: get: consumes: - application/json - description: 短信推送记录-营销短信-通知模板 + description: 权限管理-权限组列表 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string + - description: 管理员id + in: query + name: adm_id + required: true + type: string produces: - application/json responses: "200": - description: 具体数据 + description: 具体看返回内容 schema: - $ref: '#/definitions/md.NoticeAliyunSmsListResp' + type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 消息中心-短信推送记录-营销短信-通知模板 + summary: 权限组列表 tags: - - 消息中心 - /api/notice/aliyunSms/sale/save: + - 权限管理 + /api/role/roleBindPermissionGroup: post: consumes: - application/json - description: 短信推送记录-营销短信-通知模板添加编辑 + description: 权限管理-角色绑定权限组 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: 数组 把列表的数组传过来 + - description: 请求参数 in: body - name: req + name: args required: true schema: - type: string + $ref: '#/definitions/md.RoleBindPermissionGroupReq' produces: - application/json responses: "200": - description: 具体数据 + description: success schema: type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 消息中心-短信推送记录-营销短信-通知模板添加编辑 + summary: 角色绑定权限组 tags: - - 消息中心 - /api/notice/base/del: - post: + - 权限管理 + /api/role/roleList: + get: consumes: - application/json - description: 基本配置-通知模板删除 + description: 权限管理-角色列表 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: (分页信息必填) - in: body - name: req - required: true - schema: - $ref: '#/definitions/md.NoticeDelReq' produces: - application/json responses: "200": - description: 具体数据 + description: 具体看返回内容 schema: type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 消息中心-基本配置-通知模板删除 + summary: 角色列表 tags: - - 消息中心 - /api/notice/base/list: + - 权限管理 + /api/role/updateAdmin: post: consumes: - application/json - description: 基本配置-通知模板 + description: 权限管理-修改管理员信息 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: (分页信息必填) + - description: 请求参数 in: body - name: req + name: args required: true schema: - $ref: '#/definitions/md.NoticeListReq' + $ref: '#/definitions/md.UpdateAdminReq' produces: - application/json responses: "200": - description: 具体数据 + description: success schema: - $ref: '#/definitions/md.NoticeListResp' + type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 消息中心-基本配置-通知模板 + summary: 修改管理员信息 tags: - - 消息中心 - /api/notice/base/save: + - 权限管理 + /api/role/updateAdminState: post: consumes: - application/json - description: 基本配置-通知模板添加编辑 + description: 权限管理-修改管理员状态 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: (分页信息必填) + - description: 请求参数 in: body - name: req + name: args required: true schema: - $ref: '#/definitions/md.NoticeSaveReq' + $ref: '#/definitions/md.UpdateAdminStateReq' produces: - application/json responses: "200": - description: 具体数据 + description: success schema: type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 消息中心-基本配置-通知模板添加编辑 + summary: 修改管理员状态 tags: - - 消息中心 - /api/notice/jPush/push/list: + - 权限管理 + /api/role/updateRole: post: consumes: - application/json - description: 基本配置-推送记录列表 + description: 权限管理-修改角色 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: (分页信息必填) + - description: 请求参数 in: body - name: req + name: args required: true schema: - $ref: '#/definitions/md.NoticeListReq' + $ref: '#/definitions/md.UpdateRoleReq' produces: - application/json responses: "200": - description: 具体数据 + description: success schema: - $ref: '#/definitions/md.NoticePushListResp' + type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 消息中心-基本配置-推送记录列表 + summary: 修改角色 tags: - - 消息中心 - /api/notice/jPush/push/save: + - 权限管理 + /api/role/updateRoleState: post: consumes: - application/json - description: 基本配置-推送记录添加-发送 (不做编辑了) + description: 权限管理-修改角色状态 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string - - description: (分页信息必填) + - description: 请求参数 in: body - name: req + name: args required: true schema: - $ref: '#/definitions/md.NoticePushSaveReq' + $ref: '#/definitions/md.UpdateRoleStateReq' produces: - application/json responses: "200": - description: 具体数据 + description: success schema: type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 消息中心-基本配置-推送记录添加-发送(不做编辑了) + summary: 修改角色状态 tags: - - 消息中心 + - 权限管理 /api/settCenter/oss/aliYun/getBasic: get: consumes: @@ -9938,38 +10677,7 @@ paths: summary: 基本设置-实名认证-修改认证状态 tags: - 基本设置 - /api/website/certificate: - 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.CertificateReq' - produces: - - application/json - responses: - "200": - description: 具体数据 - schema: - $ref: '#/definitions/md.CertificateResp' - "400": - description: 具体错误 - schema: - $ref: '#/definitions/md.Response' - summary: 证书查询 - tags: - - 官网 - /api/website/getModuleSetting: + /api/v1/website/getModuleSetting: get: consumes: - application/json diff --git a/go.mod b/go.mod index 16903a9..5cb737f 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( ) require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241210110912-1a6913ffbbc5 + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241210101917-218ac8890613 code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241205075006-9c0bf995c788 code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5