|
|
@@ -214,6 +214,9 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
@Autowired
|
|
|
private ICompanyDivItemService companyDivItemService;
|
|
|
|
|
|
+ @Value("${cloud_host.company_name}")
|
|
|
+ private String signProjectName;
|
|
|
+
|
|
|
/**
|
|
|
* 红包账户锁
|
|
|
*/
|
|
|
@@ -649,6 +652,13 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
return result;
|
|
|
}catch (Exception e){
|
|
|
logger.error("领取红包失败原因:{}", ExceptionUtils.getMessage(e),e);
|
|
|
+ if (e instanceof WxPayException && "济南联志健康".equals(signProjectName)) {
|
|
|
+ WxPayException wxPayException = (WxPayException) e;
|
|
|
+ String customErrorMsg = wxPayException.getCustomErrorMsg();
|
|
|
+ if (null != customErrorMsg && customErrorMsg.startsWith("商户运营账户资金不足")) {
|
|
|
+ return R.error("[红包领取] 账户余额不足,请联系管理员!");
|
|
|
+ }
|
|
|
+ }
|
|
|
throw new RuntimeException(e);
|
|
|
}finally {
|
|
|
if (lock.isHeldByCurrentThread()) {
|