Compare commits

..

No commits in common. "c8b79898389e22f507b117f0411eb29261c07dc5" and "40a022080034588c894ca9808c14b8ccbeeabbae" have entirely different histories.

3 changed files with 2 additions and 24 deletions

View File

@ -9,7 +9,6 @@ import (
"rs/cmd/api/internal/svc" "rs/cmd/api/internal/svc"
"rs/cmd/api/internal/types" "rs/cmd/api/internal/types"
"rs/rpc/transfer" "rs/rpc/transfer"
"strings"
"time" "time"
) )
@ -77,7 +76,7 @@ func (l *GetOrderLogic) GetOrder(req *types.GetOrderReq) (resp *types.GetOrderRs
Msg: "", Msg: "",
SupplierId: asyncReq.SupplierId, SupplierId: asyncReq.SupplierId,
CardNo: "", CardNo: "",
CardKey: l.getCode(data.Data.VoucherCode), CardKey: "",
CardExpireTime: endTime.Add(23*time.Hour + 59*time.Minute + 59*time.Second).Format(time.DateTime), CardExpireTime: endTime.Add(23*time.Hour + 59*time.Minute + 59*time.Second).Format(time.DateTime),
CardExchangeUrl: data.Data.ShortUrl, CardExchangeUrl: data.Data.ShortUrl,
} }
@ -125,11 +124,3 @@ func (l *GetOrderLogic) GetOrder2(req *types.GetOrderReq) (resp *types.GetOrderR
return return
} }
func (l *GetOrderLogic) getCode(voucherCode string) string {
if strings.Contains(voucherCode, "http") {
temp := strings.Split(strings.TrimSpace(voucherCode), "/")
return temp[len(temp)-1]
}
return voucherCode
}

View File

@ -146,7 +146,7 @@ func (l *YlAsyncLogic) asyncSendMarket(supplierOrderNo string, asyncReq *types.A
Price: asyncReq.Price, Price: asyncReq.Price,
SupplierId: asyncReq.SupplierId, SupplierId: asyncReq.SupplierId,
CardNo: "", CardNo: "",
CardKey: l.getCode(data.VoucherCode), CardKey: "",
CardExpireTime: endTime.Add(23*time.Hour + 59*time.Minute + 59*time.Second).Format(time.DateTime), CardExpireTime: endTime.Add(23*time.Hour + 59*time.Minute + 59*time.Second).Format(time.DateTime),
CardExchangeUrl: data.ShortUrl, CardExchangeUrl: data.ShortUrl,
Sign: "", Sign: "",
@ -268,11 +268,3 @@ func (l *YlAsyncLogic) updateOrder(req *types.AsyncReq, rsp *transfer.MarketKeyS
l.Logger.Errorf("order = %s 插入订单失败:%v", order, err.Error()) l.Logger.Errorf("order = %s 插入订单失败:%v", order, err.Error())
} }
} }
func (l *YlAsyncLogic) getCode(voucherCode string) string {
if strings.Contains(voucherCode, "http") {
temp := strings.Split(strings.TrimSpace(voucherCode), "/")
return temp[len(temp)-1]
}
return voucherCode
}

View File

@ -59,11 +59,6 @@ func (m *SignMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc {
if _, ok := reqDataMap["sign"]; !ok { if _, ok := reqDataMap["sign"]; !ok {
response.Err(w, response.HTTP_AUTH_FAIL, err.Error()) response.Err(w, response.HTTP_AUTH_FAIL, err.Error())
} }
// 订单查询过滤supplierOrderNo 不参与签名
if r.RequestURI == "/market/order/get" {
delete(reqDataMap, "supplierOrderNo")
}
signString := reqDataMap["sign"].(string) signString := reqDataMap["sign"].(string)
sysSign, err := sign.GetSign(reqDataMap, m.c.Sys.Key) sysSign, err := sign.GetSign(reqDataMap, m.c.Sys.Key)