6 changed files with 90 additions and 2 deletions
@ -0,0 +1,37 @@ |
|||||
|
package com.qs.serve.task; |
||||
|
|
||||
|
import com.qs.serve.common.util.AuthContextUtils; |
||||
|
import com.qs.serve.modules.bms.controller.BmsRegion2Controller; |
||||
|
import com.qs.serve.modules.bms.controller.BmsRegionController; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
||||
|
import org.springframework.scheduling.annotation.Scheduled; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @author YenHex |
||||
|
* @since 2024/5/9 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Component |
||||
|
@AllArgsConstructor |
||||
|
@ConditionalOnProperty(value = "project.task", havingValue = "true") |
||||
|
public class BmsTask { |
||||
|
|
||||
|
private final BmsRegion2Controller bmsRegion2Controller; |
||||
|
private final BmsRegionController bmsRegionController; |
||||
|
|
||||
|
/** |
||||
|
* 更新树路径 |
||||
|
*/ |
||||
|
@Scheduled(cron="0 0 7,13 * * ?") |
||||
|
public void levelTask(){ |
||||
|
AuthContextUtils.setTenant("001"); |
||||
|
bmsRegionController.updateLevel(); |
||||
|
bmsRegion2Controller.updateLevel(); |
||||
|
//更新客户的关联区域的列
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue