将检查定时消息的任务由admin移到portal

This commit is contained in:
lzh
2023-03-19 20:27:32 +08:00
parent 90334e8ede
commit 856c88ecde
8 changed files with 420 additions and 11 deletions

View File

@@ -14,7 +14,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@MapperScan({"com.zscat.mallplus.mapper", "com.zscat.mallplus.ums.mapper", "com.zscat.mallplus.sms.mapper", "com.zscat.mallplus.cms.mapper", "com.zscat.mallplus.sys.mapper", "com.zscat.mallplus.oms.mapper", "com.zscat.mallplus.pms.mapper"})
@EnableTransactionManagement
@EnableScheduling
// @EnableScheduling
public class MallAdminApplication {
public static void main(String[] args) {
SpringApplication.run(MallAdminApplication.class, args);

View File

@@ -47,13 +47,13 @@ import java.util.Date;
* @version 1.0
* @since 1.0
*/
@Component
// @Component
public class SchedulingTaskComponent {
@Autowired
private SysMessageTaskService sysMessageTaskService;
@Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 */5 * * * ?")
public void remindVehicle() {
sysMessageTaskService.checkTask();
}