44 lines
1.3 KiB
Java
44 lines
1.3 KiB
Java
package net.srt.controller;
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
import lombok.AllArgsConstructor;
|
|
import net.srt.framework.common.page.PageResult;
|
|
import net.srt.framework.common.utils.Result;
|
|
import net.srt.query.DataServiceApiLogQuery;
|
|
import net.srt.query.DataServiceAppQuery;
|
|
import net.srt.service.DataServiceApiLogService;
|
|
import net.srt.vo.DataServiceApiLogVo;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.validation.Valid;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @ClassName : DataServiceApiLogController
|
|
* @Description :
|
|
* @Author : FJJ
|
|
* @Date: 2023-12-25 11:29
|
|
*/
|
|
@RestController
|
|
@RequestMapping("log")
|
|
@Tag(name = "api请求日志")
|
|
@AllArgsConstructor
|
|
public class DataServiceApiLogController {
|
|
private final DataServiceApiLogService dataServiceApiLogService;
|
|
|
|
@GetMapping("page")
|
|
@Operation(summary = "分页")
|
|
public Result<PageResult<DataServiceApiLogVo>> page(@Valid DataServiceApiLogQuery query){
|
|
//查询数据
|
|
PageResult<DataServiceApiLogVo> page=dataServiceApiLogService.dataPageList(query);
|
|
return Result.ok(page);
|
|
}
|
|
@DeleteMapping
|
|
@Operation(summary ="删除")
|
|
public Result<String> delete(@RequestBody List<Long> idList){
|
|
dataServiceApiLogService.removeId(idList);
|
|
return Result.ok();
|
|
}
|
|
}
|