|
|
@@ -1,5 +1,6 @@
|
|
|
package com.xunmei.system.controller;
|
|
|
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import com.xunmei.common.core.web.controller.BaseController;
|
|
|
import com.xunmei.common.core.web.domain.AjaxResult;
|
|
|
import com.xunmei.common.core.web.page.TableDataInfo;
|
|
|
@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -59,6 +61,19 @@ public class SysOperlogController extends BaseController
|
|
|
return success();
|
|
|
}
|
|
|
|
|
|
+// @RequiresPermissions("system:operlog:remove")
|
|
|
+ @Log(title = "操作日志迁移到历史表", businessType = BusinessType.OTHER)
|
|
|
+ @InnerAuth
|
|
|
+ @DeleteMapping("/transferToHistory")
|
|
|
+ public AjaxResult transferOperLogToHistory()
|
|
|
+ {
|
|
|
+ // 迁移当前时间 3个月之前的操作日志到历史表
|
|
|
+ Date transferDate= DateUtil.offsetMonth(DateUtil.beginOfMonth(new Date()), -3);
|
|
|
+ operLogService.transferOperLogToHistory(transferDate);
|
|
|
+ return success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@InnerAuth
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody SysOperLog operLog)
|