package com.ytpm.dao;

import com.ytpm.agent.model.YtPlatformUserApp;
import com.ytpm.agent.param.AppListParam;
import com.ytpm.agent.view.AgentAppView;
import com.ytpm.agent.view.AgentEnableAppView;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper
public interface AgentAppMapper {
    /**
     * 查询渠道启用的应用列表
     */
    List<AgentEnableAppView> getEnabledList(@Param("userId") String userId);

    /**
     * 查询应用列表
     */
    List<AgentAppView> searchAppList(AppListParam appListParam);

    /**
     * 查询APPList
     * @param appListParam
     * @return
     */
    List<AgentAppView> searchAppIdList(AppListParam appListParam);
    /**
     * 查询加盟商上架应用列表
     */
    List<YtPlatformUserApp> getIssuedAppList(@Param("userId") String userId);

    /**
     * 查询代理商子包ID
     */
    List<String> getApkIdList(@Param("userId") String userId);

    /**
     * 主键查询母包
     */
    YtPlatformUserApp selectByPrimaryKey(@Param("appId") String appId);
}
