From a569b71ba9547cddc44f882edd2788fd0c0fc21d Mon Sep 17 00:00:00 2001 From: hupeng Date: Thu, 22 Nov 2018 14:03:47 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=B3=BB=E7=BB=9F][=E4=BF=AE=E5=A4=8D]:?= =?UTF-8?q?=E5=88=86=E8=B4=A6=E8=BF=94=E5=9B=9E=E9=94=99=E8=AF=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=AD=98=E5=85=A5=E6=95=B0=E6=8D=AE=E5=BA=93=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxProfitSharingOrderServiceImpl.java | 9 +++++---- .../service/impl/WxProfitSharingReceiverServiceImpl.java | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) 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())) {