|
@@ -209,36 +209,14 @@ func (p *PushJob) doPush(pusher Pusher, taskType int, u *UserInfo, sl *SortList,
|
|
|
|
|
|
//微信远程调用,实现模板发送消息
|
|
|
func (p *PushJob) sendWeixin(k *UserInfo, pushParam *PushParam) (bool, string, string) {
|
|
|
-<<<<<<< HEAD
|
|
|
- wtmc := putil.WTMCS.Get(Config.WxTplMsg.First.Value)
|
|
|
+ var wtmc *WxTplMsgCustom
|
|
|
+ wtmc = putil.WTMCS.Get(Config.WxTplMsg.First.Value)
|
|
|
if wtmc == nil {
|
|
|
logger.Error(k.Id, "没有找到模板消息", Config.WxTplMsg.First.Value)
|
|
|
return false, "", ""
|
|
|
}
|
|
|
first_color := Config.WxTplMsg.First.Color
|
|
|
- remark_value := Config.WxTplMsg.Remark_title.Value
|
|
|
- keyword2_value := fmt.Sprintf("%d条", pushParam.InfosLength)
|
|
|
-=======
|
|
|
- var wtmc *WxTplMsgCustom
|
|
|
- first_color, keyword2_value := "", ""
|
|
|
- if IsVipUser(k.VipStatus) {
|
|
|
- wtmc = putil.WTMCS.Get(Config.WxTplMsg.Vip_first.Value)
|
|
|
- if wtmc == nil {
|
|
|
- logger.Error(k.Id, "没有找到模板消息", Config.WxTplMsg.Vip_first.Value)
|
|
|
- return false, "", ""
|
|
|
- }
|
|
|
- first_color = Config.WxTplMsg.Vip_first.Color
|
|
|
- keyword2_value = fmt.Sprintf(Config.WxTplMsg.Vip_keyword2_title.Value, pushParam.InfosLength)
|
|
|
- } else {
|
|
|
- wtmc = putil.WTMCS.Get(Config.WxTplMsg.First.Value)
|
|
|
- if wtmc == nil {
|
|
|
- logger.Error(k.Id, "没有找到模板消息", Config.WxTplMsg.First.Value)
|
|
|
- return false, "", ""
|
|
|
- }
|
|
|
- first_color = Config.WxTplMsg.First.Color
|
|
|
- keyword2_value = fmt.Sprintf(Config.WxTplMsg.Keyword2_title.Value, pushParam.InfosLength)
|
|
|
- }
|
|
|
->>>>>>> master
|
|
|
+ keyword2_value := fmt.Sprintf(Config.WxTplMsg.Keyword2.Value, pushParam.InfosLength)
|
|
|
keyword1_value, keyword3_value := "", ""
|
|
|
if k.WxTplMsg != nil {
|
|
|
keyword1_value = k.WxTplMsg.Key
|