20260104:
1、临时修改
This commit is contained in:
parent
d4403f5d42
commit
f33ecdedbf
@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RequestMapping("/monitor/server")
|
@RequestMapping("/monitor/server")
|
||||||
public class ServerController {
|
public class ServerController {
|
||||||
@ApiOperation("获取服务器信息")
|
@ApiOperation("获取服务器信息")
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:server:list')")
|
@PreAuthorize("@ss.hasAnyPermi('monitor:server:list,iot:device:list')")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public AjaxResult getInfo() throws Exception {
|
public AjaxResult getInfo() throws Exception {
|
||||||
Server server = new Server();
|
Server server = new Server();
|
||||||
|
|||||||
@ -79,7 +79,7 @@ public class SysLogininforController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("获取一周内每天用户统计")
|
@ApiOperation("获取一周内每天用户统计")
|
||||||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
|
@PreAuthorize("@ss.hasAnyPermi('monitor:logininfor:list,iot:device:list')")
|
||||||
@GetMapping("/userCount")
|
@GetMapping("/userCount")
|
||||||
public AjaxResult userCount() {
|
public AjaxResult userCount() {
|
||||||
return toAjax(logininforService.getUserCount());
|
return toAjax(logininforService.getUserCount());
|
||||||
|
|||||||
@ -245,7 +245,7 @@ public class SysUserController extends BaseController {
|
|||||||
* 获取部门树列表
|
* 获取部门树列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("获取部门树列表")
|
@ApiOperation("获取部门树列表")
|
||||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
@PreAuthorize("@ss.hasAnyPermi('system:user:list,iot:device:list')")
|
||||||
@GetMapping("/deptTree")
|
@GetMapping("/deptTree")
|
||||||
public AjaxResult deptTree(SysDept dept) {
|
public AjaxResult deptTree(SysDept dept) {
|
||||||
return success(deptService.selectDeptTreeList(dept));
|
return success(deptService.selectDeptTreeList(dept));
|
||||||
|
|||||||
@ -141,7 +141,7 @@ sip:
|
|||||||
# 日志配置
|
# 日志配置
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
com.fastbee: info
|
com.fastbee: debug
|
||||||
com.yomahub: warn
|
com.yomahub: warn
|
||||||
org.dromara: warn
|
org.dromara: warn
|
||||||
org.springframework: warn
|
org.springframework: warn
|
||||||
|
|||||||
@ -13,73 +13,75 @@
|
|||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
<!-- 原有的分级日志appender(已注释,统一使用file_all记录) -->
|
||||||
|
<!--
|
||||||
<appender name="file_debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/sys-debug.log</file>
|
<file>${log.path}/sys-debug.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/sys-debug.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/sys-debug.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
<!-- 日志最大的历史 10天 -->
|
|
||||||
<maxHistory>10</maxHistory>
|
<maxHistory>10</maxHistory>
|
||||||
</rollingPolicy>
|
</rollingPolicy>
|
||||||
<encoder>
|
<encoder>
|
||||||
<pattern>${log.pattern}</pattern>
|
<pattern>${log.pattern}</pattern>
|
||||||
</encoder>
|
</encoder>
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 DEBUG-->
|
|
||||||
<level>DEBUG</level>
|
<level>DEBUG</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/sys-info.log</file>
|
<file>${log.path}/sys-info.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
<!-- 日志最大的历史 10天 -->
|
|
||||||
<maxHistory>10</maxHistory>
|
<maxHistory>10</maxHistory>
|
||||||
</rollingPolicy>
|
</rollingPolicy>
|
||||||
<encoder>
|
<encoder>
|
||||||
<pattern>${log.pattern}</pattern>
|
<pattern>${log.pattern}</pattern>
|
||||||
</encoder>
|
</encoder>
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
<level>INFO</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<file>${log.path}/sys-error.log</file>
|
<file>${log.path}/sys-error.log</file>
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
<fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
<!-- 日志最大的历史 10天 -->
|
|
||||||
<maxHistory>10</maxHistory>
|
<maxHistory>10</maxHistory>
|
||||||
</rollingPolicy>
|
</rollingPolicy>
|
||||||
<encoder>
|
<encoder>
|
||||||
<pattern>${log.pattern}</pattern>
|
<pattern>${log.pattern}</pattern>
|
||||||
</encoder>
|
</encoder>
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
<level>ERROR</level>
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
<onMatch>ACCEPT</onMatch>
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
<onMismatch>DENY</onMismatch>
|
||||||
</filter>
|
</filter>
|
||||||
</appender>
|
</appender>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- 统一系统日志输出(包含所有级别:DEBUG、INFO、ERROR)用于溯源 -->
|
||||||
|
<appender name="file_all" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/sys-all.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/sys-all.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 10天 -->
|
||||||
|
<maxHistory>10</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<!-- 使用ThresholdFilter从DEBUG级别开始记录,包含所有级别 -->
|
||||||
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||||
|
<level>DEBUG</level>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
<!-- 用户访问日志输出 -->
|
<!-- 用户访问日志输出 -->
|
||||||
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
@ -138,11 +140,19 @@
|
|||||||
</root>
|
</root>
|
||||||
|
|
||||||
<!--系统操作日志-->
|
<!--系统操作日志-->
|
||||||
|
<!-- 暂时统一记录到一个文件,方便溯源 -->
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="file_all"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!-- 原有的分级日志配置(已注释,需要分开记录时取消注释) -->
|
||||||
|
<!--
|
||||||
<root level="info">
|
<root level="info">
|
||||||
<appender-ref ref="file_debug"/>
|
<appender-ref ref="file_debug"/>
|
||||||
<appender-ref ref="file_info"/>
|
<appender-ref ref="file_info"/>
|
||||||
<appender-ref ref="file_error"/>
|
<appender-ref ref="file_error"/>
|
||||||
</root>
|
</root>
|
||||||
|
-->
|
||||||
|
|
||||||
<!--系统用户操作日志-->
|
<!--系统用户操作日志-->
|
||||||
<logger name="sys-user" level="info">
|
<logger name="sys-user" level="info">
|
||||||
|
|||||||
@ -468,8 +468,8 @@ public class DeviceController extends BaseController {
|
|||||||
try {
|
try {
|
||||||
Long userId = getUserId();
|
Long userId = getUserId();
|
||||||
String cacheKey = CacheConstants.DEVICE_DEBUG_USER_KEY + userId;
|
String cacheKey = CacheConstants.DEVICE_DEBUG_USER_KEY + userId;
|
||||||
// 设置标志,过期时间30分钟(防止页面异常关闭导致标志未清除)
|
// 设置标志,过期时间7天(防止页面异常关闭导致标志未清除)
|
||||||
redisCache.setCacheObject(cacheKey, "1", 30, TimeUnit.MINUTES);
|
redisCache.setCacheObject(cacheKey, "1", 7, TimeUnit.DAYS);
|
||||||
return AjaxResult.success("已开启调试日志记录");
|
return AjaxResult.success("已开启调试日志记录");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return AjaxResult.error("开启调试日志记录失败:" + e.getMessage());
|
return AjaxResult.error("开启调试日志记录失败:" + e.getMessage());
|
||||||
|
|||||||
@ -34,7 +34,7 @@ public class GroupController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询设备分组列表
|
* 查询设备分组列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('iot:group:list')")
|
@PreAuthorize("@ss.hasAnyPermi('iot:group:list,iot:device:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("分组分页列表")
|
@ApiOperation("分组分页列表")
|
||||||
public TableDataInfo list(Group group) {
|
public TableDataInfo list(Group group) {
|
||||||
|
|||||||
@ -136,7 +136,7 @@ public class ThingsModelController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取缓存的JSON物模型
|
* 获取缓存的JSON物模型
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('iot:model:query')")
|
@PreAuthorize("@ss.hasAnyPermi('iot:model:query,iot:device:list')")
|
||||||
@GetMapping(value = "/cache/{productId}")
|
@GetMapping(value = "/cache/{productId}")
|
||||||
@ApiOperation("获取缓存的JSON物模型")
|
@ApiOperation("获取缓存的JSON物模型")
|
||||||
public AjaxResult getCacheThingsModelByProductId(@PathVariable("productId") Long productId) {
|
public AjaxResult getCacheThingsModelByProductId(@PathVariable("productId") Long productId) {
|
||||||
|
|||||||
@ -34,7 +34,7 @@ public class AlertLogController extends BaseController {
|
|||||||
* 查询设备告警列表
|
* 查询设备告警列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查询设备告警列表")
|
@ApiOperation("查询设备告警列表")
|
||||||
@PreAuthorize("@ss.hasPermi('iot:alertLog:list')")
|
@PreAuthorize("@ss.hasAnyPermi('iot:alertLog:list,iot:device:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(AlertLog alertLog) {
|
public TableDataInfo list(AlertLog alertLog) {
|
||||||
startPage();
|
startPage();
|
||||||
|
|||||||
@ -33,7 +33,7 @@ public class SceneModelController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询场景管理列表
|
* 查询场景管理列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('scene:model:list')")
|
@PreAuthorize("@ss.hasAnyPermi('scene:model:list,iot:device:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation("查询场景管理列表")
|
@ApiOperation("查询场景管理列表")
|
||||||
public TableDataInfo list(SceneModel sceneModel) {
|
public TableDataInfo list(SceneModel sceneModel) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user