package com.skr.mdm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.skr.mdm.entity.MdmAppStoreDO;
import com.skr.mdm.bean.qo.app.AppStoreSearchQO;
import com.skr.mdm.bean.vo.app.ClientAppStoreVO;
import com.skr.mdm.bean.vo.app.MdmAppStoreNameVO;
import com.skr.mdm.bean.vo.app.MdmAppStoreVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 应用商店(MdmAppStore)表数据库访问层
 *
 * @author nfq
 * @since 2022-11-22 10:47:22
 */
@Repository
public interface MdmAppStoreDao extends BaseMapper<MdmAppStoreDO> {

    /**
     * 根据公司ID删除
     * @param companyId 公司ID
     */
    void deleteByCompanyId(@Param("companyId") Integer companyId);

    List<MdmAppStoreVO> listMdmAppStoreVO(AppStoreSearchQO appStoreSearchQO);

    List<MdmAppStoreNameVO> listMdmAppStoreNameVO(@Param("appName") String appName, @Param("companyId") Integer companyId);

    List<String> listFileUrl(@Param("list") List<Integer> appIdList, @Param("appCategory") Integer appCategory);

    List<ClientAppStoreVO> listClientAppStoreVO(@Param("equipmentId") Integer equipmentId,
                                                @Param("userId") Integer userId,
                                                @Param("departmentId") Integer departmentId,
                                                @Param("companyId") Integer companyId);
}