APIPark访客模式完成

This commit is contained in:
Liujian
2024-08-16 20:55:16 +08:00
parent 03d76ce154
commit 2e3bfffc41
16 changed files with 117 additions and 81 deletions
+7 -3
View File
@@ -14,6 +14,10 @@ type imlTeamController struct {
module my_team.ITeamModule `autowired:""`
}
func (c *imlTeamController) SimpleTeams(ctx *gin.Context, keyword string) ([]*team_dto.SimpleTeam, error) {
return c.module.SimpleTeams(ctx, keyword)
}
func (c *imlTeamController) UpdateMemberRole(ctx *gin.Context, id string, input *team_dto.UpdateMemberRole) error {
return c.module.UpdateMemberRole(ctx, id, input)
}
@@ -23,7 +27,7 @@ func (c *imlTeamController) GetTeam(ctx *gin.Context, id string) (*team_dto.Team
}
func (c *imlTeamController) Search(ctx *gin.Context, keyword string) ([]*team_dto.Item, error) {
return c.module.Search(ctx, keyword)
}
@@ -31,8 +35,8 @@ func (c *imlTeamController) EditTeam(ctx *gin.Context, id string, team *team_dto
return c.module.Edit(ctx, id, team)
}
func (c *imlTeamController) SimpleTeams(ctx *gin.Context, keyword string) ([]*team_dto.SimpleTeam, error) {
return c.module.SimpleTeams(ctx, keyword)
func (c *imlTeamController) MySimpleTeams(ctx *gin.Context, keyword string) ([]*team_dto.SimpleTeam, error) {
return c.module.MySimpleTeams(ctx, keyword)
}
func (c *imlTeamController) AddMember(ctx *gin.Context, id string, users *team_dto.UserIDs) error {
+2 -1
View File
@@ -2,7 +2,7 @@ package my_team
import (
"reflect"
team_dto "github.com/APIParkLab/APIPark/module/my-team/dto"
"github.com/eolinker/go-common/autowire"
"github.com/gin-gonic/gin"
@@ -13,6 +13,7 @@ type ITeamController interface {
GetTeam(ctx *gin.Context, id string) (*team_dto.Team, error)
Search(ctx *gin.Context, keyword string) ([]*team_dto.Item, error)
EditTeam(ctx *gin.Context, id string, team *team_dto.EditTeam) (*team_dto.Team, error)
MySimpleTeams(ctx *gin.Context, keyword string) ([]*team_dto.SimpleTeam, error)
SimpleTeams(ctx *gin.Context, keyword string) ([]*team_dto.SimpleTeam, error)
AddMember(ctx *gin.Context, id string, users *team_dto.UserIDs) error
RemoveMember(ctx *gin.Context, id string, uuid string) error