|
@@ -1,9 +1,12 @@
|
|
|
package com.rongwei.bsserver.sys.controller;
|
|
|
|
|
|
|
|
|
+import com.rongwei.bscommon.sys.service.KbKnowledgeLedgerService;
|
|
|
+import com.rongwei.bscommon.sys.utils.ExceptionUtils;
|
|
|
+import com.rongwei.rwcommon.base.R;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -18,5 +21,23 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RequestMapping("/knowledgeLedger")
|
|
|
public class KbKnowledgeLedgerController {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private KbKnowledgeLedgerService kbKnowledgeLedgerService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 定时任务,每天凌晨执行一次,检查知识库台账中,文档状态(FILESTATUS)为:生效,并且失效时间(FAILTUREDATE)在今天之前 的文档,将状态改为:过期
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("/checkFailtureDate")
|
|
|
+ public R checkFailtureDate(){
|
|
|
+ try {
|
|
|
+ return kbKnowledgeLedgerService.checkFailtureDate();
|
|
|
+ }catch (Exception e){
|
|
|
+ ExceptionUtils.printExceptionDetail(e,"异常为:");
|
|
|
+ log.error(e.getMessage());
|
|
|
+ return R.error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|