wangchuanjin 2 mesi fa
parent
commit
9bc022f6ce

+ 3 - 6
pushmember/push/job/nomsgtipjob.go

@@ -94,7 +94,7 @@ func (n *NoMsgTipJob) Execute(taskType, hour int) {
 	logger.Info("无消息提醒任务结束。。。", taskType, hour)
 	logger.Info("无消息提醒任务结束。。。", taskType, hour)
 }
 }
 
 
-//提醒
+// 提醒
 func (n *NoMsgTipJob) tip(taskType, hour int, user *UserInfo) {
 func (n *NoMsgTipJob) tip(taskType, hour int, user *UserInfo) {
 	now := time.Now()
 	now := time.Now()
 	startEndMd := ""
 	startEndMd := ""
@@ -183,7 +183,7 @@ func (n *NoMsgTipJob) tip(taskType, hour int, user *UserInfo) {
 	}
 	}
 }
 }
 
 
-//推送微信
+// 推送微信
 func (n *NoMsgTipJob) sendWeixin(user *UserInfo, firstTitle, area, jcly string, infoCount int) bool {
 func (n *NoMsgTipJob) sendWeixin(user *UserInfo, firstTitle, area, jcly string, infoCount int) bool {
 	tmplData := map[string]*qrpc.TmplItem{
 	tmplData := map[string]*qrpc.TmplItem{
 		"thing3": &qrpc.TmplItem{
 		"thing3": &qrpc.TmplItem{
@@ -211,7 +211,6 @@ func (n *NoMsgTipJob) sendWeixin(user *UserInfo, firstTitle, area, jcly string,
 	return ok
 	return ok
 }
 }
 
 
-//
 func (n *NoMsgTipJob) SubRecommend(user *UserInfo) (string, string, string, string, int, int64, string, bool) {
 func (n *NoMsgTipJob) SubRecommend(user *UserInfo) (string, string, string, string, int, int64, string, bool) {
 	n.selectPool <- true
 	n.selectPool <- true
 	defer func() {
 	defer func() {
@@ -220,7 +219,6 @@ func (n *NoMsgTipJob) SubRecommend(user *UserInfo) (string, string, string, stri
 	return VarRecommend.SubRecommend(Mysql, Config.JianyuDomain, user.Id, Config.NoMsgTip.Mail.Content, user.PushSet.SubSet.MailPush, 10)
 	return VarRecommend.SubRecommend(Mysql, Config.JianyuDomain, user.Id, Config.NoMsgTip.Mail.Content, user.PushSet.SubSet.MailPush, 10)
 }
 }
 
 
-//
 func (n *NoMsgTipJob) pushCount(baseUserId int64, start, end int64) int64 {
 func (n *NoMsgTipJob) pushCount(baseUserId int64, start, end int64) int64 {
 	n.selectPool <- true
 	n.selectPool <- true
 	defer func() {
 	defer func() {
@@ -229,11 +227,10 @@ func (n *NoMsgTipJob) pushCount(baseUserId int64, start, end int64) int64 {
 	return Mysql.CountBySql(`select count(1) from pushmember where userid=? and date>=? and date<=?`, baseUserId, start, end)
 	return Mysql.CountBySql(`select count(1) from pushmember where userid=? and date>=? and date<=?`, baseUserId, start, end)
 }
 }
 
 
-//
 func (n *NoMsgTipJob) saveLog(userId string, autoId int64) {
 func (n *NoMsgTipJob) saveLog(userId string, autoId int64) {
 	n.savePool <- true
 	n.savePool <- true
 	defer func() {
 	defer func() {
 		<-n.savePool
 		<-n.savePool
 	}()
 	}()
-	VarRecommend.SaveLog(Mgo_Log, userId, autoId)
+	VarRecommend.SaveLog(Mgo_Log, userId, autoId, "member", false, false)
 }
 }

+ 4 - 6
pushsupersub/push/job/nomsgtipjob.go

@@ -92,7 +92,7 @@ func (n *NoMsgTipJob) Execute(taskType, hour int) {
 	logger.Info("无消息提醒任务结束。。。", taskType, hour)
 	logger.Info("无消息提醒任务结束。。。", taskType, hour)
 }
 }
 
 
-//提醒
+// 提醒
 func (n *NoMsgTipJob) tip(taskType, hour int, user *UserInfo) {
 func (n *NoMsgTipJob) tip(taskType, hour int, user *UserInfo) {
 	now := time.Now()
 	now := time.Now()
 	startEndMd := ""
 	startEndMd := ""
@@ -183,7 +183,7 @@ func (n *NoMsgTipJob) tip(taskType, hour int, user *UserInfo) {
 	}
 	}
 }
 }
 
 
-//推送微信
+// 推送微信
 func (n *NoMsgTipJob) sendWeixin(user *UserInfo, firstTitle, area, jcly string, infoCount int) bool {
 func (n *NoMsgTipJob) sendWeixin(user *UserInfo, firstTitle, area, jcly string, infoCount int) bool {
 	tmplData := map[string]*qrpc.TmplItem{
 	tmplData := map[string]*qrpc.TmplItem{
 		"thing3": &qrpc.TmplItem{
 		"thing3": &qrpc.TmplItem{
@@ -211,7 +211,6 @@ func (n *NoMsgTipJob) sendWeixin(user *UserInfo, firstTitle, area, jcly string,
 	return ok
 	return ok
 }
 }
 
 
-//
 func (n *NoMsgTipJob) SubRecommend(user *UserInfo) (string, string, string, string, int, int64, string, bool) {
 func (n *NoMsgTipJob) SubRecommend(user *UserInfo) (string, string, string, string, int, int64, string, bool) {
 	n.selectPool <- true
 	n.selectPool <- true
 	defer func() {
 	defer func() {
@@ -220,7 +219,7 @@ func (n *NoMsgTipJob) SubRecommend(user *UserInfo) (string, string, string, stri
 	return VarRecommend.SubRecommend(Mysql_Push, Config.JianyuDomain, user.Id, Config.NoMsgTip.Mail.Content, user.PushSet.SubSet.MailPush, 10)
 	return VarRecommend.SubRecommend(Mysql_Push, Config.JianyuDomain, user.Id, Config.NoMsgTip.Mail.Content, user.PushSet.SubSet.MailPush, 10)
 }
 }
 
 
-//超级订阅推送数量
+// 超级订阅推送数量
 func (n *NoMsgTipJob) pushCount(baseUserId int64, start, end int64) int64 {
 func (n *NoMsgTipJob) pushCount(baseUserId int64, start, end int64) int64 {
 	n.selectPool <- true
 	n.selectPool <- true
 	defer func() {
 	defer func() {
@@ -229,11 +228,10 @@ func (n *NoMsgTipJob) pushCount(baseUserId int64, start, end int64) int64 {
 	return Mysql_Push.CountBySql(`select count(1) from pushsubscribe where userid=? and date>=? and date<=?`, baseUserId, start, end)
 	return Mysql_Push.CountBySql(`select count(1) from pushsubscribe where userid=? and date>=? and date<=?`, baseUserId, start, end)
 }
 }
 
 
-//
 func (n *NoMsgTipJob) saveLog(userId string, autoId int64) {
 func (n *NoMsgTipJob) saveLog(userId string, autoId int64) {
 	n.savePool <- true
 	n.savePool <- true
 	defer func() {
 	defer func() {
 		<-n.savePool
 		<-n.savePool
 	}()
 	}()
-	VarRecommend.SaveLog(Mgo_Log, userId, autoId)
+	VarRecommend.SaveLog(Mgo_Log, userId, autoId, "supersub", false, false)
 }
 }