2022-05-18 17:57:03 +08:00
|
|
|
package controller
|
|
|
|
|
|
|
|
import (
|
2022-05-29 10:06:21 +08:00
|
|
|
"github.com/eryajf/go-ldap-admin/logic"
|
2022-06-14 11:17:38 +08:00
|
|
|
"github.com/eryajf/go-ldap-admin/model/request"
|
2022-05-18 17:57:03 +08:00
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
type OperationLogController struct{}
|
|
|
|
|
|
|
|
// List 记录列表
|
|
|
|
func (m *OperationLogController) List(c *gin.Context) {
|
|
|
|
req := new(request.OperationLogListReq)
|
|
|
|
Run(c, req, func() (interface{}, interface{}) {
|
|
|
|
return logic.OperationLog.List(c, req)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// Delete 删除记录
|
|
|
|
func (m *OperationLogController) Delete(c *gin.Context) {
|
|
|
|
req := new(request.OperationLogDeleteReq)
|
|
|
|
Run(c, req, func() (interface{}, interface{}) {
|
|
|
|
return logic.OperationLog.Delete(c, req)
|
|
|
|
})
|
|
|
|
}
|
2024-05-16 22:12:42 +08:00
|
|
|
|
|
|
|
// Clean 清空记录
|
|
|
|
func (m *OperationLogController) Clean(c *gin.Context) {
|
|
|
|
req := new(request.OperationLogListReq)
|
|
|
|
Run(c, req, func() (interface{}, interface{}) {
|
|
|
|
return logic.OperationLog.Clean(c, req)
|
|
|
|
})
|
|
|
|
}
|