AppVersionService.java 1.28 KB
package com.brframework.webapppatch.service;

import com.brframework.commondb.core.EntityService;
import com.brframework.webapppatch.entity.AppVersion;

/**
 * App版本更新
 * @author xu
 * @date 2019/11/14 21:15
 */
public interface AppVersionService extends EntityService<AppVersion, Long, Object> {

    /**
     * 创建新版本
     * @param os               系统
     * @param version           版本
     * @param versionName       版本名称
     * @param versionMessage    版本信息
     * @param versionUrl        版本下载地址
     * @param updateType        版本更新类型
     */
    void createVersion(String os, String version, String versionName, String versionMessage,
                       String versionUrl, Integer updateType);

    /**
     * 获取当前最新版本信息
     * 灰度用户将获得最新的灰度版本
     * @param os
     * @param username      用于识别是否是灰度用户
     * @return
     */
    AppVersion getVersion(String os, String username);

    /**
     * 版本进入灰度状态
     * @param id
     */
    void setVersionGray(Long id);

    /**
     * 版本发布
     * @param id
     */
    void setVersionRelease(Long id);

    /**
     * 版本失败
     * @param id
     */
    void setVersionDefeated(Long id);

}