Commit e5c28071 authored by renjie's avatar renjie

iplist bug

parent 64ad409c
...@@ -13,7 +13,7 @@ public interface IpResourceRepository extends MongoRepository<IpResource, String ...@@ -13,7 +13,7 @@ public interface IpResourceRepository extends MongoRepository<IpResource, String
IpResource findByAddrAndIsDeleted(String addr, boolean isDeleted); IpResource findByAddrAndIsDeleted(String addr, boolean isDeleted);
IpResource findByIdAndIsDeleted(String id, boolean isDeleted); IpResource findByIdAndIsDeleted(String id, boolean isDeleted);
List<IpResource> findByIdInAndIsDeleted(List<String> ipIds, boolean isDeleted); List<IpResource> findByIdInAndIsDeleted(List<String> ipIds, boolean isDeleted);
Page<IpResource> findByIdInAndIsDeleted(List<String> ipIds, boolean isDeleted, Pageable pageable); Page<IpResource> findByIdInAndIsDeletedOrderByPurchasedTimeDesc(List<String> ipIds, boolean isDeleted, Pageable pageable);
List<IpResource> findByOwnerAndIsDeletedAndShopIdIsNull(String owner, boolean isDeleted); List<IpResource> findByOwnerAndIsDeletedAndShopIdIsNull(String owner, boolean isDeleted);
List<IpResource> findByOwnerAndStatusAndIsDeletedAndShopIdIsNull(String owner, int status, boolean isDeleted); List<IpResource> findByOwnerAndStatusAndIsDeletedAndShopIdIsNull(String owner, int status, boolean isDeleted);
List<IpResource> findByStatusAndIdInAndIsDeleted(int status, List<String> ipIds, boolean isDeleted); List<IpResource> findByStatusAndIdInAndIsDeleted(int status, List<String> ipIds, boolean isDeleted);
......
...@@ -299,7 +299,7 @@ public class IpResourceServiceImpl implements IpResourceService { ...@@ -299,7 +299,7 @@ public class IpResourceServiceImpl implements IpResourceService {
ipTransactionRepository.save(ipTransaction); ipTransactionRepository.save(ipTransaction);
} }
IpChargeRequestDto ipChargeRequestDto = buildIpChargeRequestDto(ipResourceRequestDto, 1); IpChargeRequestDto ipChargeRequestDto = buildIpChargeRequestDto(ipResourceRequestDto, 0);
accountService.chargeByMoney(username, newprice * ipChargeRequestDto.getAmount(), ipChargeRequestDto); accountService.chargeByMoney(username, newprice * ipChargeRequestDto.getAmount(), ipChargeRequestDto);
return ipTransactionDto; return ipTransactionDto;
} }
...@@ -532,7 +532,7 @@ public class IpResourceServiceImpl implements IpResourceService { ...@@ -532,7 +532,7 @@ public class IpResourceServiceImpl implements IpResourceService {
else if (ipFilterDto != null && StringUtils.isNotBlank(ipFilterDto.getVendor())) { else if (ipFilterDto != null && StringUtils.isNotBlank(ipFilterDto.getVendor())) {
ipResources1 = ipResourceRepository.findByVendorLikeAndIdInAndIsDeletedOrderByPurchasedTimeDesc(ipFilterDto.getVendor(), allIpIds, false, pageable); ipResources1 = ipResourceRepository.findByVendorLikeAndIdInAndIsDeletedOrderByPurchasedTimeDesc(ipFilterDto.getVendor(), allIpIds, false, pageable);
} else { } else {
ipResources1 = ipResourceRepository.findByIdInAndIsDeleted(allIpIds, false, pageable); ipResources1 = ipResourceRepository.findByIdInAndIsDeletedOrderByPurchasedTimeDesc(allIpIds, false, pageable);
} }
if (ipResources1 != null) { if (ipResources1 != null) {
ipResources1.getContent().forEach(x -> { ipResources1.getContent().forEach(x -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment