wangshan 5 سال پیش
والد
کامیت
42bfb99e4d

+ 1 - 1
core/src/config.json

@@ -1,5 +1,5 @@
 {
-    "webServerPort": "8089",
+    "webServerPort": "501",
     "redisServers": "enterprise=192.168.3.128:1712,service=192.168.3.128:1712,other=192.168.3.128:1712,sso=192.168.3.128:1712,credit=192.168.3.128:1712,session=192.168.3.128:1712",
     "useRedis": false,
     "mongodbServers": "192.168.3.128:27080",	

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2020-03-23 10:48:26"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2020-03-23 10:48:26"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2020-03-23 17:36:15"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2020-03-23 17:36:15"}},"marketisstart":true,"marketrate":300}

+ 7 - 7
oauthproxy/src/config.json

@@ -1,11 +1,11 @@
 {
-	"port":"91",
-	"appid":"wx5b6a2fc88f63dbee",
-	"appsecret":"4f8cba756d9092df1d32e2f4fdd664a7",
-	"proxysess":"http://webwh.qmx.top/mobile/sess/%s",
+	"port":"507",
+	"appid":"wx5b1c6e7cc4dac0e4",
+	"appsecret":"b026103ffebd2291b3edb7a269612112",
+	"proxysess":"http://web-jydev-ws.jianyu360.cn/mobile/sess/%s",
 	"proxy":{
-		"wsiteaction":"http://webwh.qmx.top/wsite/%s",
-		"swordfishaction":"http://webwh.qmx.top/swordfish/%s",
-		"viewtest":"http://webwh.qmx.top/%s"
+		"wsiteaction":"http://web-jydev-ws.jianyu360.cn/wsite/%s",
+		"swordfishaction":"http://web-jydev-ws.jianyu360.cn/swordfish/%s",
+		"viewtest":"http://web-jydev-ws.jianyu360.cn/%s"
 	}
 }

+ 7 - 5
oauthproxy/src/main.go

