package com.dy.pipIrrWechat.video; import com.dy.common.webUtil.QueryResultVo; import com.dy.pipIrrGlobal.daoVi.ViCameraMapper; import com.dy.pipIrrGlobal.daoVi.ViYsAppMapper; import com.dy.pipIrrGlobal.pojoVi.ViYsApp; import com.dy.pipIrrGlobal.voVi.VoCamera; import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.common.utils.PojoUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; /** * @Author: liurunyu * @Date: 2025/8/14 13:58 * @Description */ @Slf4j @Service public class VideoSv { @Autowired private ViCameraMapper dao; @Autowired protected ViYsAppMapper viYsAppDao ; /** * 查询所有 * @return 实体记录列表 */ public List allCamera() { return dao.selectAll4Monitor() ; } /** * 分页查询摄像头信息 * @param queryQo 查询条件 * @return 分页结果 */ public QueryResultVo> some(VideoQo queryQo) { Map params = (Map) PojoUtils.generalize(queryQo); Long itemTotal = dao.selectTotal4Monitor(params); QueryResultVo> rsVo = new QueryResultVo<>(); rsVo.pageSize = queryQo.getPageSize(); rsVo.pageCurr = queryQo.getPageCurr(); rsVo.calculateAndSet(itemTotal, params); rsVo.obj = dao.selectSome4Monitor(params); return rsVo; } public ViYsApp ysApp(){ List all = this.viYsAppDao.selectAll() ; if(all == null || all.size() == 0){ return null ; }else{ return all.get(0) ; } } }