package com.palmnest.dao.estateserve;

import com.palmnest.dao.GenericDao;
import com.palmnest.model.estateserve.AppUseVersion;

import java.util.List;

public interface AppUseVersionDao extends GenericDao<AppUseVersion, Long> {
    /**
     * 获取最新一条版本记录
     *
     * @param type 1安卓2ios
     * @return
     */
    AppUseVersion getLatestRecode(String useCode, String type);

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

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