fix
Helius
2021-10-09 12542f379312598f83a50893584944e51fc0f2b9
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
package com.xzx.gc.system.controller;
 
import com.xzx.gc.common.Result;
import com.xzx.gc.common.annotations.PassToken;
import com.xzx.gc.common.dto.log.SysProgramLog;
import com.xzx.gc.common.request.BaseController;
import com.xzx.gc.system.service.ProgramLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
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;
 
import javax.servlet.http.HttpServletRequest;
 
/**
 * @author :zz
 */
@RestController
@RequestMapping("/programLog")
@Api(tags = {"程序报错日志记录"})
@Validated
public class ProgramLogController extends BaseController {
 
    @Autowired
    private ProgramLogService programLogServiceImpl;
 
    @PostMapping("")
    @ApiOperation(value = "新增记录")
    @PassToken
    public Result add(@Validated  @RequestBody SysProgramLog sysProgramLog, HttpServletRequest request){
            programLogServiceImpl.add(sysProgramLog);
            return new Result<>("记录成功");
    }
}