duhanyu
dongdingding 1 year ago
parent 8bda3365e9
commit 5223d55894

@ -35,7 +35,11 @@
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
<version>4.3.0</version>
</dependency>
<!-- SpringBoot的依赖配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
@ -73,19 +77,6 @@
<version>${oshi.version}</version>
</dependency>
<!-- Swagger3依赖 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>${swagger.version}</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>

@ -16,7 +16,10 @@
</description>
<dependencies>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
</dependency>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
@ -24,19 +27,6 @@
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- swagger3-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
</dependency>
<!-- 防止进入swagger页面报类型转换错误排除3.0.0中的引用手动增加1.6.2版本 -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.6.2</version>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>

@ -3,6 +3,11 @@ package com.ruoyi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
*
@ -15,16 +20,21 @@ public class RuoYiApplication
public static void main(String[] args)
{
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
ConfigurableApplicationContext run = SpringApplication.run(RuoYiApplication.class, args);
Environment env = run.getEnvironment();
String ip;
try {
ip = InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException e) {
throw new RuntimeException(e);
}
String port = env.getProperty("server.port");
String path = env.getProperty("server.servlet.context-path");
path = path.isEmpty() ? "" : path;
System.out.println("\n----------------------------------------------------------\n\t"
+ "Application is running! Access URLs:\n\t"
+ "swagger-ui: http://localhost:" + port + path + "doc.html\n\t"
+ "swagger-ui: http://" + ip + ":" + port + path + "doc.html\n\t"
+ "----------------------------------------------------------");
}
}

@ -2,6 +2,10 @@ package com.ruoyi.tcZz.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.tcZz.domain.TcYqzs;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -20,6 +24,7 @@ import com.ruoyi.tcZz.domain.TcCy;
import com.ruoyi.tcZz.service.ITcCyService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* Controller
@ -28,6 +33,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-10-12
*/
@RestController
@Api(tags = "词云")
@RequestMapping("/tcZz/cy")
public class TcCyController extends BaseController
{
@ -101,4 +107,30 @@ public class TcCyController extends BaseController
{
return toAjax(tcCyService.deleteTcCyByIds(ids));
}
/**
*
*/
@ApiOperation(value = "查询词云列表",response = TcCy.class)
@GetMapping("/ListNoToken")
public TableDataInfo ListNoToken(TcCy tcCy)
{
startPage();
List<TcCy> list = tcCyService.selectTcCyList(tcCy);
return getDataTable(list);
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcCy> util = new ExcelUtil<TcCy>(TcCy.class);
List<TcCy> tcCyList = util.importExcel(file.getInputStream());
tcCyService.importUser(tcCyList);
return AjaxResult.success();
}
}

@ -2,6 +2,10 @@ package com.ruoyi.tcZz.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.tcZz.domain.TcYqzs;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -20,6 +24,7 @@ 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;
import org.springframework.web.multipart.MultipartFile;
/**
* Controller
@ -28,6 +33,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-10-12
*/
@RestController
@Api(tags = "网络监测")
@RequestMapping("/tcZz/networkSecurity/cybersecurity")
public class TcWljgController extends BaseController
{
@ -101,4 +107,29 @@ public class TcWljgController extends BaseController
{
return toAjax(tcWljgService.deleteTcWljgByIds(ids));
}
/**
*
*/
@ApiOperation(value = "查询舆情走势图列表",response = TcWljg.class)
@GetMapping("/ListNoToken")
public TableDataInfo ListNoToken(TcWljg tcWljg)
{
startPage();
List<TcWljg> list = tcWljgService.selectTcWljgList(tcWljg);
return getDataTable(list);
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcWljg> util = new ExcelUtil<TcWljg>(TcWljg.class);
List<TcWljg> tcWljgList = util.importExcel(file.getInputStream());
tcWljgService.importUser(tcWljgList);
return AjaxResult.success();
}
}

