| | |
| | | import com.ruoyi.device.camera.domain.ArdCameras; |
| | | import com.ruoyi.device.dhsdk.service.IDhClientService; |
| | | import com.ruoyi.device.hiksdk.service.IHikClientService; |
| | | import org.hibernate.validator.internal.util.stereotypes.Lazy; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @ClassName test |
| | | * @Description: |
| | | * @ClassName 异步登录 |
| | | * @Description: 由于流媒体多线程有问题,暂时不使用异步 |
| | | * @Author 刘苏义 |
| | | * @Date 2023/10/23 21:39 |
| | | * @Version 1.0 |
| | | */ |
| | | @Service |
| | | |
| | | public class AsyncLogin { |
| | | @Resource |
| | | IHikClientService hikClientService; |
| | |
| | | @Resource |
| | | IDhClientService dhClientService; |
| | | |
| | | @Async |
| | | @Async("loginExecutor") |
| | | public void hikLogin(ArdCameras ardCameras) { |
| | | hikClientService.login(ardCameras); |
| | | } |
| | | |
| | | @Async |
| | | |
| | | @Async("loginExecutor") |
| | | public void dhLogin(ArdCameras ardCameras) { |
| | | dhClientService.login(ardCameras); |
| | | } |
| | | } |
| | | } |