Commit ee6d20fa authored by renjie's avatar renjie

子用户购买ip权限修改

parent 25071643
......@@ -367,8 +367,8 @@ public class PaymentServiceImpl implements PaymentService {
Account byName = accountService.findByName(username);
if (byName == null )
throw new ClientRequestException(AccountErrorCode.NAMENOTEXIST, "account does not exist: " + username);
// if (byName.getPermission() < 8)
// throw new ClientRequestException(AccountErrorCode.NOPERMISSION, "account does not have permission: " + username);
if (byName.getPermission() < 4)
throw new ClientRequestException(AccountErrorCode.NOPERMISSION, "account does not have permission: " + username);
boolean isVpsClient = true;
UserPayment internalOrder = new UserPayment();
......@@ -421,8 +421,8 @@ public class PaymentServiceImpl implements PaymentService {
Account byName = accountService.findByName(username);
if (byName == null)
throw new ClientRequestException(AccountErrorCode.NAMENOTEXIST, "account does not exist: " + username);
// if (byName.getPermission() < 8)
// throw new ClientRequestException(AccountErrorCode.NOPERMISSION, "account does not have permission: " + username);
if (byName.getPermission() < 4)
throw new ClientRequestException(AccountErrorCode.NOPERMISSION, "account does not have permission: " + username);
boolean isVpsClient = true;
......
......@@ -198,7 +198,7 @@ public class IpResourceServiceImpl implements IpResourceService {
Account account = accountRepository.findByName(username);
if (account == null)
throw new ClientRequestException(AccountErrorCode.NAMENOTEXIST);
if (account.getPermission() < 8)
if (account.getPermission() < 4)
throw new ClientRequestException(AccountErrorCode.NOPERMISSION);
Map<String, List<String>> priceList = ipOptionsRepository.findAll().get(0).getIpPlatForm();
......
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