@ -2,6 +2,11 @@ package com.ruoyi.tcZz.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.tcZz.domain.TcCy;
import com.ruoyi.tcZz.domain.TcWljg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -20,6 +25,7 @@ import com.ruoyi.tcZz.domain.TcYqzs;
import com.ruoyi.tcZz.service.ITcYqzsService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* Controller
@ -28,6 +34,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-10-12
*/
@RestController
@Api(tags = "舆情走势图")
@RequestMapping("/tcZz/yqzs")
public class TcYqzsController extends BaseController
{
@ -101,4 +108,28 @@ public class TcYqzsController extends BaseController
{
return toAjax(tcYqzsService.deleteTcYqzsByIds(ids));
}
/**
*
*/
@ApiOperation(value = "查询舆情走势图列表",response = TcYqzs.class)
@GetMapping("/ListNoToken")
public TableDataInfo ListNoToken(TcYqzs tcYqzs)
{
startPage();
List<TcYqzs> list = tcYqzsService.selectTcYqzsList(tcYqzs);
return getDataTable(list);
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcYqzs> util = new ExcelUtil<TcYqzs>(TcYqzs.class);
List<TcYqzs> tcWljgList = util.importExcel(file.getInputStream());
tcYqzsService.importUser(tcWljgList);
return AjaxResult.success();
}
}

@ -24,6 +24,10 @@ public class TcCy extends BaseEntity
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "区域id")
@Excel(name = "区域id")
private String areaId;
/** 词云名称 */
@ApiModelProperty(value = "词云名称")
@Excel(name = "词云名称")

@ -9,6 +9,7 @@ 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;
import org.springframework.format.annotation.DateTimeFormat;
/**
* tc_wljg
@ -30,72 +31,92 @@ public class TcWljg extends BaseEntity {
/**
* id
*/
@ApiModelProperty(value = "区域id")
@Excel(name = "区域id")
private String areaId;
/**
* 1. 2.
*/
@ApiModelProperty(value = "1.启用 2.禁用")
@Excel(name = "1.启用 2.禁用")
private Long isStatus;
/**
*
*/
@Excel(name = "攻击发起时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "攻击发起时间")
private Date startTime;
/**
* IP
*/
@Excel(name = "攻击源IP")
@ApiModelProperty(value = "攻击源IP")
private String attackyIp;
/**
*
*/
@Excel(name = "攻击类型")
@ApiModelProperty(value = "攻击类型")
private String attackType;
/**
* IP
*/
@Excel(name = "攻击源IP区域")
@ApiModelProperty(value = "攻击源IP区域")
private String attackIpArea;
/**
*
*/
@Excel(name = "受攻击目标类型")
@ApiModelProperty(value = "受攻击目标类型")
private String type;
/**
* IP
*/
@ApiModelProperty(value = "受攻击IP")
@Excel(name = "受攻击IP")
private String sAttackIp;
/**
* IP
*/
@ApiModelProperty(value = "受攻击IP区域")
private String sAttackIpArea;
/**
*
*/
@ApiModelProperty(value = "网站安全等级")
@Excel(name = "网站安全等级")
private String netLevel;
/**
*
*/
@ApiModelProperty(value = "所属单位")
@Excel(name = "所属单位")
private String affUnit;
/**
*
*/
@ApiModelProperty(value = "联系电话")
@Excel(name = "联系电话")
private String linkTel;
/**
*
*/
@ApiModelProperty(value = "联系人")
@Excel(name = "联系人")
private String linkMan;

@ -28,18 +28,23 @@ public class TcYqzs extends BaseEntity
/** 区域id */
@Excel(name = "区域id")
@ApiModelProperty(value = "区域id")
private Long areaId;
/** 日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(value = "日期")
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date dateTime;
/** 非敏感数量 */
@Excel(name = "非敏感数量")
@ApiModelProperty(value = "非敏感数量")
private Long count1;
/** 敏感数量 */
@Excel(name = "敏感数量")
@ApiModelProperty(value = "敏感数量")
private Long count2;
}

@ -58,4 +58,7 @@ public interface TcWljgMapper
* @return
*/
public int deleteTcWljgByIds(Long[] ids);
}

@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service;
import java.util.List;
import com.ruoyi.tcZz.domain.TcCy;
import com.ruoyi.tcZz.domain.TcYqzs;
/**
* Service
@ -58,4 +59,11 @@ public interface ITcCyService
* @return
*/
public int deleteTcCyById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcCy> tcCyList);
}

