From 881eea41a999b2a81828ec03c09282a980dd54f5 Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Fri, 27 Sep 2024 12:48:52 +0800 Subject: [PATCH] pay type2 --- server/service/qyweixin_approve.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/service/qyweixin_approve.go b/server/service/qyweixin_approve.go index 3cacc84..af6c0b6 100644 --- a/server/service/qyweixin_approve.go +++ b/server/service/qyweixin_approve.go @@ -249,9 +249,10 @@ func (a *Approve) handleRefund(detail *qyweixin.ApproveDetail) { } else { err = a.handleRefundWxpay(newData) } - var title string = "【报销成功】" - if err != nil { + if err == nil { + newData.Status = model.ApprovalRefundStatusPayed + } else { title = "【报销失败】" } @@ -270,7 +271,6 @@ func (a *Approve) handleRefund(detail *qyweixin.ApproveDetail) { log.Errorf("send message error :%s", err.Error()) } - newData.Status = model.ApprovalRefundStatusPayed if err := dao.NewApprovalRefundDao().Update(newData); err != nil { log.Errorf("db error :%s", err.Error()) }