|
|
@@ -1,6 +1,6 @@
|
|
|
package com.uas.sso.timertask;
|
|
|
|
|
|
-import com.uas.sso.dao.UserRecordDao;
|
|
|
+import com.uas.sso.service.UserRecordService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
@@ -14,16 +14,12 @@ import org.springframework.stereotype.Component;
|
|
|
public class UserLockTimerTask {
|
|
|
|
|
|
@Autowired
|
|
|
- private UserRecordDao userRecordDao;
|
|
|
+ private UserRecordService userRecordService;
|
|
|
|
|
|
@Scheduled(cron = "0 0 0 * * *")
|
|
|
public void deleteAllLock() {
|
|
|
- try {
|
|
|
- userRecordDao.clearPwdErrorCount();
|
|
|
- System.out.println("锁定清除:"+System.currentTimeMillis());
|
|
|
- } catch (Exception e) {
|
|
|
-
|
|
|
- }
|
|
|
+ userRecordService.clearPwdErrorCount();
|
|
|
+ System.out.println("锁定清除:"+System.currentTimeMillis());
|
|
|
}
|
|
|
|
|
|
}
|