网络监测表

duhanyu
杜函宇 2 years ago
parent 8373805007
commit 28a6bbf954

@ -0,0 +1,104 @@
package com.ruoyi.tcZz.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.tcZz.domain.TcSjly;
import com.ruoyi.tcZz.service.ITcSjlyService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* tc_sjlyController
*
* @author ruoyi
* @date 2023-10-12
*/
@RestController
@RequestMapping("/tcZz/networkSecurity/ryz")
public class TcSjlyController extends BaseController
{
@Autowired
private ITcSjlyService tcSjlyService;
/**
* tc_sjly
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:ryz:list')")
@GetMapping("/list")
public TableDataInfo list(TcSjly tcSjly)
{
startPage();
List<TcSjly> list = tcSjlyService.selectTcSjlyList(tcSjly);
return getDataTable(list);
}
/**
* tc_sjly
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:ryz:export')")
@Log(title = "数据来源 tc_sjly可推送", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TcSjly tcSjly)
{
List<TcSjly> list = tcSjlyService.selectTcSjlyList(tcSjly);
ExcelUtil<TcSjly> util = new ExcelUtil<TcSjly>(TcSjly.class);
util.exportExcel(response, list, "数据来源 tc_sjly可推送数据");
}
/**
* tc_sjly
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:ryz:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(tcSjlyService.selectTcSjlyById(id));
}
/**
* tc_sjly
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:ryz:add')")
@Log(title = "数据来源 tc_sjly可推送", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TcSjly tcSjly)
{
return toAjax(tcSjlyService.insertTcSjly(tcSjly));
}
/**
* tc_sjly
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:ryz:edit')")
@Log(title = "数据来源 tc_sjly可推送", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TcSjly tcSjly)
{
return toAjax(tcSjlyService.updateTcSjly(tcSjly));
}
/**
* tc_sjly
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:ryz:remove')")
@Log(title = "数据来源 tc_sjly可推送", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tcSjlyService.deleteTcSjlyByIds(ids));
}
}

@ -0,0 +1,104 @@
package com.ruoyi.tcZz.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.tcZz.domain.TcWljg;
import com.ruoyi.tcZz.service.ITcWljgService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2023-10-12
*/
@RestController
@RequestMapping("/tcZz/networkSecurity/cybersecurity")
public class TcWljgController extends BaseController
{
@Autowired
private ITcWljgService tcWljgService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:cybersecurity:list')")
@GetMapping("/list")
public TableDataInfo list(TcWljg tcWljg)
{
startPage();
List<TcWljg> list = tcWljgService.selectTcWljgList(tcWljg);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:cybersecurity:export')")
@Log(title = "网络监测", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TcWljg tcWljg)
{
List<TcWljg> list = tcWljgService.selectTcWljgList(tcWljg);
ExcelUtil<TcWljg> util = new ExcelUtil<TcWljg>(TcWljg.class);
util.exportExcel(response, list, "网络监测数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:cybersecurity:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(tcWljgService.selectTcWljgById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:cybersecurity:add')")
@Log(title = "网络监测", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TcWljg tcWljg)
{
return toAjax(tcWljgService.insertTcWljg(tcWljg));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:cybersecurity:edit')")
@Log(title = "网络监测", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TcWljg tcWljg)
{
return toAjax(tcWljgService.updateTcWljg(tcWljg));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:cybersecurity:remove')")
@Log(title = "网络监测", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tcWljgService.deleteTcWljgByIds(ids));
}
}

@ -0,0 +1,154 @@
package com.ruoyi.tcZz.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* tc_sjly tc_sjly
*
* @author ruoyi
* @date 2023-10-12
*/
public class TcSjly extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 区域id */
@Excel(name = "区域id")
private String areaId;
/** 类型 */
@Excel(name = "类型")
private Long type;
/** 启用/禁用 */
@Excel(name = "启用/禁用")
private Long isStatus;
/** 资产名称 */
@Excel(name = "资产名称")
private String zcName;
/** 所属单位 */
@Excel(name = "所属单位")
private String affUnit;
/** IP地址 */
@Excel(name = "IP地址")
private String sysyemIp;
/** 操作系统 */
@Excel(name = "操作系统")
private String os;
/** 版本 */
@Excel(name = "版本")
private String versions;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setAreaId(String areaId)
{
this.areaId = areaId;
}
public String getAreaId()
{
return areaId;
}
public void setType(Long type)
{
this.type = type;
}
public Long getType()
{
return type;
}
public void setIsStatus(Long isStatus)
{
this.isStatus = isStatus;
}
public Long getIsStatus()
{
return isStatus;
}
public void setZcName(String zcName)
{
this.zcName = zcName;
}
public String getZcName()
{
return zcName;
}
public void setAffUnit(String affUnit)
{
this.affUnit = affUnit;
}
public String getAffUnit()
{
return affUnit;
}
public void setSysyemIp(String sysyemIp)
{
this.sysyemIp = sysyemIp;
}
public String getSysyemIp()
{
return sysyemIp;
}
public void setOs(String os)
{
this.os = os;
}
public String getOs()
{
return os;
}
public void setVersions(String versions)
{
this.versions = versions;
}
public String getVersions()
{
return versions;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("areaId", getAreaId())
.append("type", getType())
.append("isStatus", getIsStatus())
.append("zcName", getZcName())
.append("affUnit", getAffUnit())
.append("sysyemIp", getSysyemIp())
.append("os", getOs())
.append("versions", getVersions())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -0,0 +1,220 @@
package com.ruoyi.tcZz.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* tc_wljg
*
* @author ruoyi
* @date 2023-10-12
*/
public class TcWljg extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 区域id */
@Excel(name = "区域id")
private String areaId;
/** 1.启用 2.禁用 */
@Excel(name = "1.启用 2.禁用")
private Long isStatus;
/** 攻击发起时间 */
private Date startTime;
/** 攻击源IP */
@Excel(name = "攻击源IP")
private String attackyIp;
/** 攻击类型 */
@Excel(name = "攻击类型")
private String attackType;
/** 攻击源IP区域 */
private String attackIpArea;
/** 受攻击目标类型 */
private String type;
/** 受攻击IP */
@Excel(name = "受攻击IP")
private String sAttackIp;
/** 受攻击IP区域 */
private String sAttackIpArea;
/** 网站安全等级 */
@Excel(name = "网站安全等级")
private String netLevel;
/** 所属单位 */
private String affUnit;
/** 联系电话 */
private String linkTel;
/** 联系人 */
@Excel(name = "联系人")
private String linkMan;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setAreaId(String areaId)
{
this.areaId = areaId;
}
public String getAreaId()
{
return areaId;
}
public void setIsStatus(Long isStatus)
{
this.isStatus = isStatus;
}
public Long getIsStatus()
{
return isStatus;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setAttackyIp(String attackyIp)
{
this.attackyIp = attackyIp;
}
public String getAttackyIp()
{
return attackyIp;
}
public void setAttackType(String attackType)
{
this.attackType = attackType;
}
public String getAttackType()
{
return attackType;
}
public void setAttackIpArea(String attackIpArea)
{
this.attackIpArea = attackIpArea;
}
public String getAttackIpArea()
{
return attackIpArea;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setsAttackIp(String sAttackIp)
{
this.sAttackIp = sAttackIp;
}
public String getsAttackIp()
{
return sAttackIp;
}
public void setsAttackIpArea(String sAttackIpArea)
{
this.sAttackIpArea = sAttackIpArea;
}
public String getsAttackIpArea()
{
return sAttackIpArea;
}
public void setNetLevel(String netLevel)
{
this.netLevel = netLevel;
}
public String getNetLevel()
{
return netLevel;
}
public void setAffUnit(String affUnit)
{
this.affUnit = affUnit;
}
public String getAffUnit()
{
return affUnit;
}
public void setLinkTel(String linkTel)
{
this.linkTel = linkTel;
}
public String getLinkTel()
{
return linkTel;
}
public void setLinkMan(String linkMan)
{
this.linkMan = linkMan;
}
public String getLinkMan()
{
return linkMan;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("areaId", getAreaId())
.append("isStatus", getIsStatus())
.append("startTime", getStartTime())
.append("attackyIp", getAttackyIp())
.append("attackType", getAttackType())
.append("attackIpArea", getAttackIpArea())
.append("type", getType())
.append("sAttackIp", getsAttackIp())
.append("sAttackIpArea", getsAttackIpArea())
.append("netLevel", getNetLevel())
.append("affUnit", getAffUnit())
.append("linkTel", getLinkTel())
.append("linkMan", getLinkMan())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -0,0 +1,61 @@
package com.ruoyi.tcZz.mapper;
import java.util.List;
import com.ruoyi.tcZz.domain.TcSjly;
/**
* tc_sjlyMapper
*
* @author ruoyi
* @date 2023-10-12
*/
public interface TcSjlyMapper
{
/**
* tc_sjly
*
* @param id tc_sjly
* @return tc_sjly
*/
public TcSjly selectTcSjlyById(Long id);
/**
* tc_sjly
*
* @param tcSjly tc_sjly
* @return tc_sjly
*/
public List<TcSjly> selectTcSjlyList(TcSjly tcSjly);
/**
* tc_sjly
*
* @param tcSjly tc_sjly
* @return
*/
public int insertTcSjly(TcSjly tcSjly);
/**
* tc_sjly
*
* @param tcSjly tc_sjly
* @return
*/
public int updateTcSjly(TcSjly tcSjly);
/**
* tc_sjly
*
* @param id tc_sjly
* @return
*/
public int deleteTcSjlyById(Long id);
/**
* tc_sjly
*
* @param ids
* @return
*/
public int deleteTcSjlyByIds(Long[] ids);
}

@ -0,0 +1,61 @@
package com.ruoyi.tcZz.mapper;
import java.util.List;
import com.ruoyi.tcZz.domain.TcWljg;
/**
* Mapper
*
* @author ruoyi
* @date 2023-10-12
*/
public interface TcWljgMapper
{
/**
*
*
* @param id
* @return
*/
public TcWljg selectTcWljgById(Long id);
/**
*
*
* @param tcWljg
* @return
*/
public List<TcWljg> selectTcWljgList(TcWljg tcWljg);
/**
*
*
* @param tcWljg
* @return
*/
public int insertTcWljg(TcWljg tcWljg);
/**
*
*
* @param tcWljg
* @return
*/
public int updateTcWljg(TcWljg tcWljg);
/**
*
*
* @param id
* @return
*/
public int deleteTcWljgById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTcWljgByIds(Long[] ids);
}

@ -0,0 +1,61 @@
package com.ruoyi.tcZz.service;
import java.util.List;
import com.ruoyi.tcZz.domain.TcSjly;
/**
* tc_sjlyService
*
* @author ruoyi
* @date 2023-10-12
*/
public interface ITcSjlyService
{
/**
* tc_sjly
*
* @param id tc_sjly
* @return tc_sjly
*/
public TcSjly selectTcSjlyById(Long id);
/**
* tc_sjly
*
* @param tcSjly tc_sjly
* @return tc_sjly
*/
public List<TcSjly> selectTcSjlyList(TcSjly tcSjly);
/**
* tc_sjly
*
* @param tcSjly tc_sjly
* @return
*/
public int insertTcSjly(TcSjly tcSjly);
/**
* tc_sjly
*
* @param tcSjly tc_sjly
* @return
*/
public int updateTcSjly(TcSjly tcSjly);
/**
* tc_sjly
*
* @param ids tc_sjly
* @return
*/
public int deleteTcSjlyByIds(Long[] ids);
/**
* tc_sjly
*
* @param id tc_sjly
* @return
*/
public int deleteTcSjlyById(Long id);
}

@ -0,0 +1,61 @@
package com.ruoyi.tcZz.service;
import java.util.List;
import com.ruoyi.tcZz.domain.TcWljg;
/**
* Service
*
* @author ruoyi
* @date 2023-10-12
*/
public interface ITcWljgService
{
/**
*
*
* @param id
* @return
*/
public TcWljg selectTcWljgById(Long id);
/**
*
*
* @param tcWljg
* @return
*/
public List<TcWljg> selectTcWljgList(TcWljg tcWljg);
/**
*
*
* @param tcWljg
* @return
*/
public int insertTcWljg(TcWljg tcWljg);
/**
*
*
* @param tcWljg
* @return
*/
public int updateTcWljg(TcWljg tcWljg);
/**
*
*
* @param ids
* @return
*/
public int deleteTcWljgByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTcWljgById(Long id);
}

@ -0,0 +1,96 @@
package com.ruoyi.tcZz.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tcZz.mapper.TcSjlyMapper;
import com.ruoyi.tcZz.domain.TcSjly;
import com.ruoyi.tcZz.service.ITcSjlyService;
/**
* tc_sjlyService
*
* @author ruoyi
* @date 2023-10-12
*/
@Service
public class TcSjlyServiceImpl implements ITcSjlyService
{
@Autowired
private TcSjlyMapper tcSjlyMapper;
/**
* tc_sjly
*
* @param id tc_sjly
* @return tc_sjly
*/
@Override
public TcSjly selectTcSjlyById(Long id)
{
return tcSjlyMapper.selectTcSjlyById(id);
}
/**
* tc_sjly
*
* @param tcSjly tc_sjly
* @return tc_sjly
*/
@Override
public List<TcSjly> selectTcSjlyList(TcSjly tcSjly)
{
return tcSjlyMapper.selectTcSjlyList(tcSjly);
}
/**
* tc_sjly
*
* @param tcSjly tc_sjly
* @return
*/
@Override
public int insertTcSjly(TcSjly tcSjly)
{
tcSjly.setCreateTime(DateUtils.getNowDate());
return tcSjlyMapper.insertTcSjly(tcSjly);
}
/**
* tc_sjly
*
* @param tcSjly tc_sjly
* @return
*/
@Override
public int updateTcSjly(TcSjly tcSjly)
{
tcSjly.setUpdateTime(DateUtils.getNowDate());
return tcSjlyMapper.updateTcSjly(tcSjly);
}
/**
* tc_sjly
*
* @param ids tc_sjly
* @return
*/
@Override
public int deleteTcSjlyByIds(Long[] ids)
{
return tcSjlyMapper.deleteTcSjlyByIds(ids);
}
/**
* tc_sjly
*
* @param id tc_sjly
* @return
*/
@Override
public int deleteTcSjlyById(Long id)
{
return tcSjlyMapper.deleteTcSjlyById(id);
}
}

@ -0,0 +1,96 @@
package com.ruoyi.tcZz.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tcZz.mapper.TcWljgMapper;
import com.ruoyi.tcZz.domain.TcWljg;
import com.ruoyi.tcZz.service.ITcWljgService;
/**
* Service
*
* @author ruoyi
* @date 2023-10-12
*/
@Service
public class TcWljgServiceImpl implements ITcWljgService
{
@Autowired
private TcWljgMapper tcWljgMapper;
/**
*
*
* @param id
* @return
*/
@Override
public TcWljg selectTcWljgById(Long id)
{
return tcWljgMapper.selectTcWljgById(id);
}
/**
*
*
* @param tcWljg
* @return
*/
@Override
public List<TcWljg> selectTcWljgList(TcWljg tcWljg)
{
return tcWljgMapper.selectTcWljgList(tcWljg);
}
/**
*
*
* @param tcWljg
* @return
*/
@Override
public int insertTcWljg(TcWljg tcWljg)
{
tcWljg.setCreateTime(DateUtils.getNowDate());
return tcWljgMapper.insertTcWljg(tcWljg);
}
/**
*
*
* @param tcWljg
* @return
*/
@Override
public int updateTcWljg(TcWljg tcWljg)
{
tcWljg.setUpdateTime(DateUtils.getNowDate());
return tcWljgMapper.updateTcWljg(tcWljg);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTcWljgByIds(Long[] ids)
{
return tcWljgMapper.deleteTcWljgByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTcWljgById(Long id)
{
return tcWljgMapper.deleteTcWljgById(id);
}
}

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.tcZz.mapper.TcSjlyMapper">
<resultMap type="TcSjly" id="TcSjlyResult">
<result property="id" column="id" />
<result property="areaId" column="area_id" />
<result property="type" column="type" />
<result property="isStatus" column="isStatus" />
<result property="zcName" column="zc_name" />
<result property="affUnit" column="aff_unit" />
<result property="sysyemIp" column="sysyem_ip" />
<result property="os" column="os" />
<result property="versions" column="versions" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectTcSjlyVo">
select id, area_id, type, isStatus, zc_name, aff_unit, sysyem_ip, os, versions, create_by, create_time, update_by, update_time, remark from tc_sjly
</sql>
<select id="selectTcSjlyList" parameterType="TcSjly" resultMap="TcSjlyResult">
<include refid="selectTcSjlyVo"/>
<where>
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
</where>
</select>
<select id="selectTcSjlyById" parameterType="Long" resultMap="TcSjlyResult">
<include refid="selectTcSjlyVo"/>
where id = #{id}
</select>
<insert id="insertTcSjly" parameterType="TcSjly" useGeneratedKeys="true" keyProperty="id">
insert into tc_sjly
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="areaId != null">area_id,</if>
<if test="type != null">type,</if>
<if test="isStatus != null">isStatus,</if>
<if test="zcName != null">zc_name,</if>
<if test="affUnit != null">aff_unit,</if>
<if test="sysyemIp != null">sysyem_ip,</if>
<if test="os != null">os,</if>
<if test="versions != null">versions,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="areaId != null">#{areaId},</if>
<if test="type != null">#{type},</if>
<if test="isStatus != null">#{isStatus},</if>
<if test="zcName != null">#{zcName},</if>
<if test="affUnit != null">#{affUnit},</if>
<if test="sysyemIp != null">#{sysyemIp},</if>
<if test="os != null">#{os},</if>
<if test="versions != null">#{versions},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTcSjly" parameterType="TcSjly">
update tc_sjly
<trim prefix="SET" suffixOverrides=",">
<if test="areaId != null">area_id = #{areaId},</if>
<if test="type != null">type = #{type},</if>
<if test="isStatus != null">isStatus = #{isStatus},</if>
<if test="zcName != null">zc_name = #{zcName},</if>
<if test="affUnit != null">aff_unit = #{affUnit},</if>
<if test="sysyemIp != null">sysyem_ip = #{sysyemIp},</if>
<if test="os != null">os = #{os},</if>
<if test="versions != null">versions = #{versions},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTcSjlyById" parameterType="Long">
delete from tc_sjly where id = #{id}
</delete>
<delete id="deleteTcSjlyByIds" parameterType="String">
delete from tc_sjly where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.tcZz.mapper.TcWljgMapper">
<resultMap type="TcWljg" id="TcWljgResult">
<result property="id" column="id" />
<result property="areaId" column="area_id" />
<result property="isStatus" column="isStatus" />
<result property="startTime" column="start_time" />
<result property="attackyIp" column="attacky_ip" />
<result property="attackType" column="attack_type" />
<result property="attackIpArea" column="attack_ip_area" />
<result property="type" column="type" />
<result property="sAttackIp" column="s_attack_ip" />
<result property="sAttackIpArea" column="s_attack_ip_area" />
<result property="netLevel" column="net_level" />
<result property="affUnit" column="aff_unit" />
<result property="linkTel" column="link_tel" />
<result property="linkMan" column="link_man" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectTcWljgVo">
select id, area_id, isStatus, start_time, attacky_ip, attack_type, attack_ip_area, type, s_attack_ip, s_attack_ip_area, net_level, aff_unit, link_tel, link_man, create_by, create_time, update_by, update_time, remark from tc_wljg
</sql>
<select id="selectTcWljgList" parameterType="TcWljg" resultMap="TcWljgResult">
<include refid="selectTcWljgVo"/>
<where>
<if test="areaId != null and areaId != ''"> and area_id = #{areaId}</if>
<if test="isStatus != null "> and isStatus = #{isStatus}</if>
</where>
</select>
<select id="selectTcWljgById" parameterType="Long" resultMap="TcWljgResult">
<include refid="selectTcWljgVo"/>
where id = #{id}
</select>
<insert id="insertTcWljg" parameterType="TcWljg" useGeneratedKeys="true" keyProperty="id">
insert into tc_wljg
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="areaId != null">area_id,</if>
<if test="isStatus != null">isStatus,</if>
<if test="startTime != null">start_time,</if>
<if test="attackyIp != null">attacky_ip,</if>
<if test="attackType != null">attack_type,</if>
<if test="attackIpArea != null">attack_ip_area,</if>
<if test="type != null">type,</if>
<if test="sAttackIp != null">s_attack_ip,</if>
<if test="sAttackIpArea != null">s_attack_ip_area,</if>
<if test="netLevel != null">net_level,</if>
<if test="affUnit != null">aff_unit,</if>
<if test="linkTel != null">link_tel,</if>
<if test="linkMan != null">link_man,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="areaId != null">#{areaId},</if>
<if test="isStatus != null">#{isStatus},</if>
<if test="startTime != null">#{startTime},</if>
<if test="attackyIp != null">#{attackyIp},</if>
<if test="attackType != null">#{attackType},</if>
<if test="attackIpArea != null">#{attackIpArea},</if>
<if test="type != null">#{type},</if>
<if test="sAttackIp != null">#{sAttackIp},</if>
<if test="sAttackIpArea != null">#{sAttackIpArea},</if>
<if test="netLevel != null">#{netLevel},</if>
<if test="affUnit != null">#{affUnit},</if>
<if test="linkTel != null">#{linkTel},</if>
<if test="linkMan != null">#{linkMan},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTcWljg" parameterType="TcWljg">
update tc_wljg
<trim prefix="SET" suffixOverrides=",">
<if test="areaId != null">area_id = #{areaId},</if>
<if test="isStatus != null">isStatus = #{isStatus},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="attackyIp != null">attacky_ip = #{attackyIp},</if>
<if test="attackType != null">attack_type = #{attackType},</if>
<if test="attackIpArea != null">attack_ip_area = #{attackIpArea},</if>
<if test="type != null">type = #{type},</if>
<if test="sAttackIp != null">s_attack_ip = #{sAttackIp},</if>
<if test="sAttackIpArea != null">s_attack_ip_area = #{sAttackIpArea},</if>
<if test="netLevel != null">net_level = #{netLevel},</if>
<if test="affUnit != null">aff_unit = #{affUnit},</if>
<if test="linkTel != null">link_tel = #{linkTel},</if>
<if test="linkMan != null">link_man = #{linkMan},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTcWljgById" parameterType="Long">
delete from tc_wljg where id = #{id}
</delete>
<delete id="deleteTcWljgByIds" parameterType="String">
delete from tc_wljg where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save