jiangping
2023-10-12 b1c1c20ef382dd2be0f6bdf81f5d2913e749faef
server/services/src/main/java/com/doumee/core/wx/WxMiniUtilService.java
@@ -52,6 +52,7 @@
            if ("SUCCESS".equals(response.getReturnCode()) && "SUCCESS".equals(response.getResultCode())) {
                //存储退款记录 与 流水记录
                Refund refund = new Refund();
                refund.setId(Constants.getUUID());
                refund.setCreateDate(new Date());
                refund.setMemberId(refundDTO.getMemberId());
                refund.setMoney(refundDTO.getRefundAmount());
@@ -61,20 +62,22 @@
                refund.setType(refundDTO.getType());
                refund.setObjId(refundDTO.getOrderId());
                refund.setReason(refundDTO.getReason());
                refund.setCanBalance(refundDTO.getCanBalance());
                refundMapper.insert(refund);
                //存储交易流水表
                Transactions transactions = new Transactions();
                transactions.setId(Constants.getUUID());
                transactions.setMemberId(refundDTO.getMemberId());
                transactions.setCreateDate(new Date());
                transactions.setIsdeleted(Constants.ZERO);
                transactions.setOrderId(refundDTO.getOrderId());
                transactions.setMoney(refundDTO.getRefundAmount());
                transactions.setType(refundDTO.getType()==Constants.transactionsType.refund?Constants.transactionsType.platformRefund:Constants.transactionsType.refund);
                transactions.setType(refundDTO.getType()==Constants.TRANSACTIONS_TYPE.REFUND.getKey()?Constants.TRANSACTIONS_TYPE.PLATFORMREFUND.getKey():Constants.REFUND_TYPE.BACK.getKey());
                transactions.setPreOrderid(refundDTO.getOrderId());
                transactions.setOnlineOrderid(refNum);
                transactions.setDoneDate(new Date());
                transactions.setTitle("退款");
                transactions.setContent(refundDTO.getType()==Constants.transactionsType.refund?"平台退款":"结算退款");
                transactions.setTitle(Constants.TRANSACTIONS_TYPE.get(transactions.getType()).getName());
                transactions.setContent(Constants.TRANSACTIONS_TYPE.get(transactions.getType()).getInfo());
                transactions.setBalance(BigDecimal.ZERO);
                transactions.setObjId(refund.getId());
                transactions.setObjType(Constants.ONE);