package com.chushang.inspection.terminal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chushang.datascope.annotation.DataScope;
import com.chushang.inspection.project.vo.CountVO;
import com.chushang.inspection.project.vo.TerminalAppVO;
import com.chushang.inspection.terminal.po.Store;
import com.chushang.inspection.terminal.po.Terminal;
import com.chushang.inspection.terminal.query.TerminalAppQuery;
import com.chushang.inspection.terminal.query.TerminalQuery;
import com.chushang.inspection.terminal.vo.StoreTerminalVO;
import com.chushang.inspection.terminal.vo.TerminalVO;
import com.chushang.inspection.work.dto.DispatchDTO;
import com.chushang.inspection.work.query.DispatchQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
  * @auther: zhao
  * @date: 2024/6/21 16:39
  */
public interface TerminalMapper extends BaseMapper<Terminal> {
    @DataScope(deptAlias = "t")
    List<StoreTerminalVO> pageList(@Param("query") TerminalQuery query,
                                   Page<StoreTerminalVO> page);
    @DataScope(deptAlias = "t")
    List<TerminalAppVO> selectPageApp(@Param("query") TerminalAppQuery query, Page<TerminalAppVO> page);

    @DataScope(deptAlias = "t")
    List<DispatchDTO> getStoreByTasKIdOrIds(@Param("query") DispatchQuery query);

    List<CountVO> countByProjectIds(@Param("projectIds") Set<Long> projectIds);
}
