TB_ANTIVIRUS_LOGCongtoller.java
2.5 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package com.tianbo.analysis.controller;
import com.github.pagehelper.PageInfo;
import com.tianbo.analysis.model.ResultJson;
import com.tianbo.analysis.model.TB_ANTIVIRUS_LOG;
import com.tianbo.analysis.service.TB_ANTIVIRUS_LOGService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @author shenhl
* <p>
* 2022/1/18/11:24
*/
@RestController
@RequestMapping(value = "/antivirus_log")
public class TB_ANTIVIRUS_LOGCongtoller {
@Autowired
TB_ANTIVIRUS_LOGService tbAntivirusLogService;
/**
* 消毒记录查询
* @return
*/
@RequestMapping(value = "/antivirus_log_list")
@ResponseBody
public ResultJson antivirus_log_list(@RequestParam(value = "pageSize", required = false, defaultValue = "1") int pageSize,
@RequestParam(value = "limitSize", required = false, defaultValue = "10") int limitSize,
@RequestParam(value = "antivirusName", required = false) String antivirusName){
TB_ANTIVIRUS_LOG tbAntivirusLog = new TB_ANTIVIRUS_LOG();
tbAntivirusLog.setAntivirusName(antivirusName);
PageInfo<TB_ANTIVIRUS_LOG> list = tbAntivirusLogService.list(tbAntivirusLog, pageSize, limitSize);
return new ResultJson("200","success",list);
}
/**
* 消毒记录新增
* @return
*/
@RequestMapping(value = "/antivirus_log_add")
@ResponseBody
public ResultJson antivirus_log_add(TB_ANTIVIRUS_LOG tbAntivirusLog){
return tbAntivirusLogService.insertSelective(tbAntivirusLog) > 0 ? new ResultJson("200", "新增成功")
: new ResultJson("201", "新增失败");
}
/**
* 消毒记录修改
* @return
*/
@RequestMapping(value = "/antivirus_log_edit")
@ResponseBody
public ResultJson antivirus_log_edit(TB_ANTIVIRUS_LOG tbAntivirusLog){
return tbAntivirusLogService.updateByPrimaryKeySelective(tbAntivirusLog) > 0 ? new ResultJson("200", "修改成功")
: new ResultJson("201", "修改失败");
}
/**
* 消毒记录删除
* @return
*/
@RequestMapping(value = "/antivirus_log_remove")
@ResponseBody
public ResultJson antivirus_log_remove(@RequestParam(value = "autoid") String autoid){
return tbAntivirusLogService.deleteByPrimaryKey(autoid) > 0 ? new ResultJson("200", "删除成功")
: new ResultJson("201", "删除失败");
}
}