门店号管理

dev_0531
LegnaYet 6 years ago
parent fb3891e740
commit ccf2d41974

@ -0,0 +1,25 @@
package com.kiisoo.ic.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
@Configuration
public class ScheduledTaskConfiguration implements SchedulingConfigurer {
/**
* Callback allowing a {@link TaskScheduler
* TaskScheduler} and specific {@link Task Task}
* instances to be registered against the given the {@link ScheduledTaskRegistrar}
*
* @param taskRegistrar the registrar to be configured.
*/
@Override
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
final ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
taskScheduler.setPoolSize(2);
taskScheduler.initialize();
taskRegistrar.setTaskScheduler(taskScheduler);
}
}

@ -7,7 +7,7 @@ import com.kiisoo.ic.utils.DateUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.Date;
@ -21,7 +21,7 @@ import static com.kiisoo.ic.system.constant.SysTaskConstant.*;
* @company kiisoo
* @details job 0 0 1 * * ?
*/
@Service
@Component
@Slf4j
public class StorePromotionDataJob {

@ -6,7 +6,7 @@ import com.kiisoo.ic.system.mapper.SysTaskDOMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.Date;
@ -14,7 +14,7 @@ import java.util.Random;
import static com.kiisoo.ic.system.constant.SysTaskConstant.*;
@Service
@Component
@Slf4j
public class SyncCountJobService {
@Autowired

Loading…
Cancel
Save