66 Star 511 Fork 149

samwaf/SamWaf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
waf_account_log.go 875 Bytes
一键复制 编辑 原始数据 按行查看 历史
samwaf 提交于 2023-02-02 11:21 +08:00 . 增加账号管理和日志的基本内容
package api
import (
"SamWaf/model/common/response"
"SamWaf/model/request"
"github.com/gin-gonic/gin"
)
type WafAccountLogApi struct {
}
func (w *WafAccountLogApi) GetDetailApi(c *gin.Context) {
var req request.WafAccountLogDetailReq
err := c.ShouldBind(&req)
if err == nil {
bean := wafAccountLogService.GetDetailApi(req)
response.OkWithDetailed(bean, "获取成功", c)
} else {
response.FailWithMessage("解析失败", c)
}
}
func (w *WafAccountLogApi) GetListApi(c *gin.Context) {
var req request.WafAccountLogSearchReq
err := c.ShouldBind(&req)
if err == nil {
beans, total, _ := wafAccountLogService.GetListApi(req)
response.OkWithDetailed(response.PageResult{
List: beans,
Total: total,
PageIndex: req.PageIndex,
PageSize: req.PageSize,
}, "获取成功", c)
} else {
response.FailWithMessage("解析失败", c)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/samwaf/SamWaf.git
[email protected]:samwaf/SamWaf.git
samwaf
SamWaf
SamWaf
main

搜索帮助