|
@@ -5,6 +5,7 @@ import cn.hutool.core.util.NumberUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.jiayue.ssi.annotation.OperateLog;
|
|
import com.jiayue.ssi.annotation.OperateLog;
|
|
|
|
+import com.jiayue.ssi.annotation.PreventReplay;
|
|
import com.jiayue.ssi.backenum.AuditType;
|
|
import com.jiayue.ssi.backenum.AuditType;
|
|
import com.jiayue.ssi.backenum.BusinessType;
|
|
import com.jiayue.ssi.backenum.BusinessType;
|
|
import com.jiayue.ssi.constant.CustomException;
|
|
import com.jiayue.ssi.constant.CustomException;
|
|
@@ -41,6 +42,7 @@ public class SysOperlogController {
|
|
* 获取审计类型
|
|
* 获取审计类型
|
|
*/
|
|
*/
|
|
@GetMapping(value = "/getAuditType")
|
|
@GetMapping(value = "/getAuditType")
|
|
|
|
+ @PreventReplay
|
|
public ResponseVO getAuditType() throws CustomException {
|
|
public ResponseVO getAuditType() throws CustomException {
|
|
List<Map> list = new ArrayList<>();
|
|
List<Map> list = new ArrayList<>();
|
|
try {
|
|
try {
|
|
@@ -64,7 +66,7 @@ public class SysOperlogController {
|
|
list.add(map2);
|
|
list.add(map2);
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- throw new CustomException("操作日志删除异常", e);
|
|
|
|
|
|
+ throw new CustomException("获取审计类型异常", e);
|
|
}
|
|
}
|
|
return ResponseVO.success(list);
|
|
return ResponseVO.success(list);
|
|
}
|
|
}
|
|
@@ -76,6 +78,7 @@ public class SysOperlogController {
|
|
*/
|
|
*/
|
|
@GetMapping(value = "/getAll")
|
|
@GetMapping(value = "/getAll")
|
|
@PreAuthorize("@ss.hasPermi('auditManager:operlog:list')")
|
|
@PreAuthorize("@ss.hasPermi('auditManager:operlog:list')")
|
|
|
|
+ @PreventReplay
|
|
public ResponseVO getAll(String currentPage, String pageSize, String title, String operName, String auditType,
|
|
public ResponseVO getAll(String currentPage, String pageSize, String title, String operName, String auditType,
|
|
String businessType, String status, String startOperTime, String endOperTime, String sortOrder) throws CustomException {
|
|
String businessType, String status, String startOperTime, String endOperTime, String sortOrder) throws CustomException {
|
|
try {
|
|
try {
|
|
@@ -137,7 +140,7 @@ public class SysOperlogController {
|
|
wrapper.le("oper_time", DateUtils.getDayLastTime(DateUtil.parseDate(endOperTime)));
|
|
wrapper.le("oper_time", DateUtils.getDayLastTime(DateUtil.parseDate(endOperTime)));
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(sortOrder)) {
|
|
if (StringUtils.isNotEmpty(sortOrder)) {
|
|
- String[] orders = sortOrder.split("&");
|
|
|
|
|
|
+ String[] orders = sortOrder.replaceAll("&","&").split("&");
|
|
String sortDbField = "";
|
|
String sortDbField = "";
|
|
if ("operTime".equals(orders[0])) {
|
|
if ("operTime".equals(orders[0])) {
|
|
sortDbField = "oper_time";
|
|
sortDbField = "oper_time";
|
|
@@ -216,6 +219,7 @@ public class SysOperlogController {
|
|
*/
|
|
*/
|
|
@GetMapping(value = "/sysOperlogTotal")
|
|
@GetMapping(value = "/sysOperlogTotal")
|
|
@PreAuthorize("@ss.hasPermi('auditManager:sysOperlogTotal:list')")
|
|
@PreAuthorize("@ss.hasPermi('auditManager:sysOperlogTotal:list')")
|
|
|
|
+ @PreventReplay
|
|
public ResponseVO sysOperlogTotal(String startLoginTime, String endLoginTime) throws CustomException {
|
|
public ResponseVO sysOperlogTotal(String startLoginTime, String endLoginTime) throws CustomException {
|
|
try {
|
|
try {
|
|
QueryWrapper<SysOperLog> wrapper = new QueryWrapper<>();
|
|
QueryWrapper<SysOperLog> wrapper = new QueryWrapper<>();
|