Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1c5646cc
authored
Apr 08, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:删除无用代码
1 parent
37c18c70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
aus-task/src/main/java/com/glsx/usedcar/task/FixedAccountPreferenceSchedule.java
aus-task/src/main/java/com/glsx/usedcar/task/FixedAccountPreferenceSchedule.java
View file @
1c5646c
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);
}
//
}
}
//
}
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment