菠萝派接口-退款检测 判断该订单是否有退款
正在显示
1 个修改的文件
包含
16 行增加
和
14 行删除
... | @@ -87,21 +87,23 @@ public class CheckRefundStatusBizServiceImpl extends AbstractBizService<CheckRef | ... | @@ -87,21 +87,23 @@ public class CheckRefundStatusBizServiceImpl extends AbstractBizService<CheckRef |
87 | return checkRefundStatusResponse; | 87 | return checkRefundStatusResponse; |
88 | }else{ | 88 | }else{ |
89 | checkRefundStatusBeanList = pineappleDao.childrenrefundStatusByCourse(IMDoingOrderBean.getOrderCode()); | 89 | checkRefundStatusBeanList = pineappleDao.childrenrefundStatusByCourse(IMDoingOrderBean.getOrderCode()); |
90 | if(!StringUtil.isNull(checkRefundStatusBeanList) && !checkRefundStatusBeanList.isEmpty()){ | 90 | if(StringUtil.isNull(checkRefundStatusBeanList) || checkRefundStatusBeanList.isEmpty()) { |
91 | Optional<CheckRefundStatusBean> entity = checkRefundStatusBeanList.stream().findFirst(); | 91 | log.error(String.format("订单号:%s查询不到退款成功记录,请求method:%s,appket:%s", callRequest.getBizModel().getOrderID(), callRequest.getRequest().getMethod(), callRequest.getRequest().getAppkey())); |
92 | checkRefundStatusResponse.setRefundStatus(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getCode()); | 92 | throw new BizException(String.format("订单号:%s查询不到退款成功记录,请求method:%s,appket:%s", callRequest.getBizModel().getOrderID(), callRequest.getRequest().getMethod(), callRequest.getRequest().getAppkey())); |
93 | checkRefundStatusResponse.setSubmessage(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getMsg()); | 93 | } |
94 | checkRefundStatusResponse.setRefundStatusdescription(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getMsg()); | 94 | Optional<CheckRefundStatusBean> entity = checkRefundStatusBeanList.stream().findFirst(); |
95 | for (CheckRefundStatusBean bean : checkRefundStatusBeanList) { | 95 | checkRefundStatusResponse.setRefundStatus(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getCode()); |
96 | bean.setRefundStatusdescription(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(bean.getRefundStatus())).getMsg()); | 96 | checkRefundStatusResponse.setSubmessage(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getMsg()); |
97 | bean.setRefundStatus(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(bean.getRefundStatus())).getCode()); | 97 | checkRefundStatusResponse.setRefundStatusdescription(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getMsg()); |
98 | } | 98 | for (CheckRefundStatusBean bean : checkRefundStatusBeanList) { |
99 | 99 | bean.setRefundStatusdescription(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(bean.getRefundStatus())).getMsg()); | |
100 | checkRefundStatusResponse.setCode(PineappleEnum.SUCCESS.getCode()); | 100 | bean.setRefundStatus(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(bean.getRefundStatus())).getCode()); |
101 | checkRefundStatusResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | ||
102 | checkRefundStatusResponse.setChildrenrefundStatus(checkRefundStatusBeanList); | ||
103 | return checkRefundStatusResponse; | ||
104 | } | 101 | } |
102 | checkRefundStatusResponse.setCode(PineappleEnum.SUCCESS.getCode()); | ||
103 | checkRefundStatusResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | ||
104 | checkRefundStatusResponse.setChildrenrefundStatus(checkRefundStatusBeanList); | ||
105 | return checkRefundStatusResponse; | ||
106 | |||
105 | } | 107 | } |
106 | } | 108 | } |
107 | } | 109 | } | ... | ... |
-
请 注册 或 登录 后发表评论