Browse Source

4-18 9:51

master
zhangqiyang 7 months ago
parent
commit
9dccab715d
  1. 6
      build.gradle
  2. 1
      modules/test/build.gradle
  3. 8
      modules/test/build/resources/main/domains/LogEntity.xml
  4. 1
      modules/test/out/production/resources/views/SecurityAuditUser-grid.xml
  5. 1
      modules/test/out/production/resources/views/ServiceUser-grid.xml
  6. 1
      modules/test/out/production/resources/views/SystemManageUser-grid.xml
  7. 12
      modules/test/src/main/resources/views/actionGroup.xml
  8. 4
      modules/test/src/main/resources/views/menu.xml
  9. 2
      settings.gradle
  10. 15
      src/main/java/com/system/log/service/LogService.java

6
build.gradle

@ -4,7 +4,7 @@ buildscript {
//mavenCentral()
// maven { url 'https://plugins.gradle.org/m2/' }
//jcenter()
maven { url 'http://192.168.0.200:3081/repository/GradleRep/' }
maven { url 'http://139.9.112.197:3081/repository/GradleRep/' }
}
ext.platformVersion = '1.0.+'
ext.appVersion = '1.0.0'
@ -43,8 +43,7 @@ configurations {
runtime.exclude group: 'javax.ws.rs', module: 'jsr311-api'
}
dependencies {
implementation project(":modules:test")
implementation project(':modules:test')
implementation 'com.alibaba:easyexcel:2.2.6'
implementation 'com.alibaba:fastjson:1.2.83'
//aem
@ -70,4 +69,3 @@ dependencies {
wrapper {
gradleVersion = "6.3"
}

1
modules/test/build.gradle

@ -4,4 +4,3 @@ hypaas {
}
dependencies {
}

8
modules/test/build/resources/main/domains/LogEntity.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<domain-models xmlns="http://hypaas.com/xml/ns/domain-models" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hypaas.com/xml/ns/domain-models http://hypaas.com/xml/ns/domain-models/domain-models_5.2.xsd">
<module name="Log" package="Log"/>
<module name="Log" package="Log" table-prefix="" repo-package=""/>
<entity hashAll="false" logUpdates="true" persistable="true" name="LogEntity" cacheable="false" lang="java" strategy="SINGLE" table="sys_log">
<string actOverwrite="false" copy="true" column="CONTENT" massUpdate="false" name="content" isJudg="false"/>
<string nullable="true" actOverwrite="false" copy="true" column="DEPT" massUpdate="false" name="dept" isJudg="false"/>
@ -22,6 +22,12 @@
<string nullable="true" actOverwrite="false" copy="true" column="USERAUTHDESC" massUpdate="false" name="userAuthDesc" isJudg="false"/>
<string actOverwrite="false" copy="true" column="USERID" massUpdate="false" name="userId" isJudg="false"/>
<string actOverwrite="false" title="应用" copy="true" massUpdate="false" name="app" isJudg="false"/>
<integer actOverwrite="false" title="存储阈值" copy="true" massUpdate="false" name="threshold" isJudg="false"/>
<enum title="备份周期" massUpdate="false" ref="module.BackupCycle" name="backupCycle" copy="true"/>
<string actOverwrite="false" title="密码" copy="true" massUpdate="false" name="password" isJudg="false"/>
<string actOverwrite="false" title="确认密码" copy="true" massUpdate="false" name="confirmPassword" isJudg="false"/>
<datetime actOverwrite="false" title="开始时间" massUpdate="false" name="exportStartTime" copy="true" isJudg="false"/>
<datetime actOverwrite="false" title="结束时间" massUpdate="false" name="exportEndTime" copy="true" isJudg="false"/>
<string actOverwrite="false" copy="true" massUpdate="false" name="address" isJudg="false"/>
</entity>
</domain-models>

1
modules/test/out/production/resources/views/SecurityAuditUser-grid.xml

@ -15,4 +15,3 @@
<field search-field="true" canSuggest="true" name="app" title="所属应用"/>
</grid>
</object-views>

1
modules/test/out/production/resources/views/ServiceUser-grid.xml

@ -15,4 +15,3 @@
<field search-field="true" canSuggest="true" name="app" title="所属应用"/>
</grid>
</object-views>

1
modules/test/out/production/resources/views/SystemManageUser-grid.xml

@ -15,4 +15,3 @@
<field search-field="true" canSuggest="true" name="app" title="所属应用"/>
</grid>
</object-views>

12
modules/test/src/main/resources/views/actionGroup.xml

@ -45,4 +45,16 @@
<action-view name="action.view.SystemManageUserLogBackup.Log" model="Log.LogConfig" title="系统管理员日志备份">
<view name="SystemManageUserBackup-grid" type="grid"/>
</action-view>
<action-method name="action.method.system.logManage.systemLog" model="Log.LogEntity">
<call method="getFileZip" class="com.system.log.controller.LogController"/>
</action-method>
<action-view name="action.view.selectSystemLog.Log" model="Log.LogEntity" title="系统运行日志查询">
<view name="LogWeb/index.html" type="html"/>
</action-view>
<action-view name="action.view.SecurityUser.LogConfig" model="Log.LogConfig" title="日志配置">
<view name="LogBackup/index.html" type="html"/>
</action-view>
</object-views>

4
modules/test/src/main/resources/views/menu.xml

@ -5,6 +5,6 @@
<menuitem parent="menu-LogManage" title="安全审计员操作日志" left="true" name="menu-SecurityAuditUser-Log" action="action.view.SecurityAuditUser.Log"/>
<menuitem parent="menu-LogManage" title="系统管理员操作日志" left="true" name="menu-SystemManageUser-Log" action="action.view.SystemManageUser.Log"/>
<menuitem parent="menu-LogManage" title="安全保密员操作日志" left="true" name="menu-SecurityUser-Log" action="action.view.SecurityUser.Log"/>
<menuitem parent="menu-LogManage" title="系统运行日志" left="true" name="menu-System-Log"/>
<menuitem parent="menu-LogManage" title="日志配置" left="true" name="menu-Config-Log"/>
<menuitem parent="menu-LogManage" title="系统运行日志" left="true" name="menu-System-Log" action="action.view.selectSystemLog.Log"/>
<menuitem parent="menu-LogManage" title="日志配置" left="true" name="menu-Config-Log" action="action.view.SecurityUser.LogConfig"/>
</object-views>

2
settings.gradle

@ -1,5 +1,3 @@
rootProject.name = 'hy-iot-paas'
include "modules:test"

15
src/main/java/com/system/log/service/LogService.java

@ -619,15 +619,20 @@ public class LogService {
}
String filePath = logConfig.getFilePath();
File file = new File(filePath + "systemManageUser.zip");
if (file.delete()) {
// if (file.delete()) {
// logConfig.setStatus(LogStatus.alreadyDelete);
// response.setNotify("日志备份文件删除成功!");
// saveConfig(logConfig);
// response.setReload(true);
// } else {
// response.setError("日志备份文件删除失败!");
// response.setReload(true);
// }
file.delete();
logConfig.setStatus(LogStatus.alreadyDelete);
response.setNotify("日志备份文件删除成功!");
saveConfig(logConfig);
response.setReload(true);
} else {
response.setError("日志备份文件删除失败!");
response.setReload(true);
}
}
public void secondBackup(ActionRequest request, ActionResponse response) {

Loading…
Cancel
Save