package ink.wgink.login.app.dao.appversion;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.interfaces.init.IInitBaseTable;
import ink.wgink.login.app.pojo.dtos.appversion.AppVersionDTO;
import ink.wgink.login.app.pojo.pos.appversion.AppVersionPO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IAppDeviceDao
 * @Description: app设备
 * @Author: wanggeng
 * @Date: 2021/4/7 4:22 下午
 * @Version: 1.0
 */
@Repository
public interface IAppVersionDao extends IInitBaseTable {

    /**
     * 新增app版本
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * 删除app版本
     *
     * @param params
     * @throws RemoveException
     */
    void remove(Map<String, Object> params) throws RemoveException;

    /**
     * 修改app版本
     *
     * @param params
     * @throws UpdateException
     */
    void update(Map<String, Object> params) throws UpdateException;

    /**
     * 更新下载次数
     *
     * @param appVersionId
     * @throws UpdateException
     */
    void updateDownloadCount(String appVersionId) throws UpdateException;

    /**
     * 更新APP接口锁定状态
     *
     * @param params
     * @throws UpdateException
     */
    void updateApiLock(Map<String, Object> params) throws UpdateException;

    /**
     * 更新APP的发布状态
     *
     * @param params
     * @throws UpdateException
     */
    void updateRelease(Map<String, Object> params) throws UpdateException;

    /**
     * app版本列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<AppVersionDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * 详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    AppVersionDTO get(Map<String, Object> params) throws SearchException;

    /**
     * app版本列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<AppVersionPO> listPO(Map<String, Object> params) throws SearchException;

    /**
     * 详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    AppVersionPO getPO(Map<String, Object> params) throws SearchException;

}
