Authored by chenchao

fix

... ... @@ -122,7 +122,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
return result;
}
private void processFirstTimeCharge(SellerWallet sw, OrderInfo orderInfo){
private SellerWallet processFirstTimeCharge(SellerWallet sw, OrderInfo orderInfo){
Long orderCode = orderInfo.getOrderCode();
BigDecimal amount = orderInfo.getAmount();
Integer uid = orderInfo.getUid();
... ... @@ -134,12 +134,12 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
} catch (Exception e) {
CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "没有芝麻认证信息:uid=" + uid + ",充值订单号为:" + orderCode+", 充值金额为:"+amount);
logger.error("重新入驻首次充值保证金={},没有芝麻认证信息,uid={}", amount, uid);
return;
return sw;
}
if(cert == null || StringUtils.isBlank(cert.getCertNo())) {
CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "芝麻认证信息有误:uid=" + uid + ",充值订单号为:" + orderCode+", 充值金额为:"+amount);
logger.error("重新入驻首次充值保证金={},没有芝麻认证信息有误,uid={}", amount, uid);
return;
return sw;
}
String certNo = cert.getCertNo();
... ... @@ -148,12 +148,12 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
if (sw.getStatus() == null || sw.getStatus() != 0) {
CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "入驻状态异常:uid=" + uid + ",充值订单号为:" + orderCode + ", 充值金额为:" + amount);
logger.error("重新入驻首次充值保证金={},发现入驻状态异常,uid={},times={}", amount, uid, sw.getJoinTimes());
return;
return sw;
}
if (!canRejoin(uid, sw, cert)) {
CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "超过入最大驻次数:uid=" + uid + ",充值订单号为:" + orderCode+", 充值金额为:"+amount);
logger.error("重新入驻首次充值保证金={},发现已超过最大入驻次数,uid={},times={}", amount, uid, sw.getJoinTimes());
return;
return sw;
}
// 更新钱包
logger.info("重新入驻首次充值保证金={},更新钱包信息,uid={}", amount, uid);
... ... @@ -161,7 +161,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
if (exe == 0) {
CommonAlarmEventPublisher.publish("重新入驻修改钱包失败", "ufo.order.recharge", "更新钱包不成功:uid=" + uid + ",充值订单号为:" + orderCode + ", 充值金额为:" + amount+ ",钱包信息为:"+sw);
logger.info("重新入驻失败,首次充值保证金={},更新钱包信息失败,uid={}, 钱包信息={}", amount, uid, sw);
return;
return sw;
}
// 数据清理
// 钱包明细
... ... @@ -197,7 +197,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
EventBusPublisher.publishEvent(inviteRecordEvent);
}
addJoinHistory(uid, certNo);
return sw;
}
@Override
... ... @@ -220,7 +220,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
SellerWallet sw = sellerWalletMapper.selectByUidAndType(uid, 1);
logger.info("充值后回调,处理总账表,orderCode={}", orderCode);
if (orderInfo.getType() == TYPE_FIRST_RECHARGE) {
processFirstTimeCharge(sw, orderInfo);
sw = processFirstTimeCharge(sw, orderInfo);
afterAmount = amount;
} else {
// 修改钱包余额
... ...