package com.palmnest.service.appVersion.manager;

import com.palmnest.model.estateserve.AppUseVersion;
import com.palmnest.service.GenericManager;

import java.util.List;

public interface AppUseVersionManager extends GenericManager<AppUseVersion, Long> {

    /**
     * 获取最新一条版本记录
     *
     * @param type    1安卓 2ios
     * @param useCode 应用编码
     * @return
     */
    AppUseVersion getLatestRecode(String useCode, String type) throws Exception;

    /**
     * 根据应用类型修改历史的app版本记录的状态以及是否最新一条
     *
     * @param type
     * @return
     * @throws Exception
     */
    int updateRecodeByType(String type, String useCode) throws Exception;

    List<AppUseVersion> getByRecode(String useCode, String type);
}
