|
|
@@ -557,6 +557,9 @@ public class OrderService {
|
|
|
|
|
|
@Scheduled(fixedRate = 30000)
|
|
|
public void batchCancel() {
|
|
|
+ if (generalProperties.isNotifyServer()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (Arrays.asList(env.getActiveProfiles()).contains("dev")) {
|
|
|
return;
|
|
|
}
|
|
|
@@ -595,6 +598,9 @@ public class OrderService {
|
|
|
|
|
|
@Scheduled(fixedRate = 120000)
|
|
|
public void setSales() {
|
|
|
+ if (generalProperties.isNotifyServer()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
List<User> minters = userRepo.findByAuthoritiesContains(Authority.get(AuthorityName.ROLE_MINTER));
|
|
|
for (User minter : minters) {
|
|
|
userRepo.setSales(minter.getId(), (int) orderRepo.countSales(minter.getId()));
|