package com.jy.log.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jy.log.model.dto.LogUserOperationDto;
import com.jy.log.model.dto.LogUserOperationSelectDto;
import com.jy.log.model.vo.LogUserOperationVo;
import com.jy.log.service.LogUserOperationService;
import com.jy.framework.model.base.BaseSelectDto;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户操作日志 前端控制器
 * </p>
 *
 * @author 
 * @since 2025-08-12
 */
@RestController
@RequestMapping("/logUserOperation")
public class LogUserOperationController {

    @Resource
    private LogUserOperationService logUserOperationService;

    /**
     * 用户操作日志分页
     */
    @GetMapping("/getPage")
    public Page<LogUserOperationVo> getPage(LogUserOperationSelectDto dto) {
        return logUserOperationService.getPage(dto);
    }

    /**
     * 用户操作日志明细
     */
    @GetMapping("/getDetail")
    public LogUserOperationVo getDetail(BaseSelectDto dto) {
        return logUserOperationService.getDetail(dto.getId());
    }

    /**
     * 用户操作日志编辑
     */
    @PostMapping("/edit")
    public void edit(@RequestBody LogUserOperationDto dto) {
        logUserOperationService.edit(dto);
    }

}
