@ -191,6 +191,21 @@ public class OrderController {
}
}
}
// 来源类型 1:平台自建 2:团油
if ( store . getSourceType ( ) . equals ( MerchantStoreSourceType . type3 . getNumber ( ) ) ) {
BigDecimal account = new BigDecimal ( "0" ) ;
// 查询账号余额
HighMerchantAccount merAccount = merchantAccountService . getStoreAccountDetail ( store . getMerchantId ( ) ) ;
if ( merAccount ! = null ) {
account = merAccount . getAmounts ( ) . subtract ( merchantAccountService . countMerGasOilAmount ( store . getMerchantId ( ) ) ) ;
}
// 客户加油金额 大于 商户账号余额
if ( order . getTotalPrice ( ) . compareTo ( account ) = = 1 ) {
log . error ( "OrderController --> orderToPay() ERROR" , "暂时无法进行支付,请联系平台客服" ) ;
throw ErrorHelp . genException ( SysCode . System , ErrorCode . COMMON_ERROR , "暂时无法进行支付,请联系平台客服" ) ;
}
}
}
}
@ -531,6 +546,20 @@ public class OrderController {
}
}
}
// 来源类型 1:平台自建 2:团油
if ( store . getSourceType ( ) . equals ( MerchantStoreSourceType . type3 . getNumber ( ) ) ) {
BigDecimal account = new BigDecimal ( "0" ) ;
// 查询账号余额
HighMerchantAccount merAccount = merchantAccountService . getStoreAccountDetail ( store . getMerchantId ( ) ) ;
if ( merAccount ! = null ) {
account = merAccount . getAmounts ( ) . subtract ( merchantAccountService . countMerGasOilAmount ( store . getMerchantId ( ) ) ) ;
}
// 客户加油金额 大于 商户账号余额
if ( order . getTotalPrice ( ) . compareTo ( account ) = = 1 ) {
log . error ( "OrderController --> orderToPay() ERROR" , "暂时无法进行支付,请联系平台客服" ) ;
throw ErrorHelp . genException ( SysCode . System , ErrorCode . COMMON_ERROR , "暂时无法进行支付,请联系平台客服" ) ;
}
}
}
}
@ -643,6 +672,20 @@ public class OrderController {
}
}
}
// 来源类型 1:平台自建 2:团油
if ( store . getSourceType ( ) . equals ( MerchantStoreSourceType . type3 . getNumber ( ) ) ) {
BigDecimal account = new BigDecimal ( "0" ) ;
// 查询账号余额
HighMerchantAccount merAccount = merchantAccountService . getStoreAccountDetail ( store . getMerchantId ( ) ) ;
if ( merAccount ! = null ) {
account = merAccount . getAmounts ( ) . subtract ( merchantAccountService . countMerGasOilAmount ( store . getMerchantId ( ) ) ) ;
}
// 客户加油金额 大于 商户账号余额
if ( order . getTotalPrice ( ) . compareTo ( account ) = = 1 ) {
log . error ( "OrderController --> orderToPay() ERROR" , "暂时无法进行支付,请联系平台客服" ) ;
throw ErrorHelp . genException ( SysCode . System , ErrorCode . COMMON_ERROR , "暂时无法进行支付,请联系平台客服" ) ;
}
}
}
}
@ -735,6 +778,20 @@ public class OrderController {
}
}
}
// 来源类型 1:平台自建 2:团油
if ( store . getSourceType ( ) . equals ( MerchantStoreSourceType . type3 . getNumber ( ) ) ) {
BigDecimal account = new BigDecimal ( "0" ) ;
// 查询账号余额
HighMerchantAccount merAccount = merchantAccountService . getStoreAccountDetail ( store . getMerchantId ( ) ) ;
if ( merAccount ! = null ) {
account = merAccount . getAmounts ( ) . subtract ( merchantAccountService . countMerGasOilAmount ( store . getMerchantId ( ) ) ) ;
}
// 客户加油金额 大于 商户账号余额
if ( order . getTotalPrice ( ) . compareTo ( account ) = = 1 ) {
log . error ( "OrderController --> orderToPay() ERROR" , "暂时无法进行支付,请联系平台客服" ) ;
throw ErrorHelp . genException ( SysCode . System , ErrorCode . COMMON_ERROR , "暂时无法进行支付,请联系平台客服" ) ;
}
}
}
}