Skip to content

Commit

Permalink
update to abp 3.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrytang67 committed Jul 27, 2020
1 parent a2c5fad commit a00ca74
Show file tree
Hide file tree
Showing 37 changed files with 205 additions and 188 deletions.
4 changes: 2 additions & 2 deletions angular/src/app/identity/store/permissions.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class PermissionsService {
}

getPermissions(params = {}): Observable<PermissionResponse> {
return this.http.request<PermissionResponse>('get', "/api/abp/permissions/get", { params })
return this.http.request<PermissionResponse>('get', "/api/permission-management/permissions", { params })
.pipe(
tap(res => {
console.log(res.groups)
Expand All @@ -29,6 +29,6 @@ export class PermissionsService {
params: { providerKey: params.providerKey, providerName: params.providerName },
body: params.body
};
return this.http.request<any>('put', "/api/abp/permissions/update", options);
return this.http.request<any>('put', "/api/permission-management/permissions", options);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Caching" Version="2.9.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Caching" Version="3.0.4" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.4" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions backEnd/modules/TT.Abp.AppManagement/TT.Abp.AppManagement.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Caching" Version="2.9.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Localization" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Caching" Version="3.0.4" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Localization" Version="3.0.4" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions backEnd/modules/TT.Abp.Audit/TT.Abp.AuditManagement.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.9.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="2.9.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.6" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion backEnd/modules/TT.Abp.Cms/TT.Abp.Cms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.4" />
</ItemGroup>

</Project>
28 changes: 14 additions & 14 deletions backEnd/modules/TT.Abp.Core/TT.Abp.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0"/>
<PackageReference Include="MediatR" Version="8.0.1"/>
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="8.0.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.5"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.5"/>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.9.0"/>
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="2.9.0"/>
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="2.9.0"/>
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.9.0"/>
<PackageReference Include="Volo.Abp.Core" Version="2.9.0"/>
<PackageReference Include="Volo.Abp.Ddd.Application" Version="2.9.0"/>
<PackageReference Include="Volo.Abp.Guids" Version="2.9.0"/>
<PackageReference Include="Volo.Abp.Users.Domain" Version="2.9.0"/>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="MediatR" Version="8.0.2" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.6" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Core" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Guids" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Users.Domain" Version="3.0.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TT.Extensions\TT.Extensions.csproj"/>
<ProjectReference Include="..\TT.Extensions\TT.Extensions.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Http.Client" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using TT.Abp.Mall.Domain.Addresses;
using TT.Abp.Mall.Domain.Users;
using Volo.Abp.EventBus.Local;
using Volo.Abp.Linq;

namespace TT.Abp.Mall.Application.Addresses
{
Expand All @@ -29,14 +30,17 @@ public interface IAddressAppService : ICrudAppService<
public class AddressAppService
: CrudAppService<Address, AddressDto, Guid, PagedAndSortedResultRequestDto, AddressCreateOrUpdateDto, AddressCreateOrUpdateDto>, IAddressAppService
{
private readonly IAsyncQueryableExecuter _asyncQueryableExecuter;
protected IMallUserLookupService UserLookupService { get; }

public AddressAppService(
IRepository<Address, Guid> repository,
IMallUserLookupService userLookupService
IMallUserLookupService userLookupService,
IAsyncQueryableExecuter asyncQueryableExecuter
)
: base(repository)
{
_asyncQueryableExecuter = asyncQueryableExecuter;
UserLookupService = userLookupService;

base.CreatePolicyName = MallPermissions.Addresses.Create;
Expand All @@ -50,12 +54,12 @@ public override async Task<PagedResultDto<AddressDto>> GetListAsync(PagedAndSort

var query = CreateFilteredQuery(input);

var totalCount = await AsyncQueryableExecuter.CountAsync(query);
var totalCount = await _asyncQueryableExecuter.CountAsync(query);

query = ApplySorting(query, input);
query = ApplyPaging(query, input);

var entities = await AsyncQueryableExecuter.ToListAsync(query);
var entities = await _asyncQueryableExecuter.ToListAsync(query);

var addresslist = new PagedResultDto<AddressDto>(
totalCount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using TT.Abp.Mall.Domain.Comments;
using Volo.Abp.Linq;


namespace TT.Abp.Mall.Application.Comments
Expand All @@ -22,8 +23,14 @@ public class CommentAppService :
CrudAppService<Comment, CommentDto, Guid, MallRequestDto, CommentCreateOrUpdateDto, CommentCreateOrUpdateDto>,
ICommentAppService
{
public CommentAppService(IRepository<Comment, Guid> repository) : base(repository)
private readonly IAsyncQueryableExecuter _asyncQueryableExecuter;

public CommentAppService(
IRepository<Comment, Guid> repository,
IAsyncQueryableExecuter asyncQueryableExecuter
) : base(repository)
{
_asyncQueryableExecuter = asyncQueryableExecuter;
}

[Authorize]
Expand Down Expand Up @@ -83,7 +90,7 @@ public async Task<PagedResultDto<CommentDto>> GetPublishListAsync(MallRequestDto

query = query.PageBy(input);

var entities = await AsyncQueryableExecuter.ToListAsync(query);
var entities = await _asyncQueryableExecuter.ToListAsync(query);

return new PagedResultDto<CommentDto>(
totalCount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Linq;

namespace TT.Abp.Mall.Application.Coupons
{
Expand All @@ -18,13 +19,16 @@ public interface ICouponAppService
public class CouponAppService : CrudAppService<Coupon, CouponDto, Guid, MallRequestDto, CouponCreateOrUpdateDto, CouponCreateOrUpdateDto>, ICouponAppService
{
private readonly IRepository<UserCoupon, Guid> _userCouponRepository;
private readonly IAsyncQueryableExecuter _asyncQueryableExecuter;

public CouponAppService(
IRepository<Coupon, Guid> repository,
IRepository<UserCoupon, Guid> userCouponRepository
IRepository<UserCoupon, Guid> userCouponRepository,
IAsyncQueryableExecuter asyncQueryableExecuter
) : base(repository)
{
_userCouponRepository = userCouponRepository;
_asyncQueryableExecuter = asyncQueryableExecuter;
base.GetListPolicyName = MallPermissions.Coupons.Default;
base.CreatePolicyName = MallPermissions.Coupons.Create;
base.UpdatePolicyName = MallPermissions.Coupons.Update;
Expand All @@ -36,11 +40,11 @@ public async Task<ListResultDto<CouponDto>> GetPublishListAsync(MallRequestDto i
{
var query = base.CreateFilteredQuery(input);

var totalCount = await AsyncQueryableExecuter.CountAsync(query);
var totalCount = await _asyncQueryableExecuter.CountAsync(query);

query = ApplySorting(query, input);

var entities = await AsyncQueryableExecuter.ToListAsync(query);
var entities = await _asyncQueryableExecuter.ToListAsync(query);

var result = new ListResultDto<CouponDto>(
entities.Select(MapToGetListOutputDto).ToList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Linq;

namespace TT.Abp.Mall.Application.Coupons
{
Expand All @@ -17,8 +18,14 @@ public interface IUserCouponAppService

public class UserCouponAppService : CrudAppService<UserCoupon, UserCouponDto, Guid, CouponResultRequestDto, UserCouponCreateOrUpdateDto, UserCouponCreateOrUpdateDto>, IUserCouponAppService
{
public UserCouponAppService(IRepository<UserCoupon, Guid> repository) : base(repository)
private readonly IAsyncQueryableExecuter _asyncQueryableExecuter;

public UserCouponAppService(
IRepository<UserCoupon, Guid> repository,
IAsyncQueryableExecuter asyncQueryableExecuter
) : base(repository)
{
_asyncQueryableExecuter = asyncQueryableExecuter;
}

public override Task<PagedResultDto<UserCouponDto>> GetListAsync(CouponResultRequestDto input)
Expand All @@ -33,11 +40,11 @@ public async Task<ListResultDto<UserCouponDto>> GetPublicListAsync(CouponResultR
var query = base.CreateFilteredQuery(input)
.Where(x => x.OwnerUserId == CurrentUser.Id);

var totalCount = await AsyncQueryableExecuter.CountAsync(query);
var totalCount = await _asyncQueryableExecuter.CountAsync(query);

query = ApplySorting(query, input);

var entities = await AsyncQueryableExecuter.ToListAsync(query);
var entities = await _asyncQueryableExecuter.ToListAsync(query);

return new ListResultDto<UserCouponDto>(
entities.Select(MapToGetListOutputDto).ToList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using TT.RabbitMQ;
using Volo.Abp;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Linq;
using Volo.Abp.Settings;

namespace TT.Abp.Mall.Application.Orders
Expand All @@ -43,6 +44,7 @@ public class ProductOrderAppService :
private readonly ISettingProvider _setting;
private readonly IHttpContextAccessor _httpContext;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAsyncQueryableExecuter _asyncQueryableExecuter;
private readonly IAppProvider _appProvider;
private readonly RabbitMqPublisher _rabbit;
private readonly IMediator _mediator;
Expand All @@ -56,6 +58,7 @@ public ProductOrderAppService(
ISettingProvider setting,
IHttpContextAccessor httpContext,
IHttpContextAccessor httpContextAccessor,
IAsyncQueryableExecuter asyncQueryableExecuter,
IAppProvider appProvider,
RabbitMqPublisher rabbit,
IMediator mediator
Expand All @@ -67,6 +70,7 @@ IMediator mediator
_setting = setting;
_httpContext = httpContext;
_httpContextAccessor = httpContextAccessor;
_asyncQueryableExecuter = asyncQueryableExecuter;
_appProvider = appProvider;
_rabbit = rabbit;
_mediator = mediator;
Expand Down Expand Up @@ -222,13 +226,13 @@ public async Task<PagedResultDto<ProductOrderDto>> GetPublicListAsync(MallReques
.WhereIf(input.State.HasValue && input.State == 4, x => x.PayType != MallEnums.PayType.未支付 && x.State == MallEnums.OrderState.售后)
;

var totalCount = await AsyncQueryableExecuter.CountAsync(query);
var totalCount = await _asyncQueryableExecuter.CountAsync(query);

query = ApplySorting(query, input);

query = ApplyPaging(query, input);

var entities = await AsyncQueryableExecuter.ToListAsync(query);
var entities = await _asyncQueryableExecuter.ToListAsync(query);

var result = new PagedResultDto<ProductOrderDto>(
totalCount,
Expand Down
10 changes: 5 additions & 5 deletions backEnd/modules/TT.Abp.Mall/TT.Abp.Mall.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.9.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Http.Client" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Users.EntityFrameworkCore" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Http.Client" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Users.EntityFrameworkCore" Version="3.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Core" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Core" Version="3.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 7 additions & 7 deletions backEnd/modules/TT.Abp.Shops/TT.Abp.Shops.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="2.9.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="2.9.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.6" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="3.0.4" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="3.0.4" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="2.9.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.9.0" />
<PackageReference Include="Volo.Abp.Core" Version="2.9.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.6" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="3.0.4" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="3.0.4" />
<PackageReference Include="Volo.Abp.Core" Version="3.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit a00ca74

Please sign in to comment.