Commit e0098379 by gonglei

加入前端代码

1 parent 4a7180a2
......@@ -7,10 +7,7 @@ import com.glsx.usedcar.module.auction.entity.AuctionOrder_;
import com.glsx.usedcar.module.auction.service.BreachService;
import com.glsx.usedcar.module.finance.domain.OrderTransactionAmountStat;
import com.glsx.usedcar.module.finance.domain.OrderTransactionStat;
import com.glsx.usedcar.module.finance.entity.OrderTransaction;
import com.glsx.usedcar.module.finance.entity.OrderTransaction_;
import com.glsx.usedcar.module.finance.entity.Transaction;
import com.glsx.usedcar.module.finance.entity.Transaction_;
import com.glsx.usedcar.module.finance.entity.*;
import com.glsx.usedcar.module.finance.service.TransactionService;
import com.glsx.usedcar.module.meta.AuditState;
import com.glsx.usedcar.module.security.entity.User;
......@@ -163,6 +160,13 @@ public class TransactionController {
return transactionService.getOrderTransactionCountByAuditState();
}
@GetMapping("getRefundsByWithdrawId")
public List<Refund> getRefundsByWithdrawId(@RequestParam int withdrawId) {
return transactionService.getRefundsByWithdrawId(withdrawId);
}
@PostMapping("updateOrderTransactionDesc")
public OrderTransaction updateOrderTransactionDesc(@RequestBody OrderTransaction orderTransaction) throws FieldException {
return transactionService.updateOrderTransactionDesc(orderTransaction.getTransactionId(), orderTransaction.getTransactionDesc());
......
......@@ -6,10 +6,14 @@ import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.summerframework.orm.BaseRepository;
import java.util.List;
import java.util.Optional;
public interface RefundDao extends BaseRepository<Refund, Long>, JpaSpecificationExecutor<Refund> {
@EntityGraph(attributePaths = {"recharge"})
Optional<Refund> findTopByRecharge_OutTradeNoAndRecharge_TransactionIdAndOutRefundNo(String outTradeNo, String transactionId, String outRefundNo);
@EntityGraph(attributePaths = {"recharge"})
List<Refund> findByWithdraw_WithdrawIdOrderByRefundTimeAsc(int withdrawId);
}
......@@ -77,8 +77,7 @@ public class TransactionService extends AbstractAuctionService {
private GscApiInvoker gscApiInvoker;
@Resource
private MessageSource messageSource;
@Resource
private DepositDao depositDao;
/**
* 通过ID查询一个交易明细
......@@ -353,4 +352,8 @@ public class TransactionService extends AbstractAuctionService {
return orderTransaction;
}
public List<Refund> getRefundsByWithdrawId(int withdrawId) {
return refundDao.findByWithdraw_WithdrawIdOrderByRefundTimeAsc(withdrawId);
}
}
\ No newline at end of file
......@@ -121,18 +121,6 @@ export class DepositController{
static PAGE_DEPOSIT_RULE = 'depositRule/pageDepositRule';
/**
* <pre>
微信支付-申请退款
详见 https://pay.weixin.qq.com/doc/v3/merchant/4012791862
</pre>
* @param deposit 请求对象
* @return 退款操作结果
*/
static refund(axios:AxiosStatic, deposit: any): Promise<AxiosResponse<Deposit>> {
return axios.post('depositRule/refund', deposit);
}
/**
* 删除保证金规则
* @param ruleId
* @return int
......
......@@ -11,15 +11,6 @@ import {Recharge} from "lib/src/entity/finance/entity/Recharge";
export class RechargeController{
/**
* 修改提现申请
* @param approveHistory
* @return Recharge
*/
static auditRecharge(axios:AxiosStatic, approveHistory: any): Promise<AxiosResponse<Recharge>> {
return axios.post('recharge/auditRecharge', approveHistory);
}
/**
*/
static getRechargeById(axios:AxiosStatic, rechargeId: number): Promise<AxiosResponse<Recharge>> {
return axios.get('recharge/getRechargeById', {params: {rechargeId: rechargeId}});
......@@ -27,18 +18,6 @@ export class RechargeController{
/**
*/
static getRechargeCountByAuditState(axios:AxiosStatic): Promise<AxiosResponse<any>> {
return axios.get('recharge/getRechargeCountByAuditState');
}
/**
*/
static getRechargesByAccountId(axios:AxiosStatic, accountId: number): Promise<AxiosResponse<Recharge[]>> {
return axios.get('recharge/getRechargesByAccountId', {params: {accountId: accountId}});
}
/**
*/
static pageRecharge(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Recharge>>> {
return axios.post('recharge/pageRecharge', pagination);
}
......
......@@ -77,6 +77,12 @@ export class TransactionController{
}
/**
*/
static getRefundsByWithdrawId(axios:AxiosStatic, withdrawId: number): Promise<AxiosResponse<Refund[]>> {
return axios.get('transaction/getRefundsByWithdrawId', {params: {withdrawId: withdrawId}});
}
/**
* 根据id查询交易明细
* @param transactionId
* @return Transaction
......
......@@ -49,30 +49,37 @@
</a-descriptions-item>
</a-descriptions>
<a-descriptions v-if="withdraw&&withdraw.auditState==='AUDITED'" :bordered="false" :column="3" size="small">
<template #title>
<title-tip-icon></title-tip-icon>
转账情况
</template>
<a-descriptions-item label="付款单号">
{{ withdraw.transferBillNo }}
</a-descriptions-item>
<a-descriptions-item label="转账状态">
<transfer-state-tag :state="withdraw.state"></transfer-state-tag>
</a-descriptions-item>
<a-descriptions-item label="失败原因" :span="2">
{{ withdraw.failReason ?? '-' }}
</a-descriptions-item>
<a-descriptions-item label="转账时间">
{{ withdraw.transferTime }}
</a-descriptions-item>
<a-descriptions-item label="付款成功时间">
{{ withdraw.paymentTime }}
</a-descriptions-item>
<a-descriptions-item label="付款备注">
{{ withdraw.transferRemark }}
</a-descriptions-item>
</a-descriptions>
<!-- <a-descriptions v-if="withdraw&&withdraw.auditState==='AUDITED'" :bordered="false" :column="3" size="small">-->
<!-- <template #title>-->
<!-- <title-tip-icon></title-tip-icon>-->
<!-- 转账情况-->
<!-- </template>-->
<!-- <a-descriptions-item label="付款单号">-->
<!-- {{ withdraw.transferBillNo }}-->
<!-- </a-descriptions-item>-->
<!-- <a-descriptions-item label="转账状态">-->
<!-- <transfer-state-tag :state="withdraw.state"></transfer-state-tag>-->
<!-- </a-descriptions-item>-->
<!-- <a-descriptions-item label="失败原因" :span="2">-->
<!-- {{ withdraw.failReason ?? '-' }}-->
<!-- </a-descriptions-item>-->
<!-- <a-descriptions-item label="转账时间">-->
<!-- {{ withdraw.transferTime }}-->
<!-- </a-descriptions-item>-->
<!-- <a-descriptions-item label="付款成功时间">-->
<!-- {{ withdraw.paymentTime }}-->
<!-- </a-descriptions-item>-->
<!-- <a-descriptions-item label="付款备注">-->
<!-- {{ withdraw.transferRemark }}-->
<!-- </a-descriptions-item>-->
<!-- </a-descriptions>-->
<template v-if="withdraw&&withdraw.auditState==='AUDITED'">
<title-divider title="退款情况" class="mt-10"></title-divider>
<a-table :columns="columns" :data-source="refunds" :pagination="false" size="small"></a-table>
</template>
<br/>
<title-divider title="审核记录"></title-divider>
<approve-history-timeline v-if="withdraw" approve-type="WITHDRAW" :approve-id="withdraw.withdrawId" :create-time="withdraw.createTime" :starter="withdraw.account.accountName"></approve-history-timeline>
......@@ -96,6 +103,10 @@ import TitleDivider from "@/components/TitleDivider.vue";
import {ModalService} from "@/components/ModalService";
import WithdrawForm from "@/views/finance/withdraw/WithdrawForm.vue";
import {AuditState} from "lib/src/entity/enum_types";
import {Refund} from "lib/src/entity/finance/entity/Refund";
import {Transaction} from "lib/src/entity/finance/entity/Transaction";
import {TransactionController} from "@/api/TransactionController";
import {TableColumnsType} from "ant-design-vue";
@Component({
components: {TitleDivider, ApproveHistoryTimeline, TransferStateTag, TitleTipIcon, AuditStateTag}
......@@ -106,11 +117,33 @@ export default class ViewWithdraw extends Vue {
withdraw: Withdraw = null;
refunds: Refund[] = [];
/**
* 表格列配置
*/
columns: TableColumnsType = [
{title: '流水号', dataIndex: 'outTradeNo', key: 'outTradeNo', width: 150, resizable: true, ellipsis: true, sorter: true},
{
title: '申请提现金额', dataIndex: 'amount', key: 'amount', width: 120, align: 'right', resizable: true, ellipsis: true, sorter: true,
customRender: ({text, record, index, column}) => {
return '¥' + text;
}
},
{title: '支付时间', dataIndex: 'paymentTime', key: 'paymentTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true},
{title: '审核时间', dataIndex: 'auditTime', key: 'auditTime', align: 'center', width: 170, resizable: true, ellipsis: true, sorter: true},
{title: '退款进度', dataIndex: 'refundState', key: 'refundState', align: 'center', fixed: 'right', width: 120, resizable: true, ellipsis: true, sorter: true},
{title: '审核状态', dataIndex: 'auditState', key: 'auditState', align: 'center', fixed: 'right', width: 100, resizable: true, ellipsis: true, sorter: true},
];
created(): void {
this.withdrawId = Number(this.$route.query.withdrawId);
WithdrawController.getWithdrawById(this.axios, this.withdrawId).then(response => {
this.withdraw = response.data;
});
TransactionController.getRefundsByWithdrawId(this.axios, this.withdrawId).then(response => {
this.refunds = response.data;
});
}
/**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!