@@ -4,8 +4,10 @@ import (
 	"encoding/json"
 	"fmt"
 	"io/ioutil"
+	"log"
 	"net/http"
 	"qfw/util"
+	"reflect"
 	"strconv"
 	"strings"
 	"time"
@@ -66,14 +68,14 @@ func weixinOauth(w http.ResponseWriter, r *http.Request) {
 	}
 	start, end := strings.LastIndex(uri, "/"), strings.Index(uri, "?")
 	action := uri[start+1 : end]
-	//log.Println("action", action)
+	log.Println("action", action)
 	//
 	r.ParseForm()
 	code, _ := r.Form["code"][0], r.Form["state"][0]
 
 	//取得openid
 	url := fmt.Sprintf(OPENAUTH_URLTPL, AppId, AppSecret, code)
-	//log.Println("request url:", url)
+	log.Println("request url:", url)
 	resp, err := http.Get(url)
 	defer resp.Body.Close()
 	if err == nil {
@@ -86,12 +88,12 @@ func weixinOauth(w http.ResponseWriter, r *http.Request) {
 			fmt.Fprintln(w, ERROR_TEMPLATE)
 			return
 		}
-		//fmt.Println(tmp)
-		//fmt.Println(reflect.TypeOf(tmp))
+		fmt.Println(tmp)
+		fmt.Println(reflect.TypeOf(tmp))
 		openid, _ := tmp["openid"].(string)
 		unionid, _ := tmp["unionid"].(string)
 		tmpstr := openid + "," + unionid + "," + strconv.Itoa(int(time.Now().Unix())) + "," + action
-		//fmt.Println("param:", tmpstr)
+		fmt.Println("param:", tmpstr)
 		url := fmt.Sprintf(proxysess, se.EncodeString(tmpstr))
 		fmt.Println("redirect::", url)
 		//跳转

+ 11 - 10
weixin/src/config.json

@@ -1,19 +1,19 @@
 {
-    "port": "88",
-    "domain": "webwh.qmx.top",
+    "port": "506",
+    "domain": "web-jydev-ws.jianyu360.cn",
     "imgpath": "E:/go_workspace/qfw/core/src/web/staticres",
-    "mongodbServers": "192.168.3.18:27080",
-    "elasticsearch": "http://192.168.3.18:9800",
+    "mongodbServers": "192.168.3.128:27080",
+    "elasticsearch": "http://192.168.3.128:9800",
     "elasticPoolSize": 30,
     "mongodbPoolSize": 5,
     "mongodbName": "qfw",
-    "redisServers": "enterprise=192.168.3.18:3379,service=192.168.3.18:3379,other=192.168.3.18:3379,sso=192.168.3.18:3379,credit=192.168.3.18:3379,gsjhyw=192.168.3.18:3379",
-    "rpcport": "83",
+    "redisServers": "enterprise=192.168.3.128:1712,service=192.168.3.128:1712,other=192.168.3.128:1712,sso=192.168.3.128:1712,credit=192.168.3.128:1712,gsjhyw=192.168.3.128:1712",
+    "rpcport": "8083",
     "serviceTip": "服务指南",
     "appcontext": "weixin",
-    "appid": "wx5b6a2fc88f63dbee",
-    "token": "top2016top2016",
-    "appsecret": "4f8cba756d9092df1d32e2f4fdd664a7",
+    "appid": "wx5b1c6e7cc4dac0e4",
+    "token": "top2015top2015",
+    "appsecret": "b026103ffebd2291b3edb7a269612112",
     "aboutmeurl": "http://www.qimingxing.info/article/aboutme",
     "conactusurl": "http://www.qimingxing.info/article/contactus",
     "wsqurl": "http://s.p.qq.com/pub/jump?d=AAAXeGLZ",
@@ -29,7 +29,8 @@
         "offLinemsgtplid": "ExIeyFfoDNVJXhRDq09JbsjH_zbEJCB6gw6rxcV7atw",
         "msgnotifytplid": "fcke7PqteAtclzHV3ScdiePH48vxaH6M5aJF0O_7by8",
         "managernotifytplid": "Iky7z3veZ6hy-ISchmQSgBvRd-34KzSyuYr0_fUbesE",
-        "feedbacknotifytplid": "GySy3qxaLG6G2JTpE_tz_xS85NtUg8YffdpC7DBGQkA"
+        "feedbacknotifytplid": "GySy3qxaLG6G2JTpE_tz_xS85NtUg8YffdpC7DBGQkA",
+        "entservicenotifytplid": "euAy8tu2RhgFm-xdA3MTKge5gxQsr0aVQgkYt48ny9E"
     },
     "activity": {
         "activitycode": "topcj",

+ 43 - 1
weixin/src/qfw/weixin/rpc/rpc.go

@@ -26,7 +26,7 @@ const (
 	//msgnotify_tplid = "b7iuAMiTCIolnPhTdueKBVYThEMf2D-Bh2M_9v3J-68" //消息提醒
 )
 
-var identify_tplid, offLineMsg_tplid, msgnotify_tplid, managernotify_tplid, feedbacknotify_tplid string
+var identify_tplid, offLineMsg_tplid, msgnotify_tplid, managernotify_tplid, feedbacknotify_tplid, entservicenotify_tplid string
 
 //读取配置
 func InitTpl() {
@@ -35,6 +35,48 @@ func InitTpl() {
 	msgnotify_tplid = wf.SysConfig.MessageTpl["msgnotifytplid"]
 	managernotify_tplid = wf.SysConfig.MessageTpl["managernotifytplid"]
 	feedbacknotify_tplid = wf.SysConfig.MessageTpl["feedbacknotifytplid"]
+	entservicenotify_tplid = wf.SysConfig.MessageTpl["entservicenotifytplid"]
+}
+
+//企业服务通知消息
+func (wxrpc *WeiXinRpc) SendEntServiceMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) (err error) {
+	log.Println("tpl::", entservicenotify_tplid)
+	//构造自定义消息文本
+	var msg struct {
+		ToUser   string `json:"touser"`
+		TplId    string `json:"template_id"`
+		Url      string `json:"url"`
+		Topcolor string `json:"topcolor"`
+		Data     struct {
+			Title struct {
+				Value string `json:"value"`
+			} `json:"first"`
+			Detail struct {
+				Value string `json:"value"`
+			} `json:"keyword1"`
+			Result struct {
+				Value string `json:"value"`
+			} `json:"keyword2"`
+			Remark struct {
+				Value string `json:"value"`
+			} `json:"remark"`
+		} `json:"data"`
+	}
+	msg.ToUser = param.Openid
+	msg.TplId = entservicenotify_tplid
+	msg.Url = param.Url
+	msg.Data.Title.Value = param.Title
+	msg.Data.Detail.Value = param.Detail
+	msg.Data.Result.Value = param.Result
+	msg.Data.Remark.Value = param.Remark
+	log.Println(msg)
+	err = wxrpc.wx.PostTextCustom(tplapi_url, &msg)
+	if err != nil {
+		log.Println(err.Error())
+	} else {
+		log.Println("send tplmsg success!")
+	}
+	return
 }
 
 func (wxrpc *WeiXinRpc) SendPushTplMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) (err error) {

+ 1 - 1
weixin/src/qfw/weixin/weixinsdk.go

@@ -1210,7 +1210,7 @@ func (wx *Weixin) PostTextCustom(url string, obj interface{}) error {
 	if err != nil {
 		return err
 	}
-	//log.Println("custom msg:", string(data))
+	log.Println("custom msg:", string(data))
 	_, err = postRequest(url, wx.tokenChan, data)
 	return err
 }