Files
qnc-server-v3/app/main/api/internal/service/xpayProductMapping.go
2026-06-06 17:03:08 +08:00

38 lines
1.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package service
// XpayProductIdMap 微信道具 productIdQCXG*)→ 本系统 product_entoc_*
// mp 后台道具 id 须与左侧 QCXG 编码一致;支付签名 productId 使用 QCXG业务订单仍用 product_en。
var XpayProductIdMap = map[string]string{
"QCXG6B4E": "toc_VehicleClaimVerify",
"QCXGP00W": "toc_VehicleClaimDetail",
"QCXG3Z3L": "toc_VehicleMaintenanceDetail",
"QCXG3Y6B": "toc_VehicleMaintenanceSimple",
"QCXG4I1Z": "toc_VehicleTransferDetail",
"QCXG1H7Y": "toc_VehicleTransferSimple",
"QCXGY7F2": "toc_VehicleVinValuation",
"QCXG1U4U": "toc_VehicleMileageMixed",
"QCXG5U0Z": "toc_VehicleStaticInfo",
"QCXG4D2E": "toc_VehiclesUnderNameCount",
"QCXG9P1C": "toc_VehiclesUnderNamePlate",
"QCXGYTS2": "toc_PersonVehicleVerificationDetail",
"QCXGGB2Q": "toc_PersonVehicleVerification",
"QCXG7A2B": "toc_VehiclesUnderName",
}
var xpayProductEnToId map[string]string
func init() {
xpayProductEnToId = make(map[string]string, len(XpayProductIdMap))
for xpayID, productEn := range XpayProductIdMap {
xpayProductEnToId[productEn] = xpayID
}
}
// ResolveXpayProductId 将 product_en 转为 mp 道具 id未配置时回退 product_en 本身。
func ResolveXpayProductId(productEn string) string {
if id, ok := xpayProductEnToId[productEn]; ok {
return id
}
return productEn
}