Selaa lähdekoodia

Merge branch 'release' of http://192.168.3.207:10080/qmx/jy into release

wangshan 7 vuotta sitten
vanhempi
commit
244f70b6a7

+ 1 - 0
src/jfw/modules/push/src/main.go

@@ -37,6 +37,7 @@ func init() {
 	bid.MaxPushSize = util.IntAll(push.PushConfig["maxPushSize"])
 	rpcpush.PushInfoScopeDays = util.IntAll(push.PushConfig["pushInfoScopeDays"])
 	dopush.MaxSearch = util.IntAllDef(push.PushConfig["maxSearch"], 10000)
+	push.WeixinRpcServer = push.PushConfig["weixinRpcServer"].(string)
 	mongodb.InitMongodbPool(util.IntAll(push.PushConfig["mgoSize"]), push.PushConfig["mgoAddr"].(string), "qfw")
 	redis.InitRedis(push.PushConfig["redisServers"].(string))
 	elastic.InitElasticSize(push.PushConfig["elasticsearch"].(string), util.IntAllDef(push.PushConfig["elasticPoolSize"], 20))

+ 1 - 1
src/jfw/modules/push/src/qfw/push/dopush/dopush.go

@@ -247,6 +247,7 @@ func DealSend(k *push.MemberInterest, l *list.List, now time.Time, MaxPushSize i
 	}
 	//3、发送邮件
 	if bmail {
+		log.Println("发送邮件", k.Openid, k.Email, k.Dataexport)
 		html := fmt.Sprintf(push.Mail_html, strings.Replace(strings.Join(k.Interest, ";"), "+", " ", -1), mailContent)
 		subject := fmt.Sprintf(push.Mail_title, infoTypeName)
 		SendFmail(k.Email, subject, html, k.Dataexport, fmdatas)
@@ -264,7 +265,6 @@ func SendFmail(email, subject, html string, dataexport int, fmdatas []map[string
 	if dataexport == 1 { //开启导出
 		fnamepath, rename = GetBidInfoXlsx(fmdatas)
 	}
-	log.Println(email, dataexport)
 	b := mail.GSendMail("剑鱼招标订阅", email, "", "", subject, html, fnamepath, rename, push.GmailMap)
 	if !b {
 		log.Println(email, "邮件发送失败")

+ 3 - 2
src/jfw/modules/push/src/qfw/push/weixincall.go

@@ -13,6 +13,7 @@ import (
 	"time"
 )
 
+var WeixinRpcServer string
 var wxpool chan bool = make(chan bool, 60)
 
 //微信远程调用,实现模板发送消息
@@ -34,7 +35,7 @@ func SendWeiXinNew(k *MemberInterest, str string, Remarks string, o_pushinfo map
 			Color:   WxColor,
 			Url:     Domain + "/front/sess/" + se.EncodeString(k.Openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",wxpushlist") + "__" + wid,
 		}
-		client, err := rpc.DialHTTP("tcp", PushConfig["weixinRpcServer"].(string))
+		client, err := rpc.DialHTTP("tcp", WeixinRpcServer)
 		defer client.Close()
 		if err != nil {
 			log.Println(err.Error())
@@ -59,7 +60,7 @@ func SendWinXin(p *qrpc.NotifyMsg) {
 		<-wxpool
 	}()
 	util.Try(func() {
-		client, err := rpc.DialHTTP("tcp", PushConfig["weixinRpcServer"].(string))
+		client, err := rpc.DialHTTP("tcp", WeixinRpcServer)
 		defer client.Close()
 		if err != nil {
 			log.Println(err.Error())

+ 2 - 0
src/jfw/modules/pushent/src/main.go

@@ -14,12 +14,14 @@ import (
 	"rpcpush"
 	"time"
 	"timetask"
+	"weixinrpc"
 )
 
 func init() {
 	redis.InitRedisBySize(config.Sysconfig["redisServers"].(string), 200, 30, 300)
 	elastic.InitElasticSize(config.Sysconfig["elasticsearch"].(string), util.IntAllDef(config.Sysconfig["elasticPoolSize"], 30))
 	followpush.MaxSearch = util.IntAllDef(config.Sysconfig["maxSearch"], 10000)
+	weixinrpc.WeixinRpcServer = config.Sysconfig["weixinRpcServer"].(string)
 }
 
 func main() {

+ 3 - 3
src/jfw/modules/pushent/src/weixinrpc/weixinrpc.go

@@ -1,7 +1,6 @@
 package weixinrpc
 
 import (
-	"config"
 	"log"
 	"net/rpc"
 	"qfw/util"
@@ -12,6 +11,7 @@ import (
 )
 
 var wxpool chan bool = make(chan bool, 30)
+var WeixinRpcServer string
 
 //微信远程调用,实现模板发送消息
 func SendWinXin(p *qrpc.NotifyMsg) {
@@ -20,7 +20,7 @@ func SendWinXin(p *qrpc.NotifyMsg) {
 		<-wxpool
 	}()
 	util.Try(func() {
-		client, err := rpc.DialHTTP("tcp", config.Sysconfig["weixinRpcServer"].(string))
+		client, err := rpc.DialHTTP("tcp", WeixinRpcServer)
 		defer client.Close()
 		if err != nil {
 			log.Println(err.Error())
@@ -46,7 +46,7 @@ func FollowPush(p *qrpc.NotifyMsg) {
 		<-wxpool
 	}()
 	util.Try(func() {
-		client, err := rpc.DialHTTP("tcp", config.Sysconfig["weixinRpcServer"].(string))
+		client, err := rpc.DialHTTP("tcp", WeixinRpcServer)
 		defer client.Close()
 		if err != nil {
 			log.Println(err.Error())

+ 2 - 0
src/jfw/modules/pushproject/src/main.go

@@ -14,12 +14,14 @@ import (
 	"rpcpush"
 	"time"
 	"timetask"
+	"weixinrpc"
 )
 
 func init() {
 	redis.InitRedisBySize(config.Sysconfig["redisServers"].(string), 200, 30, 300)
 	elastic.InitElasticSize(config.Sysconfig["elasticsearch"].(string), util.IntAllDef(config.Sysconfig["elasticPoolSize"], 30))
 	followpush.MaxSearch = util.IntAllDef(config.Sysconfig["maxSearch"], 10000)
+	weixinrpc.WeixinRpcServer = config.Sysconfig["weixinRpcServer"].(string)
 }
 
 func main() {

+ 3 - 3
src/jfw/modules/pushproject/src/weixinrpc/weixinrpc.go

@@ -1,7 +1,6 @@
 package weixinrpc
 
 import (
-	"config"
 	"log"
 	"net/rpc"
 	"qfw/util"
@@ -12,6 +11,7 @@ import (
 )
 
 var wxpool chan bool = make(chan bool, 30)
+var WeixinRpcServer string
 
 //微信远程调用,实现模板发送消息
 func SendWinXin(p *qrpc.NotifyMsg) {
@@ -20,7 +20,7 @@ func SendWinXin(p *qrpc.NotifyMsg) {
 		<-wxpool
 	}()
 	util.Try(func() {
-		client, err := rpc.DialHTTP("tcp", config.Sysconfig["weixinRpcServer"].(string))
+		client, err := rpc.DialHTTP("tcp", WeixinRpcServer)
 		defer client.Close()
 		if err != nil {
 			log.Println(err.Error())
@@ -46,7 +46,7 @@ func FollowPush(p *qrpc.NotifyMsg) {
 		<-wxpool
 	}()
 	util.Try(func() {
-		client, err := rpc.DialHTTP("tcp", config.Sysconfig["weixinRpcServer"].(string))
+		client, err := rpc.DialHTTP("tcp", WeixinRpcServer)
 		defer client.Close()
 		if err != nil {
 			log.Println(err.Error())