예제 #1
0
        public async Task <string> Update(UpdateUserGroupInput input)
        {
            input.CheckDataAnnotations().CheckValidResult();
            await _userGroupDomainService.Update(input);

            return("更新用户组成功");;
        }
예제 #2
0
        public async Task <string> Update(UpdateUserGroupInput input)
        {
            //_session.CheckLoginUserDataPermision(input.DataPermissionType,"您设置的用户组的数据权限大于您拥有数据权限,系统不允许该操作");
            input.CheckDataAnnotations().CheckValidResult();
            CheckIsAllOrg(input);
            await _userGroupDomainService.Update(input);

            return("更新用户组成功");

            ;
        }
예제 #3
0
        public async Task <string> Update(UpdateUserGroupInput input)
        {
            input.CheckDataAnnotations().CheckValidResult();
            var userGroup = await _userGroupRepository.SingleOrDefaultAsync(p => p.Id == input.Id);

            if (userGroup == null)
            {
                throw new BusinessException($"不存在Id为{input.Id}的用户组");
            }
            userGroup = input.MapTo(userGroup);
            await _userGroupRepository.UpdateAsync(userGroup);

            return("更新用户组成功");
        }