package com.ruoyi.interfaces.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.interfaces.domain.PtService;
import com.ruoyi.interfaces.domain.vo.MdModelInfoVo;
import com.ruoyi.interfaces.domain.vo.PtServiceVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@DataSource(DataSourceType.SLAVE)
public interface PtServiceMapper extends BaseMapper<PtService> {

    /**
     * 添加数据
     *
     * @param record
     * @return
     */
    int insert(PtService record);

    /**
     * 查询数据列表
     *
     * @param ptService
     * @return
     */
    List<PtService> selectAll(PtService ptService);

    List<PtServiceVo> listByUserService(PtService ptService);

    List<PtService> selectAllColumns(PtService ptService);

    List<PtService> selectAllPublic(PtService ptService);

    /**
     * 根据主键获取数据
     *
     * @param srvId
     * @return
     */
    PtService selectByPrimaryKey(String srvId);

    /**
     * 根据主键更新数据
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(PtService record);

    /**
     * 根据主键删除数据
     *
     * @param srvId
     * @return
     */
    int deleteByPrimaryKey(String srvId);

    List<PtService> listOfCntTop10();

    List<PtService> listOfTmTop20();

    MdModelInfoVo selectModelService(MdModelInfoVo par);

    int audit(@Param("srvIds") String[] srvIds, @Param("audit") String audit);

 /*   int insertSelective(PtServiceWithBLOBs record);

    PtServiceWithBLOBs selectByPrimaryKey(String srvId);

    int updateByPrimaryKeySelective(PtServiceWithBLOBs record);

    int updateByPrimaryKeyWithBLOBs(PtServiceWithBLOBs record);

    int updateByPrimaryKey(PtService record);*/
}
