调整日志输出方式,更新数据库日志存储结构;首页查询统计数据接口实现
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/shopspring/decimal"
|
||||
wecahtpay_core "github.com/wechatpay-apiv3/wechatpay-go/core"
|
||||
wecahtpaycore "github.com/wechatpay-apiv3/wechatpay-go/core"
|
||||
"io"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
@@ -272,7 +272,7 @@ func (s *tradeService) OnTradeCreated(q *q.Query, data *OnTradeCreateData) (*m.T
|
||||
trade.Status = int32(trade2.StatusSuccess)
|
||||
trade.OuterNo = &transId
|
||||
trade.Payment = payment
|
||||
trade.Acquirer = int32(acquirer)
|
||||
trade.Acquirer = u.P(int32(acquirer))
|
||||
trade.PaidAt = u.P(orm.LocalDateTime(paidAt))
|
||||
trade.PayURL = u.P("")
|
||||
_, err = q.Trade.
|
||||
@@ -401,7 +401,7 @@ func (s *tradeService) VerifyTrade(data *TradeVerifyData) (*TradeSuccessResult,
|
||||
Mchid: &env.WechatPayMchId,
|
||||
})
|
||||
if err != nil {
|
||||
var apiErr *wecahtpay_core.APIError
|
||||
var apiErr *wecahtpaycore.APIError
|
||||
if errors.As(err, &apiErr) {
|
||||
if apiErr.Code == "ORDER_NOT_EXIST" {
|
||||
return nil, ErrTransactionNotPaid
|
||||
|
||||
Reference in New Issue
Block a user