Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0ada508c
authored
Jan 06, 2026
by
gonglei
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
加入框架代码
1 parent
06f50504
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
198 additions
and
4 deletions
aus-admin/src/main/java/com/glsx/usedcar/web/rest/finance/RechargeController.java
aus-core/src/main/java/com/glsx/usedcar/module/finance/dao/RechargeDao.java
aus-core/src/main/java/com/glsx/usedcar/module/finance/service/TransactionService.java
aus-front/admin/src/api/RechargeController.ts
aus-front/admin/src/router/FinanceRouter.ts
aus-front/admin/src/views/finance/recharge/ViewRecharge.vue
aus-front/admin/src/views/finance/withdraw/ViewWithdraw.vue
aus-front/lib/src/entity/finance/entity/Recharge.ts
aus-admin/src/main/java/com/glsx/usedcar/web/rest/finance/RechargeController.java
View file @
0ada508
...
@@ -62,5 +62,10 @@ public class RechargeController {
...
@@ -62,5 +62,10 @@ public class RechargeController {
return
transactionService
.
auditRecharge
(
approveHistory
);
return
transactionService
.
auditRecharge
(
approveHistory
);
}
}
@GetMapping
(
"getRechargeById"
)
public
Recharge
getRechargeById
(
@RequestParam
int
rechargeId
)
{
return
transactionService
.
getRechargeById
(
rechargeId
);
}
}
}
aus-core/src/main/java/com/glsx/usedcar/module/finance/dao/RechargeDao.java
View file @
0ada508
package
com
.
glsx
.
usedcar
.
module
.
finance
.
dao
;
package
com
.
glsx
.
usedcar
.
module
.
finance
.
dao
;
import
com.glsx.usedcar.module.finance.entity.Deposit
;
import
com.glsx.usedcar.module.finance.entity.Recharge
;
import
com.glsx.usedcar.module.finance.entity.Recharge
;
import
com.glsx.usedcar.module.finance.entity.Withdraw
;
import
com.glsx.usedcar.module.finance.entity.Withdraw
;
import
com.glsx.usedcar.module.meta.AuditState
;
import
com.glsx.usedcar.module.meta.AuditState
;
...
@@ -18,5 +19,8 @@ public interface RechargeDao extends BaseRepository<Recharge, Long>, JpaSpecific
...
@@ -18,5 +19,8 @@ public interface RechargeDao extends BaseRepository<Recharge, Long>, JpaSpecific
List
<
Recharge
>
findByAccount_AccountIdAndAuditStateOrderByCreateTimeDesc
(
int
accountId
,
AuditState
auditState
);
List
<
Recharge
>
findByAccount_AccountIdAndAuditStateOrderByCreateTimeDesc
(
int
accountId
,
AuditState
auditState
);
Optional
<
Recharge
>
findTopByOutTradeNoAndTransactionId
(
String
outTradeNo
,
String
transactionId
);
@EntityGraph
(
attributePaths
=
{
"account"
})
Optional
<
Recharge
>
findByRechargeId
(
long
rechargeId
);
}
}
aus-core/src/main/java/com/glsx/usedcar/module/finance/service/TransactionService.java
View file @
0ada508
...
@@ -104,6 +104,10 @@ public class TransactionService extends AbstractAuctionService {
...
@@ -104,6 +104,10 @@ public class TransactionService extends AbstractAuctionService {
return
rechargeDao
.
findAll
(
pagination
,
pagination
.
getPageRequest
());
return
rechargeDao
.
findAll
(
pagination
,
pagination
.
getPageRequest
());
}
}
public
Recharge
getRechargeById
(
long
rechargeId
)
{
return
rechargeDao
.
findByRechargeId
(
rechargeId
).
orElseThrow
(()
->
new
ObjectNotFoundException
(
rechargeId
,
Recharge
.
class
.
getSimpleName
()));
}
/**
/**
* 通过ID查询一个订单交易
* 通过ID查询一个订单交易
...
@@ -281,8 +285,8 @@ public class TransactionService extends AbstractAuctionService {
...
@@ -281,8 +285,8 @@ public class TransactionService extends AbstractAuctionService {
deposit
.
setTransactionId
(
transactionId
);
deposit
.
setTransactionId
(
transactionId
);
double
amount
=
deposit
.
getAmount
();
double
amount
=
deposit
.
getAmount
();
Account
account
=
deposit
.
getAccount
();
//
Account account = deposit.getAccount();
account
.
setSurplus
(
account
.
getSurplus
()
+
amount
);
//
account.setSurplus(account.getSurplus() + amount);
}
}
}
}
...
@@ -331,6 +335,21 @@ public class TransactionService extends AbstractAuctionService {
...
@@ -331,6 +335,21 @@ public class TransactionService extends AbstractAuctionService {
transactionDao
.
save
(
transaction
);
transactionDao
.
save
(
transaction
);
}
}
}
}
Optional
<
Recharge
>
rechargeOptional
=
rechargeDao
.
findTopByOutTradeNoAndTransactionId
(
decryptRes
.
getOutTradeNo
(),
decryptRes
.
getTransactionId
());
if
(
rechargeOptional
.
isPresent
())
{
Recharge
recharge
=
rechargeOptional
.
get
();
if
(
recharge
.
getRefundState
()
!=
Deposit
.
RefundState
.
REFUNDED
)
{
recharge
.
setRefundSuccessTime
(
DateTimeUtils
.
attemptParseLocalDateTime
(
decryptRes
.
getSuccessTime
()));
recharge
.
setRefundState
(
Deposit
.
RefundState
.
REFUNDED
);
Account
account
=
recharge
.
getAccount
();
account
.
setSurplus
(
account
.
getSurplus
()
-
recharge
.
getAmount
());
Transaction
transaction
=
new
Transaction
(
account
,
"提现"
,
Transaction
.
TransactionType
.
WITHDRAW
,
recharge
.
getAmount
(),
account
.
getSurplus
());
transactionDao
.
save
(
transaction
);
}
}
}
}
public
OrderTransaction
getOrderTransactionByOrderId
(
int
orderId
)
{
public
OrderTransaction
getOrderTransactionByOrderId
(
int
orderId
)
{
...
...
aus-front/admin/src/api/RechargeController.ts
View file @
0ada508
...
@@ -11,6 +11,21 @@ import {Recharge} from "lib/src/entity/finance/entity/Recharge";
...
@@ -11,6 +11,21 @@ import {Recharge} from "lib/src/entity/finance/entity/Recharge";
export
class
RechargeController
{
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
}});
}
/**
*/
*/
static
getRechargeCountByAuditState
(
axios
:
AxiosStatic
):
Promise
<
AxiosResponse
<
any
>>
{
static
getRechargeCountByAuditState
(
axios
:
AxiosStatic
):
Promise
<
AxiosResponse
<
any
>>
{
return
axios
.
get
(
'recharge/getRechargeCountByAuditState'
);
return
axios
.
get
(
'recharge/getRechargeCountByAuditState'
);
...
...
aus-front/admin/src/router/FinanceRouter.ts
View file @
0ada508
...
@@ -74,6 +74,13 @@ export const financeRouter: Array<RouteRecordRaw> = [
...
@@ -74,6 +74,13 @@ export const financeRouter: Array<RouteRecordRaw> = [
}
}
},
},
{
{
path
:
'/finance/recharge/view'
,
component
:
()
=>
import
(
'@/views/finance/recharge/ViewRecharge.vue'
),
meta
:
{
breadcrumbs
:
[{
name
:
'财务管理'
},
{
name
:
'提现审核'
}]
}
},
{
path
:
'/finance/bank-account'
,
path
:
'/finance/bank-account'
,
component
:
()
=>
import
(
'@/views/finance/bank-account/BankAccountPage.vue'
),
component
:
()
=>
import
(
'@/views/finance/bank-account/BankAccountPage.vue'
),
meta
:
{
meta
:
{
...
...
aus-front/admin/src/views/finance/recharge/ViewRecharge.vue
0 → 100644
View file @
0ada508
<
template
>
<a-alert
type=
"info"
:show-icon=
"true"
:closable=
"false"
message=
"请仔细核对收款账户信息,确保与申请人身份一致。"
>
</a-alert>
<a-descriptions
:bordered=
"false"
:column=
"3"
size=
"small"
v-if=
"recharge"
class=
" mt-16"
>
<template
#
title
>
<title-tip-icon></title-tip-icon>
申请与账户信息
</
template
>
<a-descriptions-item
label=
"流水号"
name=
"name"
>
{{ recharge.outTradeNo }}
</a-descriptions-item>
<a-descriptions-item
label=
"申请状态"
name=
"auditState"
>
<audit-state-tag
:audit-state=
"recharge.auditState"
></audit-state-tag>
</a-descriptions-item>
<a-descriptions-item
label=
"申请人"
name=
"updateBy"
>
{{ recharge.account.accountName }}
</a-descriptions-item>
<a-descriptions-item
label=
"付款成功时间"
>
{{ recharge.paymentTime }}
</a-descriptions-item>
<a-descriptions-item
label=
"审核时间"
name=
"bankAccount"
>
{{ recharge.auditTime }}
</a-descriptions-item>
</a-descriptions>
<a-descriptions
:bordered=
"false"
:column=
"3"
size=
"small"
v-if=
"recharge"
class=
"withdraw-view mt-16"
>
<
template
#
title
>
申请提现金额
</
template
>
<
template
#
extra
>
申请时间:
{{
recharge
.
createTime
}}
</
template
>
<a-descriptions-item
label=
"申请提现金额"
name=
"amount"
>
¥{{ recharge.amount }}
</a-descriptions-item>
<a-descriptions-item
label=
"账户余额"
name=
"amount"
>
¥{{ recharge.account.surplus }}
</a-descriptions-item>
</a-descriptions>
<a-descriptions
:bordered=
"false"
:column=
"3"
size=
"small"
v-if=
"recharge&&recharge.auditState==='REJECTED'"
>
<
template
#
title
>
<title-tip-icon></title-tip-icon>
驳回原因
</
template
>
<a-descriptions-item
label=
"详细驳回原因"
name=
"amount"
>
{{ recharge.rejectReason }}
</a-descriptions-item>
</a-descriptions>
<a-descriptions
v-if=
"recharge&&recharge.auditState==='AUDITED'"
:bordered=
"false"
:column=
"3"
size=
"small"
>
<
template
#
title
>
<title-tip-icon></title-tip-icon>
转账情况
</
template
>
<a-descriptions-item
label=
"退款单号"
>
{{ recharge.outRefundNo }}
</a-descriptions-item>
<a-descriptions-item
label=
"转账状态"
>
<a-tag
v-if=
"recharge.refundState==='REFUNDED'"
color=
"red"
>
已退款
</a-tag>
<a-tag
v-if=
"recharge.refundState==='REFUNDING'"
color=
"blue"
>
退款中
</a-tag>
<a-tag
v-if=
"recharge.refundState==='UNREFUND'"
color=
"green"
>
未退款
</a-tag>
</a-descriptions-item>
<a-descriptions-item
v-if=
"recharge.rejectReason"
label=
"驳回原因"
:span=
"2"
>
{{ recharge.rejectReason ?? '-' }}
</a-descriptions-item>
<a-descriptions-item
label=
"退款时间"
>
{{ recharge.refundTime }}
</a-descriptions-item>
<a-descriptions-item
label=
"退款成功时间"
>
{{ recharge.refundSuccessTime }}
</a-descriptions-item>
<a-descriptions-item
label=
"退款备注"
>
{{ recharge.auditRemark }}
</a-descriptions-item>
</a-descriptions>
<br/>
<title-divider
title=
"审核记录"
></title-divider>
<approve-history-timeline
v-if=
"recharge"
approve-type=
"WITHDRAW"
:approve-id=
"recharge.rechargeId"
:create-time=
"recharge.createTime"
:starter=
"recharge.account.accountName"
></approve-history-timeline>
<a-space
:gap=
"8"
v-if=
"recharge&&recharge.auditState==='UNAUDITED'"
>
<a-button
type=
"primary"
@
click=
"editWithdraw('AUDITED')"
>
审核通过
</a-button>
<a-button
type=
"default"
@
click=
"editWithdraw('REJECTED')"
>
审核驳回
</a-button>
<a-button
type=
"default"
@
click=
"this.$goBack()"
>
取消
</a-button>
</a-space>
</template>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
}
from
"vue-facing-decorator"
;
import
TitleDivider
from
"@/components/TitleDivider.vue"
;
import
AuditStateTag
from
"@/views/common/AuditStateTag.vue"
;
import
ApproveHistoryTimeline
from
"@/views/common/ApproveHistoryTimeline.vue"
;
import
TitleTipIcon
from
"@/components/icons/TitleTipIcon.vue"
;
import
TransferStateTag
from
"@/views/finance/withdraw/TransferStateTag.vue"
;
import
{
AuditState
}
from
"lib/src/entity/enum_types"
;
import
{
ModalService
}
from
"@/components/ModalService"
;
import
{
Recharge
}
from
"lib/src/entity/finance/entity/Recharge"
;
import
{
RechargeController
}
from
"@/api/RechargeController"
;
import
RechargeForm
from
"@/views/finance/recharge/RechargeForm.vue"
;
@
Component
({
components
:
{
TransferStateTag
,
TitleTipIcon
,
ApproveHistoryTimeline
,
AuditStateTag
,
TitleDivider
}
})
export
default
class
ViewRecharge
extends
Vue
{
rechargeId
:
any
;
recharge
:
Recharge
=
null
;
created
():
void
{
this
.
rechargeId
=
Number
(
this
.
$route
.
query
.
rechargeId
);
RechargeController
.
getRechargeById
(
this
.
axios
,
this
.
rechargeId
).
then
(
response
=>
{
this
.
recharge
=
response
.
data
;
});
}
/**
* 编辑提现申请
*/
editWithdraw
(
auditState
:
AuditState
):
void
{
const
modal
=
ModalService
.
confirm
({
title
:
'提现审核'
,
component
:
RechargeForm
,
closable
:
true
,
appContext
:
this
.
$
.
appContext
,
props
:
{
recharge
:
this
.
recharge
,
auditState
:
auditState
},
onOk
:
(
component
):
void
=>
{
component
.
submitForm
();
},
emits
:
{
handleOk
:
(
e
)
=>
{
modal
.
destroy
();
}
},
});
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.withdraw-view
{
border-radius
:
8px
;
background
:
linear-gradient
(
180deg
,
rgba
(
227
,
240
,
255
,
1
)
0%
,
rgba
(
249
,
251
,
254
,
1
)
100%
),
rgba
(
247
,
248
,
249
,
1
);
padding
:
16px
20px
16px
20px
;
}
</
style
>
aus-front/admin/src/views/finance/withdraw/ViewWithdraw.vue
View file @
0ada508
...
@@ -126,8 +126,6 @@ export default class ViewWithdraw extends Vue {
...
@@ -126,8 +126,6 @@ export default class ViewWithdraw extends Vue {
emits
:
{
emits
:
{
handleOk
:
(
e
)
=>
{
handleOk
:
(
e
)
=>
{
modal
.
destroy
();
modal
.
destroy
();
this
.
pagination
.
refresh
();
this
.
reloadWithdrawCount
();
}
}
},
},
});
});
...
...
aus-front/lib/src/entity/finance/entity/Recharge.ts
View file @
0ada508
...
@@ -64,6 +64,10 @@ export class Recharge {
...
@@ -64,6 +64,10 @@ export class Recharge {
*/
*/
auditRemark
:
string
;
auditRemark
:
string
;
/**
/**
* 驳回原因
*/
rejectReason
:
string
;
/**
* 审核状态
* 审核状态
*/
*/
auditState
:
AuditState
;
auditState
:
AuditState
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment