class AppVersionServiceImpl extends ServiceImpl<AppVersionMapper, AppVersion> implements AppVersionService {

    @Override
    public AppVersion getAppVersion(String appType) {
        return this.baseMapper.getLatestVersion(appType);
    }

    @Override
    public boolean checkAppVersion(AppVersion appVersion) {<FILL_FUNCTION_BODY>}
}

        if (null == appVersion) {
            throw new ServiceException(ResultCode.APP_VERSION_PARAM_ERROR);
        }
        if (StringUtils.isBlank(appVersion.getType())) {
            throw new ServiceException(ResultCode.APP_VERSION_TYPE_ERROR);
        }
        //检测版本是否存在（同类型APP下版本不允许重复）
        if (null != this.getOne(new LambdaQueryWrapper<AppVersion>()
                .eq(AppVersion::getVersion, appVersion.getVersion())
                .eq(AppVersion::getType, appVersion.getType())
                .ne(appVersion.getId() != null, AppVersion::getId, appVersion.getId()))) {
            throw new ServiceException(ResultCode.APP_VERSION_EXIST);
        }
        return true;
    
<no_super_class>