guoshilong
2023-05-31 73b3b855ea8b73bbec13570ecfbebd856f4fa789
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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));
    }
 
}