|
@@ -234,12 +234,25 @@ func (stm *WxTmplPush) getUserOpenIdAndWxPushState() error {
|
|
|
switch stm.Config.Switch {
|
|
|
case "o_msg_active", "o_msg_service", "o_msg_jyschool", "o_msg_privateletter", "o_msg_business", "o_msg_pending":
|
|
|
registedate := common.Int64All(uData["l_registedate"])
|
|
|
+ s_m_openid := common.InterfaceToStr(uData["s_m_openid"])
|
|
|
+ ShowWx:=false
|
|
|
+ if s_m_openid != "" {
|
|
|
+ //微信是否关注处理
|
|
|
+ subscribeList := &[]map[string]interface{}{}
|
|
|
+ subscribeList, _ = entity.MQFW.Find(util."jy_subscribe", map[string]interface{}{"s_m_openid": s_m_openid}, `{"l_date":-1}`, `{"s_event":1"}`, true, -1, -1)
|
|
|
+ if subscribeList != nil && len(*subscribeList) > 0 {
|
|
|
+ s_event := common.InterfaceToStr((*subscribeList)[0]["s_event"])
|
|
|
+ if s_event == "subscribe" {
|
|
|
+ ShowWx = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (*pushKeyMap)["i_wxpush"] != nil {
|
|
|
if common.Int64All((*pushKeyMap)["i_wxpush"]) == 1 {
|
|
|
return nil
|
|
|
}
|
|
|
} else {
|
|
|
- if registedate > config.ConfigJson.Registedate {
|
|
|
+ if registedate > config.ConfigJson.Registedate && ShowWx{
|
|
|
return nil
|
|
|
}
|
|
|
}
|