Commit d2bd14f9 by gonglei

加入框架代码

1 parent 0a040b41
...@@ -68,9 +68,9 @@ public class TransactionController { ...@@ -68,9 +68,9 @@ public class TransactionController {
pagination.addFilter(account, Transaction_.account); pagination.addFilter(account, Transaction_.account);
pagination.addSortOrder(new SortOrder(Sort.Direction.DESC, Transaction_.createTime)); pagination.addSortOrder(new SortOrder(Sort.Direction.DESC, Transaction_.createTime));
Page<Transaction> transactions = transactionService.pageTransaction(pagination); Page<Transaction> transactions = transactionService.pageTransaction(pagination);
for (Transaction transaction : transactions) { // for (Transaction transaction : transactions) {
transaction.setDeposit(depositService.getDepositByTransaction(transaction)); // transaction.setDeposit(depositService.getDepositByTransaction(transaction));
} // }
return transactions; return transactions;
} }
......
...@@ -257,6 +257,7 @@ public class TransactionService extends AbstractAuctionService { ...@@ -257,6 +257,7 @@ public class TransactionService extends AbstractAuctionService {
recharge.setPaymentTime(LocalDateTime.now()); recharge.setPaymentTime(LocalDateTime.now());
recharge.setTransactionId(transactionId); recharge.setTransactionId(transactionId);
double amount = recharge.getAmount(); double amount = recharge.getAmount();
recharge.setRefundableAmount(amount);
Account account = recharge.getAccount(); Account account = recharge.getAccount();
account.setSurplus(account.getSurplus() + amount); account.setSurplus(account.getSurplus() + amount);
Transaction transaction = new Transaction(account, "充值成功,交易号:" + outTradeNo, Transaction.TransactionType.RECHARGE, amount, account.getSurplus()); Transaction transaction = new Transaction(account, "充值成功,交易号:" + outTradeNo, Transaction.TransactionType.RECHARGE, amount, account.getSurplus());
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
"quickapp": {}, "quickapp": {},
/* 小程序特有相关 */ /* 小程序特有相关 */
"mp-weixin": { "mp-weixin": {
/* "appid": "wxa719209ed933d667",*/ /* "appid": "wxa719209ed933d667",*/
"appid": "wx568d02f6352efd49", "appid": "wx568d02f6352efd49",
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
......
...@@ -35,10 +35,10 @@ ...@@ -35,10 +35,10 @@
<view class="stat-value">{{ transactionStat?.debt ?? 0 }}</view> <view class="stat-value">{{ transactionStat?.debt ?? 0 }}</view>
</view> </view>
<!-- <view class="stat-item">--> <view class="stat-item">
<!-- <view class="stat-label">提现中</view>--> <view class="stat-label">提现中</view>
<!-- <view class="stat-value">{{ transactionStat?.withdraw ?? 0 }}</view>--> <view class="stat-value">{{ transactionStat?.withdraw ?? 0 }}</view>
<!-- </view>--> </view>
<view class="stat-item"> <view class="stat-item">
<view class="stat-label">已支出</view> <view class="stat-label">已支出</view>
<view class="stat-value">{{ transactionStat?.expenses ?? 0 }}</view> <view class="stat-value">{{ transactionStat?.expenses ?? 0 }}</view>
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
</view> </view>
</view> </view>
<van-notice-bar :scrollable="false" wrapable text="提示:未中拍即自动解冻,并原路退回至您的微信支付账户" background="#FF8D1A19"> <!-- <van-notice-bar :scrollable="false" wrapable text="提示:未中拍即自动解冻,并原路退回至您的微信支付账户" background="#FF8D1A19">-->
</van-notice-bar> <!-- </van-notice-bar>-->
<!-- 明细分类标签 --> <!-- 明细分类标签 -->
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<view class="tab-item" :class="{active:activeTab==='SPENDING'}" @click="switchTab('SPENDING')">支出明细</view> <view class="tab-item" :class="{active:activeTab==='SPENDING'}" @click="switchTab('SPENDING')">支出明细</view>
<view class="tab-item" :class="{active:activeTab==='FREEZE'}" @click="switchTab('FREEZE')">冻结明细</view> <view class="tab-item" :class="{active:activeTab==='FREEZE'}" @click="switchTab('FREEZE')">冻结明细</view>
<view class="tab-item" :class="{active:activeTab==='UNFREEZE'}" @click="switchTab('UNFREEZE')">解冻明细</view> <view class="tab-item" :class="{active:activeTab==='UNFREEZE'}" @click="switchTab('UNFREEZE')">解冻明细</view>
<!-- <view class="tab-item" :class="{active:activeTab==='RECHARGE'}" @click="switchTab('RECHARGE')">充值记录</view>--> <view class="tab-item" :class="{active:activeTab==='RECHARGE'}" @click="switchTab('RECHARGE')">充值记录</view>
</view> </view>
...@@ -69,18 +69,20 @@ ...@@ -69,18 +69,20 @@
<view class="detail-item" v-for="(item, index) in contents" :key="index"> <view class="detail-item" v-for="(item, index) in contents" :key="index">
<view class="detail-header"> <view class="detail-header">
<view class="detail-title"> <view class="detail-title">
{{ (item.transactionType === 'FREEZE' || item.transactionType === 'UNFREEZE') ? '保证金' : '' }}{{ $t('enum.transaction.transactionType.' + item.transactionType) }} {{ (item.transactionType === 'FREEZE' || item.transactionType === 'UNFREEZE') ? '保证金' : '' }}{{ $t('enum.transaction.transactionType.' + item.transactionType) }}
</view> </view>
<view class="detail-tag"> <view class="detail-tag">
<span v-if=" item.transactionType === 'UNFREEZE'&&item.deposit&&item.deposit.refundTime" class="refund-tag">已退款</span> <!-- <span v-if=" item.transactionType === 'UNFREEZE'&&item.deposit&&item.deposit.refundTime" class="refund-tag">已退款</span>-->
{{ $t('enum.transaction.transactionType.' + item.transactionType) }} {{ $t('enum.transaction.transactionType.' + item.transactionType) }}
</view> </view>
</view> </view>
<view class="detail-content" v-if="item.deposit"> <view class="detail-content" v-if="item.transactionName">
参拍{{ item.deposit.auctionVehicle.vehicle.baseInfo.carTypeName }}保证金 {{ item.transactionName }}
<template v-if="item.transactionType === 'UNFREEZE'&&(item.deposit.amount+item.amount)!==0">违约扣除{{ item.deposit.amount + item.amount }}元</template>
</view> </view>
<!-- <view class="detail-content" v-if="item.deposit">-->
<!-- 参拍{{ item.deposit.auctionVehicle.vehicle.baseInfo.carTypeName }}保证金-->
<!-- <template v-if="item.transactionType === 'UNFREEZE'&&(item.deposit.amount+item.amount)!==0">违约扣除{{ item.deposit.amount + item.amount }}元</template>-->
<!-- </view>-->
<view class="detail-footer"> <view class="detail-footer">
<view class="detail-time">{{ item.createTime }}</view> <view class="detail-time">{{ item.createTime }}</view>
<view class="detail-amount" :class="{positive:item.amount>0}"> {{ item.amount > 0 ? '+' : '' }}{{ item.amount }}</view> <view class="detail-amount" :class="{positive:item.amount>0}"> {{ item.amount > 0 ? '+' : '' }}{{ item.amount }}</view>
......
...@@ -2168,6 +2168,10 @@ ...@@ -2168,6 +2168,10 @@
<DT arr="0" ds="VarChar" en="" id="12" ln="32" sc="null" sg="1" un="0"/> <DT arr="0" ds="VarChar" en="" id="12" ln="32" sc="null" sg="1" un="0"/>
<Cm>付款类型</Cm> <Cm>付款类型</Cm>
</Cl> </Cl>
<Cl au="0" df="0" nm="REFUNDABLE_AMOUNT" nu="0">
<DT arr="0" ds="Decimal" en="" id="3" ln="16" sc="2" sg="1" un="0"/>
<Cm>可退款金额</Cm>
</Cl>
<Fk deAc="1" nm="fk_recharge_account" prLkCl="ACCOUNT_ID" upAc="1"> <Fk deAc="1" nm="fk_recharge_account" prLkCl="ACCOUNT_ID" upAc="1">
<PrTb mn="0" nm="account" oe="1" sch="schemaA" zr="0"/> <PrTb mn="0" nm="account" oe="1" sch="schemaA" zr="0"/>
<CdTb mn="1" nm="recharge" oe="1" sch="schemaA" zr="1"/> <CdTb mn="1" nm="recharge" oe="1" sch="schemaA" zr="1"/>
...@@ -3548,17 +3552,17 @@ ...@@ -3548,17 +3552,17 @@
<TbGl bkCl="#6699ff64" h="450" sch="schemaA" tbl="account" w="518" x="1131" y="181"/> <TbGl bkCl="#6699ff64" h="450" sch="schemaA" tbl="account" w="518" x="1131" y="181"/>
<TbGl bkCl="#6699ff64" h="242" sch="schemaA" tbl="bank_account" w="436" x="1486" y="1317"/> <TbGl bkCl="#6699ff64" h="242" sch="schemaA" tbl="bank_account" w="436" x="1486" y="1317"/>
<TbGl bkCl="#6699ff64" h="178" sch="schemaA" tbl="deposit" w="475" x="156" y="133"/> <TbGl bkCl="#6699ff64" h="178" sch="schemaA" tbl="deposit" w="475" x="156" y="133"/>
<TbGl bkCl="#6699ff64" h="178" sch="schemaA" tbl="recharge" w="453" x="141" y="798"/> <TbGl bkCl="#6699ff64" h="194" sch="schemaA" tbl="recharge" w="486" x="141" y="798"/>
<TbGl bkCl="#6699ff64" h="274" sch="schemaA" tbl="user_info" w="393" x="858" y="1274"/> <TbGl bkCl="#6699ff64" h="274" sch="schemaA" tbl="user_info" w="393" x="858" y="1274"/>
<TbGl bkCl="#6699ff64" h="146" sch="schemaA" tbl="refund" w="471" x="183" y="1313"/> <TbGl bkCl="#6699ff64" h="146" sch="schemaA" tbl="refund" w="471" x="183" y="1313"/>
<FkGl bearing="NORTH" bkCl="#00000064" childEdge="NORTH" childOffset="0" lineCount="1" midLineOffset="" nm="schemaA.withdraw.fk_withdraw_account" parentEdge="SOUTH" parentOffset="250"/> <FkGl bearing="NORTH" bkCl="#00000064" childEdge="NORTH" childOffset="0" lineCount="1" midLineOffset="" nm="schemaA.withdraw.fk_withdraw_account" parentEdge="SOUTH" parentOffset="250"/>
<FkGl bearing="NORTH_EAST" bkCl="#00000064" childEdge="EAST" childOffset="16" lineCount="2" midLineOffset="" nm="schemaA.recharge.fk_recharge_account" parentEdge="SOUTH" parentOffset="43"/> <FkGl bearing="NORTH_EAST" bkCl="#00000064" childEdge="EAST" childOffset="16" lineCount="2" midLineOffset="" nm="schemaA.recharge.fk_recharge_account" parentEdge="SOUTH" parentOffset="43"/>
<FkGl bearing="SOUTH_EAST" bkCl="#00000064" childEdge="SOUTH" childOffset="0" lineCount="2" midLineOffset="" nm="schemaA.deposit.fk_deposit_transaction" parentEdge="WEST" parentOffset="20"/> <FkGl bearing="SOUTH_EAST" bkCl="#00000064" childEdge="SOUTH" childOffset="0" lineCount="2" midLineOffset="" nm="schemaA.deposit.fk_deposit_transaction" parentEdge="WEST" parentOffset="20"/>
<FkGl bearing="WEST" bkCl="#00000064" childEdge="WEST" childOffset="237" lineCount="1" midLineOffset="" nm="schemaA.bank_account.fk_bank_account_user_info" parentEdge="EAST" parentOffset="100"/> <FkGl bearing="WEST" bkCl="#00000064" childEdge="WEST" childOffset="0" lineCount="1" midLineOffset="" nm="schemaA.bank_account.fk_bank_account_user_info" parentEdge="EAST" parentOffset="100"/>
<FkGl bearing="NORTH_EAST" bkCl="#00000064" childEdge="NORTH" childOffset="466" lineCount="2" midLineOffset="" nm="schemaA.refund.fk_refund_withdraw" parentEdge="WEST" parentOffset="413"/> <FkGl bearing="NORTH_EAST" bkCl="#00000064" childEdge="NORTH" childOffset="466" lineCount="2" midLineOffset="" nm="schemaA.refund.fk_refund_withdraw" parentEdge="WEST" parentOffset="413"/>
<FkGl bearing="EAST" bkCl="#00000064" childEdge="EAST" childOffset="0" lineCount="1" midLineOffset="" nm="schemaA.deposit.fk_deposit_account" parentEdge="WEST" parentOffset="58"/> <FkGl bearing="EAST" bkCl="#00000064" childEdge="EAST" childOffset="0" lineCount="1" midLineOffset="" nm="schemaA.deposit.fk_deposit_account" parentEdge="WEST" parentOffset="58"/>
<FkGl bearing="NORTH_WEST" bkCl="#00000064" childEdge="WEST" childOffset="5" lineCount="2" midLineOffset="" nm="schemaA.refund.fk_refund_recharge" parentEdge="SOUTH" parentOffset="5"/> <FkGl bearing="NORTH_WEST" bkCl="#00000064" childEdge="WEST" childOffset="5" lineCount="2" midLineOffset="" nm="schemaA.refund.fk_refund_recharge" parentEdge="SOUTH" parentOffset="5"/>
<FkGl bearing="EAST" bkCl="#00000064" childEdge="EAST" childOffset="20" lineCount="1" midLineOffset="" nm="schemaA.transaction.fk_transaction_account" parentEdge="WEST" parentOffset="445"/> <FkGl bearing="EAST" bkCl="#00000064" childEdge="EAST" childOffset="0" lineCount="1" midLineOffset="" nm="schemaA.transaction.fk_transaction_account" parentEdge="WEST" parentOffset="445"/>
<Notes/> <Notes/>
<Zones/> <Zones/>
</Dgm> </Dgm>
......
...@@ -202,4 +202,10 @@ ALTER TABLE refund ADD CONSTRAINT fk_refund_recharge ...@@ -202,4 +202,10 @@ ALTER TABLE refund ADD CONSTRAINT fk_refund_recharge
/* Add Foreign Key: fk_refund_withdraw */ /* Add Foreign Key: fk_refund_withdraw */
ALTER TABLE refund ADD CONSTRAINT fk_refund_withdraw ALTER TABLE refund ADD CONSTRAINT fk_refund_withdraw
FOREIGN KEY (WITHDRAW_ID) REFERENCES withdraw (WITHDRAW_ID) FOREIGN KEY (WITHDRAW_ID) REFERENCES withdraw (WITHDRAW_ID)
ON UPDATE NO ACTION ON DELETE NO ACTION;
\ No newline at end of file \ No newline at end of file
ON UPDATE NO ACTION ON DELETE NO ACTION;
ALTER TABLE recharge ADD REFUNDABLE_AMOUNT DECIMAL(16, 2) DEFAULT 0
COMMENT '可退款金额' NOT NULL after RECHARGE_TYPE;
update recharge set REFUNDABLE_AMOUNT= AMOUNT where PAYMENT_TIME is not null;
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!