From 6d774fb3fe75aa382947ab373595c59b104a56bf Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Thu, 22 Dec 2022 18:17:38 +0800 Subject: [PATCH] 20221221 --- src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html | 3 +++ src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html | 2 ++ src/main/java/cc/mrbird/febs/common/enumerates/MallMoneyFlowTypeEnum.java | 1 + src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java | 31 +++++++++++++++++++++++++++---- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/common/enumerates/MallMoneyFlowTypeEnum.java b/src/main/java/cc/mrbird/febs/common/enumerates/MallMoneyFlowTypeEnum.java index ad8dc7d..fdf7020 100644 --- a/src/main/java/cc/mrbird/febs/common/enumerates/MallMoneyFlowTypeEnum.java +++ b/src/main/java/cc/mrbird/febs/common/enumerates/MallMoneyFlowTypeEnum.java @@ -6,6 +6,7 @@ public enum MallMoneyFlowTypeEnum { SYSTEM_CHARGE("系统拨付",100), + WITHDRAW_INSIDE("转账",11), CHARGE("充值",10), WITHDRAW("提现",9), RETURN_MARKET_STAR("星级保证金返还",8), diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java index 630c3a1..47de2a9 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java @@ -394,11 +394,34 @@ } walletService.reduceBalance(transferDto.getAmount(), memberId); - String orderNo = MallUtils.getOrderNum("T"); - this.addMoneyFlow(memberId, transferDto.getAmount().negate(), MoneyFlowTypeEnum.TRANSFER.getValue(), orderNo, null, null, mallMember.getId(), null, FlowTypeEnum.BALANCE.getValue()); - + String orderNo = MallUtils.getOrderNum("NZ"); +// this.addMoneyFlow(memberId, transferDto.getAmount().negate(), MoneyFlowTypeEnum.TRANSFER.getValue(), orderNo, null, null, mallMember.getId(), null, FlowTypeEnum.BALANCE.getValue()); + //生成流水 + Long outFlowId = mallMoneyFlowService.addMoneyFlow( + memberId, + orderNo, + transferDto.getAmount().negate(), + MallMoneyFlowTypeEnum.WITHDRAW_INSIDE.getCode(), + MallMoneyFlow.STATUS_SUCCESS, + MallMoneyFlow.IS_RETURN_Y, + memberId, + FlowTypeEnum.BALANCE.getValue(), + MallMoneyFlowTypeEnum.WITHDRAW_INSIDE.getName() + ); walletService.addBalance(transferDto.getAmount(), mallMember.getId()); - this.addMoneyFlow(mallMember.getId(), transferDto.getAmount(), MoneyFlowTypeEnum.TRANSFER.getValue(), orderNo, null, null, memberId, null, FlowTypeEnum.BALANCE.getValue()); + //生成流水 + Long inFlowId = mallMoneyFlowService.addMoneyFlow( + mallMember.getId(), + orderNo, + transferDto.getAmount(), + MallMoneyFlowTypeEnum.WITHDRAW_INSIDE.getCode(), + MallMoneyFlow.STATUS_SUCCESS, + MallMoneyFlow.IS_RETURN_Y, + mallMember.getId(), + FlowTypeEnum.BALANCE.getValue(), + MallMoneyFlowTypeEnum.WITHDRAW_INSIDE.getName() + ); +// this.addMoneyFlow(mallMember.getId(), transferDto.getAmount(), MoneyFlowTypeEnum.TRANSFER.getValue(), orderNo, null, null, memberId, null, FlowTypeEnum.BALANCE.getValue()); } @Override diff --git a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html index 4d6dd9d..890abaf 100644 --- a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html +++ b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html @@ -66,6 +66,8 @@ return '<span>提现</span>' }else if (d.type === 10) { return '<span>充值</span>' + }else if (d.type === 11) { + return '<span>转账</span>' }else if (d.type === 100) { return '<span>系统拨付</span>' }else{ diff --git a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html index ee7f4f9..2da8aea 100644 --- a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html +++ b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html @@ -32,6 +32,7 @@ <option value="8">星级保证金返还</option> <option value="9">提现</option> <option value="10">充值</option> + <option value="11">转账</option> <option value="100">系统拨付</option> </select> </div> @@ -136,6 +137,8 @@ return '<span>提现</span>' }else if (d.type === 10) { return '<span>充值</span>' + }else if (d.type === 11) { + return '<span>转账</span>' }else if (d.type === 100) { return '<span>系统拨付</span>' }else{ -- Gitblit v1.9.1