Merge pull request #152 from LQYBill/fix/poProductAvailableNull

fix: null error /completeFeesEstimation
pull/8523/head
Qiuyi LI 2025-04-17 14:36:04 +02:00 committed by GitHub
commit d44ad24c9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ public class ShiroRealm extends AuthorizingRealm {
loginUser = this.checkUserTokenIsEffect(token); loginUser = this.checkUserTokenIsEffect(token);
} catch (AuthenticationException e) { } catch (AuthenticationException e) {
JwtUtil.responseError(SpringContextUtils.getHttpServletResponse(),401,e.getMessage()); JwtUtil.responseError(SpringContextUtils.getHttpServletResponse(),401,e.getMessage());
e.printStackTrace(); //e.printStackTrace();
return null; return null;
} }
return new SimpleAuthenticationInfo(loginUser, token, getName()); return new SimpleAuthenticationInfo(loginUser, token, getName());

View File

@ -920,7 +920,7 @@ public class InvoiceController {
// only calculate purchase estimation if products are not available and purchaseInvoiceNumber is null, else it's already been paid // only calculate purchase estimation if products are not available and purchaseInvoiceNumber is null, else it's already been paid
List<String> orderIdsWithProductUnavailable = entry.getValue().stream() List<String> orderIdsWithProductUnavailable = entry.getValue().stream()
.filter( .filter(
order -> order.getProductAvailable().equals("0") order -> (order.getProductAvailable() == null || order.getProductAvailable().equals("0"))
&& order.getPurchaseInvoiceNumber() == null && order.getPurchaseInvoiceNumber() == null
&& order.getVirtualProductAvailable().equals("0")) && order.getVirtualProductAvailable().equals("0"))
.map(PlatformOrder::getId).collect(Collectors.toList()); .map(PlatformOrder::getId).collect(Collectors.toList());