Exemple #1
0
        public async Task ModifyAppStarAsync(Int32 userId, Int32 appId, Int32 starCount)
        {
            Check.IfNullOrZero(userId);
            Check.IfNullOrZero(appId);
            Check.IfNullOrZero(starCount, true);

            var isInstall = await _appContext.IsInstallAppAsync(userId, appId);

            if (!isInstall)
            {
                throw new BusinessException("您还没有安装这个App,因此不能打分");
            }
            await _appContext.ModifyAppStarAsync(userId, appId, starCount);
        }