wangshan преди 5 години
родител
ревизия
da18fba782
променени са 3 файла, в които са добавени 13 реда и са изтрити 10 реда
  1. 3 2
      src/config.json
  2. 5 3
      src/jfw/modules/pushRemind/src/push/push.go
  3. 5 5
      src/jfw/modules/weixin/src/config.json

+ 3 - 2
src/config.json

@@ -34,7 +34,7 @@
         }
     },
     "agreement": "http",
-    "webdomain": "http://web-jydev-ws.jianyu360.cn",
+    "webdomain": "http://web-jydev-wss.jianyu360.cn",
     "redirect": {
         "searchinfo": "/jylab/mainSearch",
         "rssset": "/swordfish/historypush",
@@ -68,7 +68,8 @@
 		"historypush": "/swordfish/historypush?times=%s",
 		"msgremind": "/front/vipsubscribe/msgremind?%s",
 		"treasurebox":"/jyTreasureBox/treasureBox",
-		"vipreport":"/subscribepay/report/wxtplmsg?start=%s&end=%s&pushcount=%s"
+		"vipreport":"/subscribepay/report/wxtplmsg?start=%s&end=%s&pushcount=%s",
+		"viphomepage":"/weixin/pay/toSubVipSetPage"
     },
     "jy_activeset": {
         "activitystartcode": "3201000000",

+ 5 - 3
src/jfw/modules/pushRemind/src/push/push.go

@@ -77,10 +77,10 @@ func pushMsg(openid, text string) error {
 		return e
 	}
 	client, err := rpc.DialHTTP("tcp", conf.MSysConfig.Weixinrpc)
+	defer client.Close()
 	if err != nil {
 		return err
 	}
-	defer client.Close()
 	var repl string
 	err = client.Call("WeiXinRpc.SendCustomMsg", param, &repl)
 	if err != nil {
@@ -91,13 +91,15 @@ func pushMsg(openid, text string) error {
 
 //查询用户是否设置关键词和是否开通微信推送
 func getUserStates(openid string) (hasKey, apply bool, registedate int64) {
-	uMsg := mongodb.FindOneByField("user", map[string]interface{}{"s_m_openid": openid}, `{"i_applystatus":1,"o_jy":1,"l_registedate":1}`)
+	uMsg := mongodb.FindOneByField("user", map[string]interface{}{"s_m_openid": openid}, `{"i_applystatus":1,"o_jy":1,"i_vip_status":1,"l_registedate":1}`)
 	if uMsg != nil && len(*uMsg) > 0 {
 		if util.IntAll((*uMsg)["i_applystatus"]) == 1 {
 			apply = true
 		}
 		o_jy := util.ObjToMap((*uMsg)["o_jy"])
-		if (*o_jy)["a_key"] != nil && len((*o_jy)["a_key"].([]interface{})) > 0 {
+		i_vip_status := util.IntAll((*uMsg)["i_vip_status"])
+		//非VIP用户推送此提醒
+		if ((*o_jy)["a_key"] != nil && len((*o_jy)["a_key"].([]interface{})) > 0) || i_vip_status == 1 || i_vip_status == 2 {
 			hasKey = true
 		}
 		if (*uMsg)["l_registedate"] != nil {

+ 5 - 5
src/jfw/modules/weixin/src/config.json

@@ -8,11 +8,11 @@
     "weixinrpcport": "8083",
     "webrpcport": "127.0.0.1:8084",
     "jyop_webrpcport": "127.0.0.1:8012",
-    "webdomain": "http://web-jydev-zyx.jianyu360.cn",
-    "appid": "wx113d0d389bbda22e",
-    "apptoken": "top20192019",
-    "appsecret": "56a05dd04f3d1973aac8def7194ca817",
-    "proxysess": "http://web-jydev-zyx.jianyu360.cn/front/sess/%s",
+    "webdomain": "http://web-jydev-wss.jianyu360.cn",
+    "appid": "wx5b1c6e7cc4dac0e4",
+    "apptoken": "top2015top2015",
+    "appsecret": "b026103ffebd2291b3edb7a269612112",
+    "proxysess": "http://web-jydev-wss.jianyu360.cn/front/sess/%s",
     "followCompany": 10,
     "welcomemsg": "用剑鱼标讯,所有功能完全免费,\n和传统的会员制说再见!\n\n<a href='%s'>点击这里</a>设置关键词,或直接回复“订阅 关键词”,如“订阅 教学设备”,您将随时随地接收招标信息!\n\n剑鱼标讯,让投标无限可能!",
     "tpl_subscribe_push_id": "IY_RWWzMlwDK6hcd6RAzTec6qre8n5r8PNOOUM_hgk0",