Commit 1c5646cc by 章家宝

feat:删除无用代码

1 parent 37c18c70
package com.glsx.usedcar.task;
import com.glsx.usedcar.module.account.dao.AccountDao;
import com.glsx.usedcar.module.account.entity.Account;
import com.glsx.usedcar.module.account.service.AccountPreferenceService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.List;
/**
*
*/
......@@ -28,16 +24,16 @@ public class FixedAccountPreferenceSchedule {
* </pre>
*
*/
@Scheduled(initialDelay = 5000)
public void fixed() {
long start = System.currentTimeMillis();
try {
List<Account> all = accountDao.findAll();
for (Account account : all) {
accountPreferenceService.addAccountPreferecneIfNot(account);
}
} catch (Exception e) {
log.error("自动将所有的没有创建用户偏好的都给创建一下", e);
}
}
// @Scheduled(initialDelay = 5000)
// public void fixed() {
// long start = System.currentTimeMillis();
// try {
// List<Account> all = accountDao.findAll();
// for (Account account : all) {
// accountPreferenceService.addAccountPreferecneIfNot(account);
// }
// } catch (Exception e) {
// log.error("自动将所有的没有创建用户偏好的都给创建一下", e);
// }
// }
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!