This commit is contained in:
邹宗楠
2022-06-06 17:54:41 +08:00
parent 55d97c5ef6
commit a534047b7d
3 changed files with 20 additions and 7 deletions

View File

@@ -69,7 +69,7 @@ func onTTPayFinished(msg *tiktok.DetailCallBackMessage) (err error) {
}
orderPay.DeletedAt = utils.DefaultTimeValue
db := dao.GetDB()
if err = dao.GetEntity(db, orderPay, "PayOrderID", "PayType", "DeletedAt"); err == nil {
if err = dao.GetEntity(db, orderPay); err == nil {
orderPay.PayFinishedAt = utils.Time2Pointer(wxpayapi.PayTime2Time(utils.Int64ToStr(msg.PaidAt)))
orderPay.TransactionID = msg.ChannelNo
orderPay.OriginalData = utils.Format4Output(msg, true)
@@ -94,7 +94,7 @@ func onTTPayRefund(msg *tiktok.DetailCallBackMessage2Refund) (err error) {
RefundID: msg.CpRefundno,
}
db := dao.GetDB()
if err = dao.GetEntity(db, orderPayRefund, "RefundID"); err == nil {
if err = dao.GetEntity(db, orderPayRefund); err == nil {
if msg.Status == tiktok.ResponseCodeSuccess {
orderPayRefund.Status = model.RefundStatusYes
} else {