Procházet zdrojové kódy

[系统][修复]:分账返回错误信息存入数据库问题

release_toaliyun_real
hupeng před 7 roky
rodič
revize
a569b71ba9
2 změnil soubory, kde provedl 7 přidání a 6 odebrání
  1. +5
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java
  2. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java

+ 5
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java Zobrazit soubor

@@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.iformall.common.IdWorker; import com.iformall.common.IdWorker;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;


@@ -141,7 +142,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
} }


@Override @Override
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class})
@Transactional(isolation=Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class})
public ResultData createSharingOrder(WxPayOrder wxPayOrder) { public ResultData createSharingOrder(WxPayOrder wxPayOrder) {
final IdWorker idworker = IdWorker.get(); final IdWorker idworker = IdWorker.get();


@@ -257,9 +258,9 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
if (!"SUCCESS".equals(result_code)) { if (!"SUCCESS".equals(result_code)) {
record.setSharingStatus(EnumProfitSharingStatus.PROFIT_SHARING_APPLY_FAILED.getCode()); record.setSharingStatus(EnumProfitSharingStatus.PROFIT_SHARING_APPLY_FAILED.getCode());
record.setUpdateTime(new Date()); record.setUpdateTime(new Date());
record.setErrorMsg(returnMap.get("result_msg"));
record.setErrorMsg(returnMap.get("err_code_des"));
wxProfitSharingOrderMapper.updateByPrimaryKey(record); wxProfitSharingOrderMapper.updateByPrimaryKey(record);
return new ResultData(ErrorCode.PROFIT_SHARING_APPLY_FAILED.getCode(), returnMap.get("result_msg"));
return new ResultData(ErrorCode.PROFIT_SHARING_APPLY_FAILED.getCode(), returnMap.get("err_code_des"));
} }


record.setSharingOrderNo(returnMap.get("order_id")); record.setSharingOrderNo(returnMap.get("order_id"));
@@ -314,7 +315,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ


String result_code = returnMap.get("result_code"); String result_code = returnMap.get("result_code");
if (!"SUCCESS".equals(result_code)) { if (!"SUCCESS".equals(result_code)) {
return new ResultData(ErrorCode.PROFIT_SHARING_QUERY_APPLY_FAILED.getCode(), returnMap.get("result_msg"));
return new ResultData(ErrorCode.PROFIT_SHARING_QUERY_APPLY_FAILED.getCode(), returnMap.get("err_code_des"));
} }


String out_order_no = returnMap.get("out_order_no"); String out_order_no = returnMap.get("out_order_no");


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java Zobrazit soubor

@@ -240,8 +240,8 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv
receiver.setUpdateTime(new Date()); receiver.setUpdateTime(new Date());
wxProfitSharingReceiverMapper.updateByPrimaryKeySelective(receiver); wxProfitSharingReceiverMapper.updateByPrimaryKeySelective(receiver);
} }
logger.error(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getMessage() + returnMap.get("result_msg"));
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getCode(), returnMap.get("result_msg"));
logger.error(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getMessage() + returnMap.get("err_code_des"));
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getCode(), returnMap.get("err_code_des"));
} }


if (!WxPayment.verifyNotifyHMAC(returnMap, payAccount.getApiKey())) { if (!WxPayment.verifyNotifyHMAC(returnMap, payAccount.getApiKey())) {


Načítá se…
Zrušit
Uložit