Commit 1c5646cc by 章家宝

feat:删除无用代码

1 parent 37c18c70
package com.glsx.usedcar.task; package com.glsx.usedcar.task;
import com.glsx.usedcar.module.account.dao.AccountDao; 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 com.glsx.usedcar.module.account.service.AccountPreferenceService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List;
/** /**
* *
*/ */
...@@ -28,16 +24,16 @@ public class FixedAccountPreferenceSchedule { ...@@ -28,16 +24,16 @@ public class FixedAccountPreferenceSchedule {
* </pre> * </pre>
* *
*/ */
@Scheduled(initialDelay = 5000) // @Scheduled(initialDelay = 5000)
public void fixed() { // public void fixed() {
long start = System.currentTimeMillis(); // long start = System.currentTimeMillis();
try { // try {
List<Account> all = accountDao.findAll(); // List<Account> all = accountDao.findAll();
for (Account account : all) { // for (Account account : all) {
accountPreferenceService.addAccountPreferecneIfNot(account); // accountPreferenceService.addAccountPreferecneIfNot(account);
} // }
} catch (Exception e) { // } catch (Exception e) {
log.error("自动将所有的没有创建用户偏好的都给创建一下", 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!