瀏覽代碼

创建商品订单

kobe6258 4 月之前
父節點
當前提交
3926ed7cf0
共有 3 個文件被更改,包括 8 次插入7 次删除
  1. 1 0
      api/ht_account_api.go
  2. 4 4
      common/component/log/log_plugin.go
  3. 3 3
      controllers/user/user_controller.go

+ 1 - 0
api/ht_account_api.go

@@ -79,6 +79,7 @@ func (f *HTAccountApi) EnCodeData(req CustomerRiskReq) (token string, err error)
 		return
 	}
 	token = base64.StdEncoding.EncodeToString(rsa)
+	token = "ATXEfCqzhAp7hiM1fIWE7SJ6WqHqAX6oCInDi2BA+RTCZBDOJzFEL16HVhGQKGnYzw3tVSKA2XMsX+Cnw1Cbd/iR10cXYk9m0JE/WodQRxfIwYlq2mjpQS0CsNqzuiR+iSBqpqA/ZUZ8+3oeTVfK0vNXc91NgdnpqA6oqwln3Ouj8XKmXbJSFVPt9/5LP/GKL5fSIFtxIx2QcwTobV05htAE0vpn0ZQ7elHnXyhb5qlBOHXYgWaOKFy0/d73kdWsGTawxcrmQINeaXOXOssuQlzwq+2edZSUzLY3Jr0KRh9mcXm6mL+2u/31jCbELG/ouvBY8s2+7XdBl0QQEm9FEw=="
 	logger.Info("加密后数据:%v", token)
 	private, _ := auth.ParsePrivateKey(f.htConfig.GetWebhookPrivateKey())
 	aa, _ := auth.DecryptWithRSA(private, token)

+ 4 - 4
common/component/log/log_plugin.go

@@ -62,27 +62,27 @@ func Debug(msg string, v ...interface{}) {
 
 func InfoWithTraceId(ctx *context.Context, msg string, v ...interface{}) {
 	if traceId := ctx.Input.GetData("traceId"); traceId != "" {
-		msg = fmt.Sprintf("[traceId:%s,%v]", traceId, msg)
+		msg = fmt.Sprintf("[traceId:%v,%v]", traceId, msg)
 	}
 	Info(msg, v...)
 }
 
 func ErrorWithTraceId(ctx *context.Context, msg string, v ...interface{}) {
 	if traceId := ctx.Input.GetData("traceId"); traceId != "" {
-		msg = fmt.Sprintf("[traceId:%s,%v]", traceId, msg)
+		msg = fmt.Sprintf("[traceId:%v,%v]", traceId, msg)
 	}
 	Error(msg, v...)
 }
 
 func WarnWithTraceId(ctx *context.Context, msg string, v ...interface{}) {
 	if traceId := ctx.Input.GetData("traceId"); traceId != "" {
-		msg = fmt.Sprintf("[traceId:%s,%v]", traceId, msg)
+		msg = fmt.Sprintf("[traceId:%v,%v]", traceId, msg)
 	}
 	Warn(msg, v...)
 }
 func DebugWithTraceId(ctx *context.Context, msg string, v ...interface{}) {
 	if traceId := ctx.Input.GetData("traceId"); traceId != "" {
-		msg = fmt.Sprintf("[traceId:%s,%v]", traceId, msg)
+		msg = fmt.Sprintf("[traceId:%v,%v]", traceId, msg)
 	}
 	Debug(msg, v...)
 }

+ 3 - 3
controllers/user/user_controller.go

@@ -572,14 +572,14 @@ func (h *UserController) SyncCustomerRiskLevel() {
 		h.GetPostParams(webhookRequest)
 		privateKey, err := authUtils.ParsePrivateKey(htConfig.GetWebhookPrivateKey())
 		if err != nil {
-			err = exception.New(exception.SysError)
+			err = exception.NewWithException(exception.SysError, err.Error())
 			logger.Error("解析私钥失败: %v", err)
 			h.FailedResult("解析私钥失败", result)
 			return
 		}
 		decodeData, err := authUtils.DecryptWithRSA(privateKey, webhookRequest.Data)
 		if err != nil {
-			err = exception.New(exception.SysError)
+			err = exception.NewWithException(exception.SysError, err.Error())
 			logger.Error("解密请求体失败: %v", err)
 			h.FailedResult("解密请求体失败", result)
 			return
@@ -587,7 +587,7 @@ func (h *UserController) SyncCustomerRiskLevel() {
 		syncCustomerRiskLevelReq := new(SyncCustomerRiskLevelReq)
 		err = json.Unmarshal(decodeData, syncCustomerRiskLevelReq)
 		if err != nil {
-			err = exception.New(exception.SyncRiskError)
+			err = exception.NewWithException(exception.SyncRiskError, err.Error())
 			logger.Error("解析请求体失败: %v", err)
 			h.FailedResult("解析请求体失败", result)
 			return