From a02d7379e60b7b3fe0ae8d1ada4cf86fc4d0a1be Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 11 九月 2020 14:27:11 +0800
Subject: [PATCH] 1111 媒体卡固定码支持按appid配置;

---
 Tool/WebCenter/Coupon/config.ini    |    4 ++--
 Tool/WebCenter/Coupon/webapp.py     |    4 +---
 Tool/WebCenter/CouponCode/webapp.py |    1 +
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/Tool/WebCenter/Coupon/config.ini b/Tool/WebCenter/Coupon/config.ini
index 93a4a56..14d4194 100644
--- a/Tool/WebCenter/Coupon/config.ini
+++ b/Tool/WebCenter/Coupon/config.ini
@@ -19,9 +19,9 @@
 PushPort = 30001
 PushKey = GVFoyGfhFDHfgHOU1OQ3RtUFgy5QxPV1
 
-;固定码列表,没有则放空, 以字母z开头避免混淆; 公共固定码,所有人用同一个码,每个人只能领取一次
+;固定码列表,没有则放空, 以字母z开头避免混淆; 公共固定码,所有人用同一个码,每个人只能领取一次 {APPID:[码, ...], ...}
 ;CommonCards = ["zj98u2j0ud1"]
-CommonCards = []
+CommonCards = {}
 
 ;微信商城购物key
 zyxh_wxkey = dcdce6dj
diff --git a/Tool/WebCenter/Coupon/webapp.py b/Tool/WebCenter/Coupon/webapp.py
index aaea0f0..ac1a331 100644
--- a/Tool/WebCenter/Coupon/webapp.py
+++ b/Tool/WebCenter/Coupon/webapp.py
@@ -50,9 +50,7 @@
 # GM绔彛
 PushPort = ConfigIO.GetValue("Coupon", "PushPort")
 PushKey = ConfigIO.GetValue("Coupon", "PushKey")
-CommonCards = eval(ConfigIO.GetValue("Coupon", "CommonCards"))
-                
-        
+
 Def_CardMsg = {
                0:"CodeRewardSys2", #  鍏戞崲鐮佹棤鏁�
                1: "CodeRewardSys1", #   鍏戞崲鍗″鍔卞凡鍙戣嚦閭欢
diff --git a/Tool/WebCenter/CouponCode/webapp.py b/Tool/WebCenter/CouponCode/webapp.py
index 6902198..c641d47 100644
--- a/Tool/WebCenter/CouponCode/webapp.py
+++ b/Tool/WebCenter/CouponCode/webapp.py
@@ -157,6 +157,7 @@
     gmresult = {'accID':accid, 'sid':sid, 'channel':agentName}
 
     #-----------缁熶竴鍥哄畾鐮佸鐞�----------------------
+    CommonCards = CommonCards.get(agentName, [])
     if codeStr in CommonCards:
         # 涓嶅悓鍥哄畾鐮佸悇鑷彧鑳介涓�娆�
         result, commondata = dbController.find_one(CouponDB.CouponCodeColName + "_Common", {"code":codeStr, "accid":accid})

--
Gitblit v1.8.0