1
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package localjx
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
@@ -13,7 +15,10 @@ func init() {
|
||||
}
|
||||
|
||||
func TestGenOrderNo(t *testing.T) {
|
||||
loc, _ := time.LoadLocation("Local")
|
||||
|
||||
t1, _ := time.ParseInLocation("20060102150405", time.Unix(1654510539,0).Format("20060102150405"), loc)
|
||||
fmt.Println("t1",t1)
|
||||
}
|
||||
|
||||
func TestGetAvailableDeliverTime(t *testing.T) {
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/wxpayapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
@@ -70,7 +69,9 @@ 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 {
|
||||
orderPay.PayFinishedAt = utils.Time2Pointer(wxpayapi.PayTime2Time(utils.Int64ToStr(msg.PaidAt)))
|
||||
loc, _ := time.LoadLocation("Local")
|
||||
t1, _ := time.ParseInLocation("20060102150405", time.Unix(msg.PaidAt,0).Format("20060102150405"), loc)
|
||||
orderPay.PayFinishedAt = utils.Time2Pointer(t1)
|
||||
orderPay.TransactionID = msg.ChannelNo
|
||||
orderPay.OriginalData = utils.Format4Output(msg, true)
|
||||
if msg.Status == tiktok.ResponseCodeSuccess {
|
||||
@@ -110,7 +111,7 @@ func onTTPayRefund(msg *tiktok.DetailCallBackMessage2Refund) (err error) {
|
||||
orderPay := &model.OrderPay{
|
||||
VendorOrderID: orderPayRefund.VendorOrderID,
|
||||
VendorID: jxutils.GetPossibleVendorIDFromVendorOrderID(orderPayRefund.VendorOrderID),
|
||||
PayType: model.PayTypeWX,
|
||||
PayType: model.PayTypeTicTok,
|
||||
Status: model.PayStatusYes,
|
||||
}
|
||||
orderPay.DeletedAt = utils.DefaultTimeValue
|
||||
|
||||
Reference in New Issue
Block a user