Authored by chenchao

fix

@@ -122,7 +122,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { @@ -122,7 +122,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
122 return result; 122 return result;
123 } 123 }
124 124
125 - private void processFirstTimeCharge(SellerWallet sw, OrderInfo orderInfo){ 125 + private SellerWallet processFirstTimeCharge(SellerWallet sw, OrderInfo orderInfo){
126 Long orderCode = orderInfo.getOrderCode(); 126 Long orderCode = orderInfo.getOrderCode();
127 BigDecimal amount = orderInfo.getAmount(); 127 BigDecimal amount = orderInfo.getAmount();
128 Integer uid = orderInfo.getUid(); 128 Integer uid = orderInfo.getUid();
@@ -134,12 +134,12 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { @@ -134,12 +134,12 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
134 } catch (Exception e) { 134 } catch (Exception e) {
135 CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "没有芝麻认证信息:uid=" + uid + ",充值订单号为:" + orderCode+", 充值金额为:"+amount); 135 CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "没有芝麻认证信息:uid=" + uid + ",充值订单号为:" + orderCode+", 充值金额为:"+amount);
136 logger.error("重新入驻首次充值保证金={},没有芝麻认证信息,uid={}", amount, uid); 136 logger.error("重新入驻首次充值保证金={},没有芝麻认证信息,uid={}", amount, uid);
137 - return; 137 + return sw;
138 } 138 }
139 if(cert == null || StringUtils.isBlank(cert.getCertNo())) { 139 if(cert == null || StringUtils.isBlank(cert.getCertNo())) {
140 CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "芝麻认证信息有误:uid=" + uid + ",充值订单号为:" + orderCode+", 充值金额为:"+amount); 140 CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "芝麻认证信息有误:uid=" + uid + ",充值订单号为:" + orderCode+", 充值金额为:"+amount);
141 logger.error("重新入驻首次充值保证金={},没有芝麻认证信息有误,uid={}", amount, uid); 141 logger.error("重新入驻首次充值保证金={},没有芝麻认证信息有误,uid={}", amount, uid);
142 - return; 142 + return sw;
143 } 143 }
144 String certNo = cert.getCertNo(); 144 String certNo = cert.getCertNo();
145 145
@@ -148,12 +148,12 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { @@ -148,12 +148,12 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
148 if (sw.getStatus() == null || sw.getStatus() != 0) { 148 if (sw.getStatus() == null || sw.getStatus() != 0) {
149 CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "入驻状态异常:uid=" + uid + ",充值订单号为:" + orderCode + ", 充值金额为:" + amount); 149 CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "入驻状态异常:uid=" + uid + ",充值订单号为:" + orderCode + ", 充值金额为:" + amount);
150 logger.error("重新入驻首次充值保证金={},发现入驻状态异常,uid={},times={}", amount, uid, sw.getJoinTimes()); 150 logger.error("重新入驻首次充值保证金={},发现入驻状态异常,uid={},times={}", amount, uid, sw.getJoinTimes());
151 - return; 151 + return sw;
152 } 152 }
153 if (!canRejoin(uid, sw, cert)) { 153 if (!canRejoin(uid, sw, cert)) {
154 CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "超过入最大驻次数:uid=" + uid + ",充值订单号为:" + orderCode+", 充值金额为:"+amount); 154 CommonAlarmEventPublisher.publish("重新入驻首次充值保证金失败", "ufo.order.recharge", "超过入最大驻次数:uid=" + uid + ",充值订单号为:" + orderCode+", 充值金额为:"+amount);
155 logger.error("重新入驻首次充值保证金={},发现已超过最大入驻次数,uid={},times={}", amount, uid, sw.getJoinTimes()); 155 logger.error("重新入驻首次充值保证金={},发现已超过最大入驻次数,uid={},times={}", amount, uid, sw.getJoinTimes());
156 - return; 156 + return sw;
157 } 157 }
158 // 更新钱包 158 // 更新钱包
159 logger.info("重新入驻首次充值保证金={},更新钱包信息,uid={}", amount, uid); 159 logger.info("重新入驻首次充值保证金={},更新钱包信息,uid={}", amount, uid);
@@ -161,7 +161,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { @@ -161,7 +161,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
161 if (exe == 0) { 161 if (exe == 0) {
162 CommonAlarmEventPublisher.publish("重新入驻修改钱包失败", "ufo.order.recharge", "更新钱包不成功:uid=" + uid + ",充值订单号为:" + orderCode + ", 充值金额为:" + amount+ ",钱包信息为:"+sw); 162 CommonAlarmEventPublisher.publish("重新入驻修改钱包失败", "ufo.order.recharge", "更新钱包不成功:uid=" + uid + ",充值订单号为:" + orderCode + ", 充值金额为:" + amount+ ",钱包信息为:"+sw);
163 logger.info("重新入驻失败,首次充值保证金={},更新钱包信息失败,uid={}, 钱包信息={}", amount, uid, sw); 163 logger.info("重新入驻失败,首次充值保证金={},更新钱包信息失败,uid={}, 钱包信息={}", amount, uid, sw);
164 - return; 164 + return sw;
165 } 165 }
166 // 数据清理 166 // 数据清理
167 // 钱包明细 167 // 钱包明细
@@ -197,7 +197,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { @@ -197,7 +197,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
197 EventBusPublisher.publishEvent(inviteRecordEvent); 197 EventBusPublisher.publishEvent(inviteRecordEvent);
198 } 198 }
199 addJoinHistory(uid, certNo); 199 addJoinHistory(uid, certNo);
200 - 200 + return sw;
201 } 201 }
202 202
203 @Override 203 @Override
@@ -220,7 +220,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { @@ -220,7 +220,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
220 SellerWallet sw = sellerWalletMapper.selectByUidAndType(uid, 1); 220 SellerWallet sw = sellerWalletMapper.selectByUidAndType(uid, 1);
221 logger.info("充值后回调,处理总账表,orderCode={}", orderCode); 221 logger.info("充值后回调,处理总账表,orderCode={}", orderCode);
222 if (orderInfo.getType() == TYPE_FIRST_RECHARGE) { 222 if (orderInfo.getType() == TYPE_FIRST_RECHARGE) {
223 - processFirstTimeCharge(sw, orderInfo); 223 + sw = processFirstTimeCharge(sw, orderInfo);
224 afterAmount = amount; 224 afterAmount = amount;
225 } else { 225 } else {
226 // 修改钱包余额 226 // 修改钱包余额