| 1234567891011121314151617181920212223242526272829303132333435363738 |
- package handler
- import (
- "context"
- "dashoo.cn/common_definition/comm_def"
- "github.com/gogf/gf/frame/g"
- "dashoo.cn/micro/app/model"
- "dashoo.cn/micro/app/service"
- )
- type LoginLogHandler struct{}
- // GetList 获取列表
- func (h *LoginLogHandler) GetList(ctx context.Context, req *model.SysLoginLogSearchReq, rsp *comm_def.CommonMsg) error {
- logService, err := service.NewLoginLogService(ctx)
- if err != nil {
- return err
- }
- total, list, err := logService.GetList(req)
- if err != nil {
- return err
- }
- rsp.Data = g.Map{"list": list, "total": total}
- return nil
- }
- // DeleteByIds 删除菜单
- func (h *LoginLogHandler) DeleteByIds(ctx context.Context, req *comm_def.IdsReq, rsp *comm_def.CommonMsg) error {
- logService, err := service.NewLoginLogService(ctx)
- if err != nil {
- return err
- }
- err = logService.DeleteByIds(req.Ids)
- return err
- }
|