mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
系统日志接口
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package cn.lihongjie.coal.syslog.controller;
|
||||
|
||||
import cn.lihongjie.coal.annotation.SysLog;
|
||||
import cn.lihongjie.coal.base.dto.CommonQuery;
|
||||
import cn.lihongjie.coal.base.dto.IdRequest;
|
||||
import cn.lihongjie.coal.syslog.dto.CreateSysLogDto;
|
||||
import cn.lihongjie.coal.syslog.dto.SysLogDto;
|
||||
import cn.lihongjie.coal.syslog.dto.UpdateSysLogDto;
|
||||
import cn.lihongjie.coal.syslog.service.SysLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
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;
|
||||
|
||||
@RequestMapping("/sysLog")
|
||||
@RestController
|
||||
@SysLog(module = "系统日志")
|
||||
public class SysLogController {
|
||||
|
||||
@Autowired
|
||||
SysLogService service;
|
||||
|
||||
@PostMapping("/create")
|
||||
@SysLog(action = "新增")
|
||||
public SysLogDto create(@RequestBody CreateSysLogDto dto) {
|
||||
return this.service.create(dto);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@SysLog(action = "编辑")
|
||||
public SysLogDto update(@RequestBody UpdateSysLogDto dto) {
|
||||
return this.service.update(dto);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/delete")
|
||||
@SysLog(action = "删除")
|
||||
public Object delete(@RequestBody IdRequest dto) {
|
||||
this.service.delete(dto);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/list")
|
||||
public Page<SysLogDto> list(@RequestBody CommonQuery dto) {
|
||||
return this.service.list(dto);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getById")
|
||||
public SysLogDto getById(@RequestBody IdRequest dto) {
|
||||
return this.service.getById(dto.getId());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user