This commit is contained in:
Mrx
2026-06-06 17:03:08 +08:00
parent a85436950e
commit 35e9191981
28 changed files with 666 additions and 286 deletions

View File

@@ -0,0 +1,37 @@
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
}