营销系统对接

This commit is contained in:
wuchao 2024-06-27 17:46:36 +08:00
parent df889c2df8
commit 700ed725dd
1 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,8 @@ package front
import (
"qteam/app/models/ordersmodel"
"qteam/app/utils"
"qteam/app/utils/encrypt"
"qteam/config"
)
type OrderCreateRequest struct {
@ -41,7 +43,9 @@ func (p *OrderListResponse) ResponseFromDb(l ordersmodel.OrdersProductsList) {
p.ProductId = l.ProductId
p.ProductName = l.ProductName
p.State = l.State
p.VoucherLink = l.VoucherLink
if l.VoucherLink != "" {
p.VoucherLink = string(encrypt.AesDecryptCBC(l.VoucherLink, []byte(config.GetConf().OpenApiMarketConfig.SecretKey)))
}
p.CreateTime = l.CreateTime.Format("2006-01-02 15:04:05")
return
}