权限相关问题修复

This commit is contained in:
linwenxiang
2021-02-22 22:00:34 +08:00
parent e9617ec677
commit da347e095f
9 changed files with 140 additions and 34 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ func (m *SysConfigSearch) Bind(ctx *gin.Context) error {
type SysConfigControl struct {
ID int `uri:"ID" comment:"编码"` // 编码
ConfigName string `json:"configName" comment:""`
ConfigKey string `json:"configKey" comment:""`
ConfigKey string `uri:"configKey" json:"configKey" comment:""`
ConfigValue string `json:"configValue" comment:""`
ConfigType string `json:"configType" comment:""`
Remark string `json:"remark" comment:""`
+1 -16
View File
@@ -98,8 +98,7 @@ func (s *SysRoleControl) GetId() interface{} {
// SysConfigById 获取单个或者删除的结构体
type SysRoleById struct {
Id int `uri:"id"`
Ids []int `json:"ids"`
dto.ObjectById
}
func (s *SysRoleById) Generate() *SysRoleById {
@@ -111,20 +110,6 @@ func (s *SysRoleById) GetId() interface{} {
return s.Id
}
func (s *SysRoleById) Bind(ctx *gin.Context) error {
msgID := tools.GenerateMsgIDFromContext(ctx)
err := ctx.ShouldBindUri(s)
if err != nil {
log.Debugf("MsgID[%s] ShouldBindUri error: %s", msgID, err.Error())
return err
}
err = ctx.ShouldBind(s)
if err != nil {
log.Debugf("MsgID[%s] ShouldBind error: %#v", msgID, err.Error())
}
return err
}
func (s *SysRoleById) GenerateM() (*models.SysRole, error) {
return &models.SysRole{}, nil
}