From 700ed725dd0353ae3b8a999261435368f8a1531e Mon Sep 17 00:00:00 2001 From: wuchao <1272174216@qq.com> Date: Thu, 27 Jun 2024 17:46:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A5=E9=94=80=E7=B3=BB=E7=BB=9F=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/http/entities/front/Order.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/http/entities/front/Order.go b/app/http/entities/front/Order.go index 8124310..e105366 100644 --- a/app/http/entities/front/Order.go +++ b/app/http/entities/front/Order.go @@ -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 }