package cn.gistack.sm.log.controller;
|
|
import cn.gistack.sm.log.entity.SmLogManage;
|
import cn.gistack.sm.log.service.ISmLogManageService;
|
import cn.gistack.sm.patrol.entity.PatrolConfig;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.AllArgsConstructor;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.utils.ObjectUtil;
|
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;
|
|
/**
|
* @ClassName 日志管理
|
* @Description TODO
|
* @Author aix
|
* @Date 2023/4/24 14:53
|
* @Version 1.0
|
*/
|
@Slf4j
|
@Api(tags="日志管理")
|
@RestController
|
@RequestMapping("/log/logManage")
|
@AllArgsConstructor
|
public class SmLogManageController {
|
|
private ISmLogManageService smLogManageService;
|
|
@ApiOperation(value="日志管理-添加", notes="日志管理-添加")
|
@PostMapping(value = "/add")
|
public R add(@RequestBody SmLogManage smLogManage) {
|
|
if (ObjectUtil.isEmpty(smLogManage.getSource())){
|
smLogManage.setSource("WEB");
|
}
|
return R.data(smLogManageService.save(smLogManage));
|
}
|
|
}
|