8b85198f 刘嘉

菠萝派接口-退款检测 判断该订单是否有退款

1 个父辈 cc439088
......@@ -87,21 +87,23 @@ public class CheckRefundStatusBizServiceImpl extends AbstractBizService<CheckRef
return checkRefundStatusResponse;
}else{
checkRefundStatusBeanList = pineappleDao.childrenrefundStatusByCourse(IMDoingOrderBean.getOrderCode());
if(!StringUtil.isNull(checkRefundStatusBeanList) && !checkRefundStatusBeanList.isEmpty()){
Optional<CheckRefundStatusBean> entity = checkRefundStatusBeanList.stream().findFirst();
checkRefundStatusResponse.setRefundStatus(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getCode());
checkRefundStatusResponse.setSubmessage(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getMsg());
checkRefundStatusResponse.setRefundStatusdescription(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getMsg());
for (CheckRefundStatusBean bean : checkRefundStatusBeanList) {
bean.setRefundStatusdescription(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(bean.getRefundStatus())).getMsg());
bean.setRefundStatus(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(bean.getRefundStatus())).getCode());
}
checkRefundStatusResponse.setCode(PineappleEnum.SUCCESS.getCode());
checkRefundStatusResponse.setMessage(PineappleEnum.SUCCESS.getMsg());
checkRefundStatusResponse.setChildrenrefundStatus(checkRefundStatusBeanList);
return checkRefundStatusResponse;
if(StringUtil.isNull(checkRefundStatusBeanList) || checkRefundStatusBeanList.isEmpty()) {
log.error(String.format("订单号:%s查询不到退款成功记录,请求method:%s,appket:%s", callRequest.getBizModel().getOrderID(), callRequest.getRequest().getMethod(), callRequest.getRequest().getAppkey()));
throw new BizException(String.format("订单号:%s查询不到退款成功记录,请求method:%s,appket:%s", callRequest.getBizModel().getOrderID(), callRequest.getRequest().getMethod(), callRequest.getRequest().getAppkey()));
}
Optional<CheckRefundStatusBean> entity = checkRefundStatusBeanList.stream().findFirst();
checkRefundStatusResponse.setRefundStatus(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getCode());
checkRefundStatusResponse.setSubmessage(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getMsg());
checkRefundStatusResponse.setRefundStatusdescription(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(entity.get().getRefundStatus())).getMsg());
for (CheckRefundStatusBean bean : checkRefundStatusBeanList) {
bean.setRefundStatusdescription(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(bean.getRefundStatus())).getMsg());
bean.setRefundStatus(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(bean.getRefundStatus())).getCode());
}
checkRefundStatusResponse.setCode(PineappleEnum.SUCCESS.getCode());
checkRefundStatusResponse.setMessage(PineappleEnum.SUCCESS.getMsg());
checkRefundStatusResponse.setChildrenrefundStatus(checkRefundStatusBeanList);
return checkRefundStatusResponse;
}
}
}
......