Authored by Lixiaodi

bug修改

@@ -154,7 +154,7 @@ @@ -154,7 +154,7 @@
154 and amount + #{amount,jdbcType=DECIMAL} >= 0 154 and amount + #{amount,jdbcType=DECIMAL} >= 0
155 </if> 155 </if>
156 <if test="lockAmount != null" > 156 <if test="lockAmount != null" >
157 - and lock_amount = lock_amount + #{lockAmount,jdbcType=DECIMAL} &gt;= 0 157 + and lock_amount + #{lockAmount,jdbcType=DECIMAL} &gt;= 0
158 </if> 158 </if>
159 and status=1 159 and status=1
160 </update> 160 </update>
@@ -95,10 +95,13 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { @@ -95,10 +95,13 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
95 if (orderInfo.getType() == TYPE_FIRST_RECHARGE) { 95 if (orderInfo.getType() == TYPE_FIRST_RECHARGE) {
96 try { 96 try {
97 logger.info("首次充值后回调,调用商家入驻接口,uid={}", orderInfo.getUid()); 97 logger.info("首次充值后回调,调用商家入驻接口,uid={}", orderInfo.getUid());
98 - ufoServiceCaller.call("ufo.user.addUserAsStoredSeller", ApiResponse.class, orderInfo.getUid()); 98 + com.yoho.tools.common.beans.ApiResponse<?> resp = ufoServiceCaller.call("ufo.user.addUserAsStoredSeller", ApiResponse.class, orderInfo.getUid());
  99 + if (resp == null || resp.getCode() != 200) {
  100 + throw new Exception("调用商家入驻接口返回结果code不是200");
  101 + }
99 } catch (Exception e) { 102 } catch (Exception e) {
100 - logger.error("首次充值后回调,商家入驻接口失败,uid={}", orderInfo.getUid());  
101 - CommonAlarmEventPublisher.publish("商家入驻失败", "ufo.user.addUserAsStoredSeller", "首次充值后回调,商家入驻接口失败:uid=" + orderInfo.getUid() + ",充值订单号为:" + orderInfo.getOrderCode()); 103 + logger.error("首次充值后回调,商家入驻接口失败,uid={}, msg={}", orderInfo.getUid(), e.getMessage());
  104 + CommonAlarmEventPublisher.publish("商家入驻失败", "ufo.user.addUserAsStoredSeller", "首次充值后回调,商家入驻接口失败:uid=" + orderInfo.getUid() + ",充值订单号为:" + orderInfo.getOrderCode() + ",err="+ e.getMessage());
102 return; 105 return;
103 } 106 }
104 } 107 }