后台:处理时间为空
This commit is contained in:
parent
6db5f7d504
commit
89b37a73c4
|
@ -25,6 +25,7 @@ type AppResponse struct {
|
|||
PrivateKey string `json:"private_key"`
|
||||
MerchantPublicKey string `json:"merchant_public_key"`
|
||||
CreateTime string `json:"create_time"`
|
||||
UpdateTime string `json:"update_time"`
|
||||
WhiteIp string `json:"white_ip"`
|
||||
NotifyUrl string `json:"notify_url"`
|
||||
}
|
||||
|
@ -39,7 +40,13 @@ func (a *AppResponse) ResponseFromDb(db appmodel.App) {
|
|||
a.PublicKey = db.PublicKey
|
||||
a.PrivateKey = db.PrivateKey
|
||||
a.MerchantPublicKey = db.MerchantPublicKey
|
||||
a.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
if !db.CreateTime.IsZero() {
|
||||
a.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
if !db.UpdateTime.IsZero() {
|
||||
a.UpdateTime = db.UpdateTime.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
a.WhiteIp = db.WhiteIp
|
||||
a.NotifyUrl = db.NotifyUrl
|
||||
}
|
||||
|
|
|
@ -28,7 +28,10 @@ func (m *MerchantResponse) ResponseFromDb(db merchantmodel.Merchant) {
|
|||
m.Contact = db.Contact
|
||||
m.Phone = db.Phone
|
||||
m.Remark = db.Remark
|
||||
m.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
if !db.CreateTime.IsZero() {
|
||||
m.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
type MerchantCreateRequest struct {
|
||||
|
|
|
@ -94,8 +94,12 @@ func (o *OrdersResponse) ResponseFromDb(db ordersmodel.OrdersBackendList) {
|
|||
o.Amount = db.Amount
|
||||
o.PayerTotal = db.PayerTotal
|
||||
o.ExtJson = db.ExtJson
|
||||
o.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
o.UpdateTime = db.UpdateTime.Format("2006-01-02 15:04:05")
|
||||
if !db.CreateTime.IsZero() {
|
||||
o.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
if !db.UpdateTime.IsZero() {
|
||||
o.UpdateTime = db.UpdateTime.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
o.MerchantName = db.MerchantName
|
||||
o.PayName = db.PayName
|
||||
o.AppName = db.AppName
|
||||
|
@ -130,7 +134,9 @@ func (o *OrderRequestLogResponse) ResponseFromDb(db orderrequestlogmodel.OrderRe
|
|||
o.Status = db.Status
|
||||
o.MerchantRequest = db.MerchantRequest
|
||||
o.MerchantResponse = db.MerchantResponse
|
||||
o.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
if !db.CreateTime.IsZero() {
|
||||
o.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
}
|
||||
|
||||
type OrderThirdLogResponse struct {
|
||||
|
@ -151,7 +157,9 @@ func (o *OrderThirdLogResponse) ResponseFromDb(db orderthirdpaylogmodel.OrderThi
|
|||
o.Status = db.Status
|
||||
o.PayParam = db.PayParam
|
||||
o.MerchantCallback = db.MerchantCallback
|
||||
o.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
if !db.CreateTime.IsZero() {
|
||||
o.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
}
|
||||
|
||||
type OrderCallbackLogResponse struct {
|
||||
|
@ -169,5 +177,7 @@ func (o *OrderCallbackLogResponse) ResponseFromDb(db ordercallbacklogmodel.Order
|
|||
o.MerchantRequest = db.MerchantRequest
|
||||
o.Status = db.Status
|
||||
o.MerchantResponse = db.MerchantResponse
|
||||
o.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
if !db.CreateTime.IsZero() {
|
||||
o.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue