parent
277592a75a
commit
912534deae
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.zongzhi.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
|
||||
import com.ruoyi.zongzhi.service.TcDataSourceTjService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据来源统计表(TcDataSourceTj)表控制层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2023-09-12 14:55:53
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("zongzhi/tcDataSourceTj")
|
||||
@Api(tags = "数据来源统计表")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class TcDataSourceTjController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private TcDataSourceTjService tcDataSourceTjService;
|
||||
|
||||
/**
|
||||
* 分页条件查询所有数据
|
||||
*
|
||||
* @param page 分页条件
|
||||
* @param tcDataSourceTj 查询条件
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
@ApiOperation(value = "分页条件查询数据来源统计表", response = TcDataSourceTj.class)
|
||||
public AjaxResult page(Page<TcDataSourceTj> page, TcDataSourceTj tcDataSourceTj) {
|
||||
return success(tcDataSourceTjService.page(page, new QueryWrapper<>(tcDataSourceTj)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation(value = "通过主键查询单条数据来源统计表", response = TcDataSourceTj.class)
|
||||
public AjaxResult getById(@PathVariable Serializable id) {
|
||||
return success(tcDataSourceTjService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tcDataSourceTj 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增数据来源统计表", response = TcDataSourceTj.class)
|
||||
public AjaxResult insert(@RequestBody TcDataSourceTj tcDataSourceTj) {
|
||||
return success(tcDataSourceTjService.save(tcDataSourceTj));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tcDataSourceTj 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改数据来源统计表")
|
||||
public AjaxResult update(@RequestBody TcDataSourceTj tcDataSourceTj) {
|
||||
return success(tcDataSourceTjService.updateById(tcDataSourceTj));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param idList 主键集合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除数据来源统计表")
|
||||
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
|
||||
return success(tcDataSourceTjService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.zongzhi.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.zongzhi.domain.TcSgjTj;
|
||||
import com.ruoyi.zongzhi.service.TcSgjTjService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全监测受攻击统计(TcSgjTj)表控制层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2023-09-11 15:42:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("zongzhi/tcSgjTj")
|
||||
@Api(tags = "安全监测受攻击统计")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class TcSgjTjController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private TcSgjTjService tcSgjTjService;
|
||||
|
||||
/**
|
||||
* 分页条件查询所有数据
|
||||
*
|
||||
* @param page 分页条件
|
||||
* @param tcSgjTj 查询条件
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
@ApiOperation(value = "分页条件查询安全监测受攻击统计", response = TcSgjTj.class)
|
||||
public AjaxResult page(Page<TcSgjTj> page, TcSgjTj tcSgjTj) {
|
||||
return success(tcSgjTjService.page(page, new QueryWrapper<>(tcSgjTj)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@ApiOperation(value = "通过主键查询单条安全监测受攻击统计", response = TcSgjTj.class)
|
||||
public AjaxResult getById(@PathVariable Serializable id) {
|
||||
return success(tcSgjTjService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param tcSgjTj 实体对象
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
@ApiOperation(value = "新增安全监测受攻击统计", response = TcSgjTj.class)
|
||||
public AjaxResult insert(@RequestBody TcSgjTj tcSgjTj) {
|
||||
return success(tcSgjTjService.save(tcSgjTj));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param tcSgjTj 实体对象
|
||||
* @return 修改结果
|
||||
*/
|
||||
@PutMapping
|
||||
@ApiOperation(value = "修改安全监测受攻击统计")
|
||||
public AjaxResult update(@RequestBody TcSgjTj tcSgjTj) {
|
||||
return success(tcSgjTjService.updateById(tcSgjTj));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param idList 主键集合
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping
|
||||
@ApiOperation(value = "删除安全监测受攻击统计")
|
||||
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
|
||||
return success(tcSgjTjService.removeByIds(idList));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.zongzhi.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 数据来源统计表(TcDataSourceTj)表实体类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2023-09-12 14:55:53
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("数据来源统计表实体类")
|
||||
@TableName(value = "TcDataSourceTj")
|
||||
public class TcDataSourceTj implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 304828068144976883L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 区域id
|
||||
*/
|
||||
@ApiModelProperty(value = "区域id")
|
||||
private Long areaId;
|
||||
|
||||
/**
|
||||
* 云端监测(G)
|
||||
*/
|
||||
@ApiModelProperty(value = "云端监测(G)")
|
||||
private String lable1;
|
||||
|
||||
/**
|
||||
* APT(M)
|
||||
*/
|
||||
@ApiModelProperty(value = "APT(M)")
|
||||
private String lable2;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人id")
|
||||
private Long createId;
|
||||
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人名称")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd ")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 最后更新人id
|
||||
*/
|
||||
@ApiModelProperty(value = "最后更新人id")
|
||||
private Long updateId;
|
||||
|
||||
/**
|
||||
* 最后更新人名称
|
||||
*/
|
||||
@ApiModelProperty(value = "最后更新人名称")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 最后更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "最后更新时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd ")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.ruoyi.zongzhi.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
|
||||
|
||||
/**
|
||||
* 数据来源统计表(TcDataSourceTj)表数据库访问层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2023-09-12 14:55:53
|
||||
*/
|
||||
public interface TcDataSourceTjMapper extends BaseMapper<TcDataSourceTj> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.ruoyi.zongzhi.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.zongzhi.domain.TcSgjTj;
|
||||
|
||||
/**
|
||||
* 安全监测受攻击统计(TcSgjTj)表数据库访问层
|
||||
*
|
||||
* @author wu
|
||||
* @since 2023-09-11 15:42:22
|
||||
*/
|
||||
public interface TcSgjTjMapper extends BaseMapper<TcSgjTj> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.ruoyi.zongzhi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
|
||||
|
||||
/**
|
||||
* 数据来源统计表(TcDataSourceTj)表服务接口
|
||||
*
|
||||
* @author wu
|
||||
* @since 2023-09-12 14:55:53
|
||||
*/
|
||||
public interface TcDataSourceTjService extends IService<TcDataSourceTj> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.ruoyi.zongzhi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.zongzhi.domain.TcSgjTj;
|
||||
|
||||
/**
|
||||
* 安全监测受攻击统计(TcSgjTj)表服务接口
|
||||
*
|
||||
* @author wu
|
||||
* @since 2023-09-11 15:42:25
|
||||
*/
|
||||
public interface TcSgjTjService extends IService<TcSgjTj> {
|
||||
|
||||
}
|
||||
|
@ -1,96 +1,90 @@
|
||||
package com.ruoyi.zongzhi.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.zongzhi.mapper.TcDataSourceMapper;
|
||||
import com.ruoyi.zongzhi.domain.TcDataSource;
|
||||
import com.ruoyi.zongzhi.mapper.TcDataSourceMapper;
|
||||
import com.ruoyi.zongzhi.service.ITcDataSourceService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据来源Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-08-10
|
||||
*/
|
||||
@Service
|
||||
public class TcDataSourceServiceImpl implements ITcDataSourceService
|
||||
{
|
||||
@Autowired
|
||||
public class TcDataSourceServiceImpl implements ITcDataSourceService {
|
||||
@Resource
|
||||
private TcDataSourceMapper tcDataSourceMapper;
|
||||
|
||||
/**
|
||||
* 查询数据来源
|
||||
*
|
||||
*
|
||||
* @param id 数据来源主键
|
||||
* @return 数据来源
|
||||
*/
|
||||
@Override
|
||||
public TcDataSource selectTcDataSourceById(Long id)
|
||||
{
|
||||
public TcDataSource selectTcDataSourceById(Long id) {
|
||||
return tcDataSourceMapper.selectTcDataSourceById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询数据来源列表
|
||||
*
|
||||
*
|
||||
* @param tcDataSource 数据来源
|
||||
* @return 数据来源
|
||||
*/
|
||||
@Override
|
||||
public List<TcDataSource> selectTcDataSourceList(TcDataSource tcDataSource)
|
||||
{
|
||||
public List<TcDataSource> selectTcDataSourceList(TcDataSource tcDataSource) {
|
||||
return tcDataSourceMapper.selectTcDataSourceList(tcDataSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据来源
|
||||
*
|
||||
*
|
||||
* @param tcDataSource 数据来源
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTcDataSource(TcDataSource tcDataSource)
|
||||
{
|
||||
public int insertTcDataSource(TcDataSource tcDataSource) {
|
||||
tcDataSource.setCreateTime(DateUtils.getNowDate());
|
||||
return tcDataSourceMapper.insertTcDataSource(tcDataSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据来源
|
||||
*
|
||||
*
|
||||
* @param tcDataSource 数据来源
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTcDataSource(TcDataSource tcDataSource)
|
||||
{
|
||||
public int updateTcDataSource(TcDataSource tcDataSource) {
|
||||
tcDataSource.setUpdateTime(DateUtils.getNowDate());
|
||||
return tcDataSourceMapper.updateTcDataSource(tcDataSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除数据来源
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据来源主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTcDataSourceByIds(Long[] ids)
|
||||
{
|
||||
public int deleteTcDataSourceByIds(Long[] ids) {
|
||||
return tcDataSourceMapper.deleteTcDataSourceByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据来源信息
|
||||
*
|
||||
*
|
||||
* @param id 数据来源主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTcDataSourceById(Long id)
|
||||
{
|
||||
public int deleteTcDataSourceById(Long id) {
|
||||
return tcDataSourceMapper.deleteTcDataSourceById(id);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.ruoyi.zongzhi.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
|
||||
import com.ruoyi.zongzhi.mapper.TcDataSourceTjMapper;
|
||||
import com.ruoyi.zongzhi.service.TcDataSourceTjService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 数据来源统计表(TcDataSourceTj)表服务实现类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2023-09-12 14:55:53
|
||||
*/
|
||||
@Service("tcDataSourceTjService")
|
||||
public class TcDataSourceTjServiceImpl extends ServiceImpl<TcDataSourceTjMapper, TcDataSourceTj> implements TcDataSourceTjService {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package com.ruoyi.zongzhi.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.zongzhi.domain.TcSgjTj;
|
||||
import com.ruoyi.zongzhi.mapper.TcSgjTjMapper;
|
||||
import com.ruoyi.zongzhi.service.TcSgjTjService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 安全监测受攻击统计(TcSgjTj)表服务实现类
|
||||
*
|
||||
* @author wu
|
||||
* @since 2023-09-11 15:42:25
|
||||
*/
|
||||
@Service("tcSgjTjService")
|
||||
public class TcSgjTjServiceImpl extends ServiceImpl<TcSgjTjMapper, TcSgjTj> implements TcSgjTjService {
|
||||
|
||||
}
|
||||
|
Loading…
Reference in new issue