新增受攻击IPTOP5修改

Lvtianfang
dongdingding 1 year ago
parent e214f8348a
commit 6346880aa0

@ -32,22 +32,12 @@ public class TcJgdwController extends BaseController {
@Autowired
private ITcJgdwService tcJgdwService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:list')")
@GetMapping("/list")
public TableDataInfo list(TcJgdw tcJgdw) {
startPage();
List<TcJgdw> list = tcJgdwService.selectTcJgdwList(tcJgdw);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:export')")
@Log(title = "监管单位", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TcJgdw tcJgdw) {
List<TcJgdw> list = tcJgdwService.selectTcJgdwList(tcJgdw);
@ -58,7 +48,7 @@ public class TcJgdwController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcJgdwService.selectTcJgdwById(id));
@ -67,8 +57,7 @@ public class TcJgdwController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:add')")
@Log(title = "监管单位", businessType = BusinessType.INSERT)
@ApiOperation(value = "新增监管单位")
@PostMapping
public AjaxResult add(@RequestBody TcJgdw tcJgdw) {
return toAjax(tcJgdwService.insertTcJgdw(tcJgdw));
@ -77,8 +66,8 @@ public class TcJgdwController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:edit')")
@Log(title = "监管单位", businessType = BusinessType.UPDATE)
@ApiOperation(value = "修改监管单位")
@PutMapping
public AjaxResult edit(@RequestBody TcJgdw tcJgdw) {
return toAjax(tcJgdwService.updateTcJgdw(tcJgdw));
@ -87,8 +76,7 @@ public class TcJgdwController extends BaseController {
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:remove')")
@Log(title = "监管单位", businessType = BusinessType.DELETE)
@ApiOperation(value = "删除监管单位")
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tcJgdwService.deleteTcJgdwByIds(ids));

@ -70,7 +70,19 @@ public class TcSgjipTop5Controller extends BaseController {
@ApiOperation(value = "新增受攻击IPTOP5")
@PostMapping
public AjaxResult add(@RequestBody TcSgjipTop5 tcSgjipTop5) {
return toAjax(tcSgjipTop5Service.insertTcSgjipTop5(tcSgjipTop5));
//根据S_attack_ip判断如果已存在则调修改
TcSgjipTop5 newtcSgjipTop5=new TcSgjipTop5();
newtcSgjipTop5.setSAttackIp(tcSgjipTop5.getSAttackIp());
List<TcSgjipTop5> list = tcSgjipTop5Service.selectTcSgjipTop5List(tcSgjipTop5);
if (!list.isEmpty()){
for (TcSgjipTop5 a :list) {
tcSgjipTop5.setId(a.getId());
tcSgjipTop5Service.updateTcSgjipTop5(tcSgjipTop5);
}
}else {
tcSgjipTop5Service.insertTcSgjipTop5(tcSgjipTop5);
}
return AjaxResult.success();
}
/**

Loading…
Cancel
Save