diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java index 191980e63..fe0651f86 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java @@ -26,6 +26,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.iformall.common.IdWorker; +import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -141,7 +142,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ } @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) { final IdWorker idworker = IdWorker.get(); @@ -257,9 +258,9 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ if (!"SUCCESS".equals(result_code)) { record.setSharingStatus(EnumProfitSharingStatus.PROFIT_SHARING_APPLY_FAILED.getCode()); record.setUpdateTime(new Date()); - record.setErrorMsg(returnMap.get("result_msg")); + record.setErrorMsg(returnMap.get("err_code_des")); 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")); @@ -314,7 +315,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ String result_code = returnMap.get("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"); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java index 852829f09..078d2f152 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverServiceImpl.java @@ -240,8 +240,8 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv receiver.setUpdateTime(new Date()); 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())) {