@ -58,4 +58,12 @@ public interface ITcWljgService
* @return
*/
public int deleteTcWljgById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcWljg> tcWljgList);
}

@ -1,6 +1,8 @@
package com.ruoyi.tcZz.service;
import java.util.List;
import com.ruoyi.tcZz.domain.TcWljg;
import com.ruoyi.tcZz.domain.TcYqzs;
/**
@ -58,4 +60,12 @@ public interface ITcYqzsService
* @return
*/
public int deleteTcYqzsById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcYqzs> tcYqzsList);
}

@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.tcZz.domain.TcYqzs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tcZz.mapper.TcCyMapper;
@ -66,7 +67,6 @@ public class TcCyServiceImpl implements ITcCyService
@Override
public int updateTcCy(TcCy tcCy)
{
tcCy.setUpdateTime(DateUtils.getNowDate());
return tcCyMapper.updateTcCy(tcCy);
}
@ -93,4 +93,18 @@ public class TcCyServiceImpl implements ITcCyService
{
return tcCyMapper.deleteTcCyById(id);
}
@Override
public String importUser(List<TcCy> tcCyList) {
StringBuilder successMsg = new StringBuilder();
if (!tcCyList.isEmpty()) {
for (TcCy tcCy : tcCyList) {
tcCyMapper.insertTcCy(tcCy);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
}

@ -66,7 +66,7 @@ public class TcWljgServiceImpl implements ITcWljgService
@Override
public int updateTcWljg(TcWljg tcWljg)
{
tcWljg.setUpdateTime(DateUtils.getNowDate());
return tcWljgMapper.updateTcWljg(tcWljg);
}
@ -93,4 +93,17 @@ public class TcWljgServiceImpl implements ITcWljgService
{
return tcWljgMapper.deleteTcWljgById(id);
}
@Override
public String importUser(List<TcWljg> tcWljgList) {
StringBuilder successMsg = new StringBuilder();
if (!tcWljgList.isEmpty()) {
for (TcWljg tcWljg : tcWljgList) {
tcWljgMapper.insertTcWljg(tcWljg);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
}

@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.tcZz.domain.TcWljg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tcZz.mapper.TcYqzsMapper;
@ -66,7 +67,7 @@ public class TcYqzsServiceImpl implements ITcYqzsService
@Override
public int updateTcYqzs(TcYqzs tcYqzs)
{
tcYqzs.setUpdateTime(DateUtils.getNowDate());
return tcYqzsMapper.updateTcYqzs(tcYqzs);
}
@ -93,4 +94,18 @@ public class TcYqzsServiceImpl implements ITcYqzsService
{
return tcYqzsMapper.deleteTcYqzsById(id);
}
@Override
public String importUser(List<TcYqzs> tcYqzsList) {
StringBuilder successMsg = new StringBuilder();
if (!tcYqzsList.isEmpty()) {
for (TcYqzs tcYqzs : tcYqzsList) {
tcYqzsMapper.insertTcYqzs(tcYqzs);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
}

@ -1,26 +1,19 @@
package com.ruoyi.web.core.config;
import java.util.ArrayList;
import java.util.List;
import com.ruoyi.common.config.RuoYiConfig;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.ruoyi.common.config.RuoYiConfig;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.ApiKey;
import springfox.documentation.service.AuthorizationScope;
import springfox.documentation.service.Contact;
import springfox.documentation.service.SecurityReference;
import springfox.documentation.service.SecurityScheme;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/**
* Swagger2
@ -28,29 +21,36 @@ import springfox.documentation.spring.web.plugins.Docket;
* @author ruoyi
*/
@Configuration
public class SwaggerConfig
{
/** 系统基础配置 */
@EnableSwagger2WebMvc
public class SwaggerConfig {
/**
*
*/
@Autowired
private RuoYiConfig ruoyiConfig;
/** 是否开启swagger */
@Value("${swagger.enabled}")
/**
* swagger
*/
@Value("${knife4j.enable}")
private boolean enabled;
/** 设置请求的统一前缀 */
@Value("${swagger.pathMapping}")
/**
*
*/
@Value("${server.servlet.context-path}")
private String pathMapping;
/**
* API
*/
@Bean
public Docket createRestApi()
{
return new Docket(DocumentationType.OAS_30)
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
// 是否启用Swagger
.enable(enabled)
//分组名称
.groupName("太仓综治")
// 用来创建该API的基本信息展示在文档的页面中自定义展示的信息
.apiInfo(apiInfo())
// 设置哪些接口暴露给Swagger展示
@ -62,60 +62,22 @@ public class SwaggerConfig
// 扫描所有 .apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
/* 设置安全模式swagger可以设置访问token */
.securitySchemes(securitySchemes())
.securityContexts(securityContexts())
.pathMapping(pathMapping);
// 排除mybatis-plus的分页参数
// .ignoredParameterTypes(Page.class, IPage.class);
}
/**
* tokenAuthorization
*/
private List<SecurityScheme> securitySchemes()
{
List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
apiKeyList.add(new ApiKey("Authorization", "Authorization", In.HEADER.toValue()));
return apiKeyList;
}
/**
*
*/
private List<SecurityContext> securityContexts()
{
List<SecurityContext> securityContexts = new ArrayList<>();
securityContexts.add(
SecurityContext.builder()
.securityReferences(defaultAuth())
.operationSelector(o -> o.requestMappingPattern().matches("/.*"))
.build());
return securityContexts;
}
/**
*
*/
private List<SecurityReference> defaultAuth()
{
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
List<SecurityReference> securityReferences = new ArrayList<>();
securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
return securityReferences;
}
/**
*
*/
private ApiInfo apiInfo()
{
private ApiInfo apiInfo() {
// 用ApiInfoBuilder进行定制
return new ApiInfoBuilder()
// 设置标题
.title("标题:若依管理系统_接口文档")
.title("苏州应急3期系统_接口文档")
// 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
.description("描述用于苏州应急3期系统")
// 作者信息
.contact(new Contact(ruoyiConfig.getName(), null, null))
// 版本

@ -21,7 +21,7 @@ spring:
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
maxActive: 100
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置连接超时时间

@ -18,7 +18,7 @@ ruoyi:
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 9027
port: 9035
servlet:
# 应用的访问路径
context-path: /
@ -115,11 +115,9 @@ pagehelper:
params: count=countSql
# Swagger配置
swagger:
# 是否开启swagger
enabled: true
# 请求前缀
pathMapping:
knife4j:
enable: true
# 防止XSS攻击
xss:

@ -13,17 +13,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
<result property="areaId" column="area_id"/>
</resultMap>
<sql id="selectTcCyVo">
select id, cy_name, cy_count, create_by, create_time, update_by, update_time, remark from tc_cy
select id,
area_id,
cy_name,
cy_count,
create_by,
create_time,
update_by,
update_time,
remark
from tc_cy
</sql>
<select id="selectTcCyList" parameterType="TcCy" resultMap="TcCyResult">
<include refid="selectTcCyVo"/>
<where>
<if test="id != null ">and id = #{id}</if>
<if test="areaId != null ">and area_id = #{areaId}</if>
<if test="cyName != null and cyName != ''">and cy_name like concat('%', #{cyName}, '%')</if>
<if test="cyCount != null ">and cy_count = #{cyCount}</if>
<if test="createBy != null and createBy != ''">and create_by = #{createBy}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="updateBy != null and updateBy != ''">and update_by = #{updateBy}</if>
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''">
and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}
</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
</where>
</select>
@ -42,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="areaId != null">area_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cyName != null">#{cyName},</if>
@ -51,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="areaId != null">#{areaId},</if>
</trim>
</insert>
@ -64,12 +88,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="areaId != null">area_id = #{areaId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTcCyById" parameterType="Long">
delete from tc_cy where id = #{id}
delete
from tc_cy
where id = #{id}
</delete>
<delete id="deleteTcCyByIds" parameterType="String">

@ -18,14 +18,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTcYqzsVo">
select id, area_id, date_time, create_by, create_time, update_by, update_time, remark, count1, count2 from tc_yqzs
select id,
area_id,
date_time,
create_by,
create_time,
update_by,
update_time,
remark,
count1,
count2
from tc_yqzs
</sql>
<select id="selectTcYqzsList" parameterType="TcYqzs" resultMap="TcYqzsResult">
<include refid="selectTcYqzsVo"/>
<where>
<if test="id != null ">and id = #{id}</if>
<if test="areaId != null ">and area_id = #{areaId}</if>
<if test="dateTime != null ">and date_time = #{dateTime}</if>
<if test="createBy != null and createBy != ''">and create_by = #{createBy}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="updateBy != null and updateBy != ''">and update_by = #{updateBy}</if>
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''">
and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}
</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
<if test="count1 != null ">and count1 = #{count1}</if>
<if test="count2 != null ">and count2 = #{count2}</if>
</where>
@ -79,7 +99,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteTcYqzsById" parameterType="Long">
delete from tc_yqzs where id = #{id}
delete
from tc_yqzs
where id = #{id}
</delete>
<delete id="deleteTcYqzsByIds" parameterType="String">

@ -33,8 +33,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectTcWljgList" parameterType="TcWljg" resultMap="TcWljgResult">
<include refid="selectTcWljgVo"/>
<where>
<if test="id != null ">and id = #{id}</if>
<if test="areaId != null and areaId != ''">and area_id = #{areaId}</if>
<if test="isStatus != null ">and isStatus = #{isStatus}</if>
<if test="params.beginStartTime != null and params.beginStartTime != '' and params.endStartTime != null and params.endStartTime != ''">
and start_time between #{params.beginStartTime} and #{params.endStartTime}
</if>
<if test="attackyIp != null and attackyIp != ''">and attacky_ip = #{attackyIp}</if>
<if test="attackType != null and attackType != ''">and attack_type = #{attackType}</if>
<if test="attackIpArea != null and attackIpArea != ''">and attack_ip_area = #{attackIpArea}</if>
<if test="type != null and type != ''">and type = #{type}</if>
<if test="sAttackIp != null and sAttackIp != ''">and s_attack_ip = #{sAttackIp}</if>
<if test="sAttackIpArea != null and sAttackIpArea != ''">and s_attack_ip_area = #{sAttackIpArea}</if>
<if test="netLevel != null and netLevel != ''">and net_level = #{netLevel}</if>
<if test="affUnit != null and affUnit != ''">and aff_unit = #{affUnit}</if>
<if test="linkTel != null and linkTel != ''">and link_tel = #{linkTel}</if>
<if test="linkMan != null and linkMan != ''">and link_man = #{linkMan}</if>
<if test="createBy != null and createBy != ''">and create_by = #{createBy}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="updateBy != null and updateBy != ''">and update_by = #{updateBy}</if>
<if test="params.beginUpdateTime != null and params.beginUpdateTime != '' and params.endUpdateTime != null and params.endUpdateTime != ''">
and update_time between #{params.beginUpdateTime} and #{params.endUpdateTime}
</if>
<if test="remark != null and remark != ''">and remark = #{remark}</if>
</where>
</select>
@ -43,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<insert id="insertTcWljg" parameterType="TcWljg" useGeneratedKeys="true" keyProperty="id">
insert into tc_wljg
<trim prefix="(" suffix=")" suffixOverrides=",">

@ -125,6 +125,12 @@
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.6</version>
<scope>compile</scope>
</dependency>
</dependencies>

@ -7,6 +7,9 @@ import java.util.Map;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
/**
* Entity
@ -22,20 +25,29 @@ public class BaseEntity implements Serializable
private String searchValue;
/** 创建者 */
@ApiModelProperty(value = "创建者")
private String createBy;
/** 创建时间 */
@Excel(name = "创建时间", dateFormat = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新者 */
@ApiModelProperty(value = "更新者")
private String updateBy;
/** 更新时间 */
@Excel(name = "更新时间", dateFormat = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 备注 */
@ApiModelProperty(value = "备注")
private String remark;
/** 请求参数 */

@ -114,7 +114,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/login", "/register", "/captchaImage").permitAll()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/tcZz/cy/ListNoToken","/tcZz/yqzs/ListNoToken","/tcZz/networkSecurity/cybersecurity/ListNoToken","/tcZz/networkSecurity/cybersecurity/common/importExcel","/tcZz/yqzs/common/importExcel","/tcZz/cy/common/importExcel").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated()
.and()

Loading…
Cancel
Save