refactor🎨: 调整登陆日志和api和操作日志模块

This commit is contained in:
zhangwenjian
2021-07-04 13:43:11 +08:00
parent 37d318b4d9
commit b9b3cbee93
7 changed files with 41 additions and 35 deletions
+12 -2
View File
@@ -77,10 +77,20 @@ func (s *SysApiUpdateReq) GetId() interface{} {
// SysApiGetReq 功能获取请求参数
type SysApiGetReq struct {
dto.ObjectGetReq
Id int `uri:"id"`
}
func (s *SysApiGetReq) GetId() interface{} {
return s.Id
}
// SysApiDeleteReq 功能删除请求参数
type SysApiDeleteReq struct {
dto.ObjectDeleteReq
Ids []int `json:"ids"`
}
func (s *SysApiDeleteReq) GetId() interface{} {
return s.Ids
}
+8 -10
View File
@@ -61,21 +61,19 @@ func (s *SysLoginLogControl) GetId() interface{} {
return s.ID
}
type SysLoginLogById struct {
Id int `uri:"id"`
Ids []int `json:"ids"`
common.ControlBy
type SysLoginLogGetReq struct {
Id int `uri:"id"`
}
func (s *SysLoginLogById) GetId() interface{} {
func (s *SysLoginLogGetReq) GetId() interface{} {
return s.Id
}
func (s *SysLoginLogById) Generate() *SysLoginLogById {
cp := *s
return &cp
// SysLoginLogDeleteReq 功能删除请求参数
type SysLoginLogDeleteReq struct {
Ids []int `json:"ids"`
}
func (s *SysLoginLogById) GenerateM() (*models.SysLoginLog, error) {
return &models.SysLoginLog{}, nil
func (s *SysLoginLogDeleteReq) GetId() interface{} {
return s.Ids
}
+9 -9
View File
@@ -79,19 +79,19 @@ func (s *SysOperaLogControl) GetId() interface{} {
return s.ID
}
type SysOperaLogById struct {
Id int `uri:"id"`
Ids []int `json:"ids"`
type SysOperaLogGetReq struct {
Id int `uri:"id"`
}
func (s *SysOperaLogById) GetId() interface{} {
if len(s.Ids) > 0 {
s.Ids = append(s.Ids, s.Id)
return s.Ids
}
func (s *SysOperaLogGetReq) GetId() interface{} {
return s.Id
}
func (s *SysOperaLogById) SetUpdateBy(id int) {
// SysOperaLogDeleteReq 功能删除请求参数
type SysOperaLogDeleteReq struct {
Ids []int `json:"ids"`
}
func (s *SysOperaLogDeleteReq) GetId() interface{} {
return s.Ids
}