| | |
| | | import com.hx.util.StringUtils; |
| | | import com.platform.exception.PlatTipsException; |
| | | import com.platform.resultTool.PlatformCode; |
| | | import net.sf.json.JSONObject; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | */ |
| | | public static OrdersTotal refundProcess(CommonService commonService, String operationId, String operationNme, String refundId) { |
| | | |
| | | System.out.println("commonService:"+commonService); |
| | | RefundRecord refundRecord = commonService.selectOneByKeyBlob(RefundRecordMapper.class,refundId); |
| | | if(refundRecord ==null){ |
| | | throw new PlatTipsException(PlatformCode.ERROR_TIPS,"找不到该退款信息!"); |
| | |
| | | OrderLog orderLog = RefundToolUtil.setOrderLog(refundRecord,operationId,operationNme,refundRecordMethod.getName()+"退款金额:"+refundRecordMethod.getActualTotal(),0, OrderLogConstants.LOG_TYPE_REFUND); |
| | | orderLog.setOrderId(ordersTotal.getId()); |
| | | commonService.insert(OrderLogMapper.class,orderLog); |
| | | |
| | | //现金支付需要创建创建退款单进行退款 |
| | | RefundNote refundNote = new RefundNote(refundRecordMethod.getActualTotal(), refundRecordMethod.getNumberNo(),refundRecordMethod.getName(),ordersTotal.getId(),refundRecord.getUserId()); |
| | | refundNote.setRefundRecordId(refundRecord.getId()); |
| | | commonService.insert(RefundNoteMapper.class,refundNote); |
| | | } |
| | | } |
| | | return refundCarryVo; |