/// <summary> /// 保存机构菜单权限 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <JsonResponse> SaveOrgMenu(OrganizationMenuRequestDto input) { var result = await GetAddOrRemoveOrganizationMenuRequest(input); var resJson = await _applicationEnginee.TryTransactionAsync(async() => { await _organizationMenuAppService.BatchCreateAsync(result.Item1); await _organizationMenuAppService.BatchRemoveAsync(result.Item2); }); return(resJson); }
/// <summary> /// 批量新增 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <JsonResponse> BatchCreate(OrganizationMenuBatchRequestDto input) { foreach (var organizationMenuRequestDto in input.OrganizationMenuRequestList) { organizationMenuRequestDto.InitCreateRequest(input.Payload); } var resJson = await _applicationEnginee.TryTransactionAsync(async() => { await _organizationMenuAppService.BatchCreateAsync(input.OrganizationMenuRequestList); }); return(resJson); }