|
@@ -6,6 +6,7 @@ import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
import com.fs.common.enums.BusinessType;
|
|
|
|
|
+import com.fs.common.utils.LogSensitiveUtils;
|
|
|
import com.fs.common.utils.ServletUtils;
|
|
import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.company.domain.CompanyOperLog;
|
|
import com.fs.company.domain.CompanyOperLog;
|
|
@@ -33,7 +34,7 @@ public class CompanyOperlogController extends BaseController
|
|
|
private TokenService tokenService;
|
|
private TokenService tokenService;
|
|
|
|
|
|
|
|
|
|
|
|
|
-// @PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
|
|
|
|
|
|
|
+ @PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
|
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
|
@DataScope
|
|
@DataScope
|
|
|
public TableDataInfo list(CompanyOperLog operLog)
|
|
public TableDataInfo list(CompanyOperLog operLog)
|
|
@@ -42,9 +43,15 @@ public class CompanyOperlogController extends BaseController
|
|
|
startPage();
|
|
startPage();
|
|
|
operLog.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
operLog.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
List<CompanyOperLog> list = operLogService.selectCompanyOperLogList(operLog);
|
|
List<CompanyOperLog> list = operLogService.selectCompanyOperLogList(operLog);
|
|
|
|
|
+ list.forEach(this::maskOperLogSensitiveFields);
|
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private void maskOperLogSensitiveFields(CompanyOperLog operLog) {
|
|
|
|
|
+ operLog.setOperParam(LogSensitiveUtils.maskSensitive(operLog.getOperParam()));
|
|
|
|
|
+ operLog.setJsonResult(LogSensitiveUtils.maskSensitive(operLog.getJsonResult()));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
|
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
|
|
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
|
|
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
|
|
|
@GetMapping("/export")
|
|
@GetMapping("/export")
|
|
@@ -53,6 +60,7 @@ public class CompanyOperlogController extends BaseController
|
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
operLog.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
operLog.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
List<CompanyOperLog> list = operLogService.selectCompanyOperLogList(operLog);
|
|
List<CompanyOperLog> list = operLogService.selectCompanyOperLogList(operLog);
|
|
|
|
|
+ list.forEach(this::maskOperLogSensitiveFields);
|
|
|
ExcelUtil<CompanyOperLog> util = new ExcelUtil<CompanyOperLog>(CompanyOperLog.class);
|
|
ExcelUtil<CompanyOperLog> util = new ExcelUtil<CompanyOperLog>(CompanyOperLog.class);
|
|
|
return util.exportExcel(list, "操作日志");
|
|
return util.exportExcel(list, "操作日志");
|
|
|
}
|
|
}
|