From d91cb485e7189c046ab1def0baebc117ee16df26 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 17 六月 2022 19:11:01 +0800 Subject: [PATCH] 9584 【越南】【yn_1.0.1】兑换码增加前缀(卡类型配置增加配置项Prefix配置固定前缀) --- Tool/WebCenter/CouponCode/webapp.py | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Tool/WebCenter/CouponCode/webapp.py b/Tool/WebCenter/CouponCode/webapp.py index 2628699..b151357 100644 --- a/Tool/WebCenter/CouponCode/webapp.py +++ b/Tool/WebCenter/CouponCode/webapp.py @@ -272,7 +272,8 @@ #宸蹭娇鐢紝鍚屽崱鍙疯褰曢粯璁ゅ彲鐢紝閬垮厤鏂嚎鍙戦�佸け璐ョ殑鎯呭喌锛堟湭杩斿洖缁撴灉楠岃瘉鎯呭喌涓嬶級 mylog.debug("card used!") return SendGm(ErrCode_Used, gmresult, pushurl) - + + couponType = data["coupontype"] commCheckStatus = CommCheck(dataDict, data["coupontype"]) if commCheckStatus != None: return SendGm(commCheckStatus, gmresult, pushurl) @@ -296,8 +297,16 @@ mylog.debug("time pass") return SendGm(ErrCode_Invalid, gmresult, pushurl) + prefix = "" # 鍥哄畾鍓嶇紑 + if couponType in MailJson: + mailInfo = MailJson[couponType] + prefix = mailInfo.get("Prefix", "") + elif ConfigIO.HasSection(couponType): + if ConfigIO.HasOption(couponType, "Prefix"): + prefix = ConfigIO.GetValue(couponType, "Prefix") + # h 寮�澶寸殑鍗$被鍨嬪彲閲嶅浣跨敤 - if not codeStr.startswith('h'): + if not codeStr.startswith(prefix + 'h'): #鍐嶆煡涓�娆℃槸鍚︾敤杩囨鎵规鐨勫叾浠栧崱, result, data3 = dbController.find_one(CouponDB.CouponCodeColName + "_" + agentName, \ {"coupontype":data["coupontype"], "accid":accid}) -- Gitblit v1.8.0