Exemple #1
0
        public async Task InstallAppAsync(Int32 userId, Int32 appId, Int32 deskNum)
        {
            Check.IfNullOrZero(userId);
            Check.IfNullOrZero(appId);
            Check.IfNullOrZero(deskNum);
            var app = await _appContext.InstallAsync(userId, appId, deskNum);

            await CacheHelper.RemoveKeyWhenModify(new DesktopCacheKey(userId));

            await _commonNotify.SendNotify(userId, new Notify("应用安装提醒", $@"您选择的 {app.Name} 已安装成功", 0, userId));
        }
        public async Task UninstallMemberAsync(Int32 userId, Int32 memberId)
        {
            Check.IfNullOrZero(userId);
            Check.IfNullOrZero(memberId);
            var app = await _memberContext.UninstallMemberAsync(userId, memberId);

            await CacheHelper.RemoveKeyWhenModify(new DesktopCacheKey(userId));

            if (app != null)
            {
                await _commonNotify.SendNotify(userId, new Notify("应用卸载提醒", $@"您安装的应用 {app.Name} 已卸载完成", 0, userId));
            }
        }