订单增加成功时间
This commit is contained in:
parent
0f571a3dbe
commit
cf4dc8a812
|
@ -5,6 +5,7 @@ import (
|
||||||
"qteam/app/utils"
|
"qteam/app/utils"
|
||||||
"qteam/app/utils/encrypt"
|
"qteam/app/utils/encrypt"
|
||||||
"qteam/config"
|
"qteam/config"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type OrderCreateRequest struct {
|
type OrderCreateRequest struct {
|
||||||
|
@ -34,12 +35,14 @@ type OrderListResponse struct {
|
||||||
VoucherLink string `json:"voucher_link"`
|
VoucherLink string `json:"voucher_link"`
|
||||||
CreateTime string `json:"create_time"`
|
CreateTime string `json:"create_time"`
|
||||||
NotifyUrl string `json:"notify_url"`
|
NotifyUrl string `json:"notify_url"`
|
||||||
|
ExchangeTime string `json:"exchange_time"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *OrderListResponse) ResponseFromDb(l ordersmodel.OrdersProductsList) {
|
func (p *OrderListResponse) ResponseFromDb(l ordersmodel.OrdersProductsList) {
|
||||||
p.Id = l.Id
|
p.Id = l.Id
|
||||||
p.OrderNo = l.OrderNo
|
p.OrderNo = l.OrderNo
|
||||||
p.MainImage = l.MainImage
|
p.MainImage = l.MainImage
|
||||||
|
p.ExchangeTime = l.ExchangeTime.Format(time.DateTime)
|
||||||
p.UserId = l.UserId
|
p.UserId = l.UserId
|
||||||
p.CustNo = l.CustNo
|
p.CustNo = l.CustNo
|
||||||
p.Price = l.Price
|
p.Price = l.Price
|
||||||
|
@ -73,12 +76,14 @@ type OrderQueryResponse struct {
|
||||||
VoucherLink string `json:"voucher_link"`
|
VoucherLink string `json:"voucher_link"`
|
||||||
CreateTime string `json:"create_time"`
|
CreateTime string `json:"create_time"`
|
||||||
NotifyUrl string `json:"notify_url"`
|
NotifyUrl string `json:"notify_url"`
|
||||||
|
ExchangeTime string `json:"exchange_time"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *OrderQueryResponse) ResponseFromDb(l ordersmodel.Orders) {
|
func (p *OrderQueryResponse) ResponseFromDb(l ordersmodel.Orders) {
|
||||||
utils.EntityCopy(p, &l)
|
utils.EntityCopy(p, &l)
|
||||||
p.NotifyUrl = config.GetConf().YouChu.NotifyUrl
|
p.NotifyUrl = config.GetConf().YouChu.NotifyUrl
|
||||||
p.CreateTime = l.CreateTime.Format("2006-01-02 15:04:05")
|
p.CreateTime = l.CreateTime.Format("2006-01-02 15:04:05")
|
||||||
|
p.ExchangeTime = l.ExchangeTime.Format(time.DateTime)
|
||||||
if l.VoucherLink != "" {
|
if l.VoucherLink != "" {
|
||||||
p.VoucherLink = string(encrypt.AesDecryptCBC(l.VoucherLink, []byte(config.GetConf().OpenApiMarketConfig.SecretKey)))
|
p.VoucherLink = string(encrypt.AesDecryptCBC(l.VoucherLink, []byte(config.GetConf().OpenApiMarketConfig.SecretKey)))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue