wangshan 9 жил өмнө
parent
commit
9937f9a201

+ 2 - 1
core/src/qfw/search/searchService.go

@@ -338,7 +338,8 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 	          "match": {
 	            "enterprise.EntName": {
 	              "query":"` + keyword + `",
-	              "operator": "and"
+	              "operator": "and",
+				  "boost":2
 	            }
 	          }
 	        },

+ 5 - 1
core/src/timetask.json

@@ -1 +1,5 @@
-{"comment":{"c_rate":10,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-05 17:12:57"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-05 17:12:57"}},"marketisstart":true,"marketrate":300}
+<<<<<<< HEAD
+{"comment":{"c_rate":10,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-05 17:12:57"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-05 17:12:57"}},"marketisstart":true,"marketrate":300}
+=======
+{"comment":{"c_rate":10,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-05 11:43:55"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-05 11:43:55"}},"marketisstart":true,"marketrate":300}
+>>>>>>> bb4a256ca5b1c12f899082e7b4a48df32b9db996

+ 1 - 1
push/src/qfw/push/bid/bidpushjob.go

@@ -153,7 +153,7 @@ func send(k *push.MemberInterest, v *list.List, now time.Time, nowtime string) {
 			if minute > 121 {
 				return ""
 			} else {
-				if minute < 0 {
+				if minute < 1 {
 					minute = 1
 				}
 				return fmt.Sprintf("%d分钟前发布的", minute)

+ 1 - 2
push/src/qfw/push/tender/tenderpushjob.go

@@ -150,13 +150,12 @@ func send(k *push.MemberInterest, v *list.List, now time.Time, nowtime string) {
 			if minute > 121 {
 				return ""
 			} else {
-				if minute < 0 {
+				if minute < 1 {
 					minute = 1
 				}
 				return fmt.Sprintf("%d分钟前发布的", minute)
 			}
 		}
-
 	}(), firstTitle, func() string {
 		if i == 1 {
 			return ""

+ 0 - 4
weixin/src/config.json

@@ -28,10 +28,6 @@
 		"identifytplid":"sKn4r0or615ETYC-aI5OACPO_Q4-B8GYmgWoqcDghN4",
 		"offLinemsgtplid":"ExIeyFfoDNVJXhRDq09JbsjH_zbEJCB6gw6rxcV7atw",
 		"msgnotifytplid":"fcke7PqteAtclzHV3ScdiePH48vxaH6M5aJF0O_7by8",
-<<<<<<< HEAD
 		"managernotirytplid":"dplgu5Q644vzPdqcPXY7RqgItS3eXACmU1XDl27CvTA"
-=======
-		"managernotifytplid":"DIwMrPQToOhGfa6ZAQCCrqquzbLKajiXsKY0K_lQtWQ"
->>>>>>> 4923307c616d9c1f95b881ad75878f4d07df5134
 	}
 }

+ 11 - 35
weixin/src/qfw/weixin/menu.go

@@ -15,31 +15,10 @@ func CreateMenu(rw http.ResponseWriter, r *http.Request) {
 
 	menu := &Menu{make([]MenuButton, 3)}
 
-	menu.Buttons[0].Name = "领取红包"
-	menu.Buttons[0].Type = MenuButtonTypeUrl
-	menu.Buttons[0].Url = "http://mp.weixin.qq.com/s?__biz=MzA5MTk0MTk5Ng==&mid=401971726&idx=1&sn=89d2470f1de7e80975223041b06c106a#rd"
-	//
-	//menu.Buttons[0].Name = "关于我们"
-	//menu.Buttons[0].SubButtons = make([]MenuButton, 3)
-	//menu.Buttons[0].SubButtons[0].Name = "关于企明星"
-	//menu.Buttons[0].SubButtons[0].Type = MenuButtonTypeUrl
-	//menu.Buttons[0].SubButtons[0].Url = wf.SysConfig.Aboutmeurl
-	//menu.Buttons[0].SubButtons[1].Name = "联系我们"
-	//menu.Buttons[0].SubButtons[1].Type = MenuButtonTypeUrl
-	//menu.Buttons[0].SubButtons[1].Url = wf.SysConfig.Conactusurl
-	//menu.Buttons[0].SubButtons[2].Name = "微社区"
-	//menu.Buttons[0].SubButtons[2].Type = MenuButtonTypeUrl
-	//menu.Buttons[0].SubButtons[2].Url = wf.SysConfig.Wsqurl
-	//menu.Buttons[0].SubButtons[2].Name = "测试菜单"
-	//menu.Buttons[0].SubButtons[2].Type = MenuButtonTypeUrl
-	//menu.Buttons[0].SubButtons[2].Url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + wf.SysConfig.Appid + "&redirect_uri=http://" + wf.SysConfig.Domain + "/weixinoauth?action=viewtest&response_type=code&scope=snsapi_base&state=1#wechat_redirect"
-	//log.Println(menu.Buttons[0].SubButtons[2].Url)
+	menu.Buttons[0].Name = "剑鱼"
+	menu.Buttons[0].Type = MenuButtonTypeUrl ///search/enterprise/m_ent.html
+	menu.Buttons[0].Url = fmt.Sprintf(urlstr, "swordfishaction")
 
-	/**
-	menu.Buttons[1].Name = "企业会员认证"
-	menu.Buttons[1].Type = MenuButtonTypeKey
-	menu.Buttons[1].Key = "midentification"
-	**/
 	menu.Buttons[1].Name = "会员认证"
 	menu.Buttons[1].SubButtons = make([]MenuButton, 3)
 	menu.Buttons[1].SubButtons[0].Name = "企业认证"
@@ -57,20 +36,17 @@ func CreateMenu(rw http.ResponseWriter, r *http.Request) {
 	menu.Buttons[2].SubButtons[0].Name = "微官网"
 	menu.Buttons[2].SubButtons[0].Type = MenuButtonTypeKey
 	menu.Buttons[2].SubButtons[0].Key = "msite" //"http://" + wf.SysConfig.Domain + "/weixin/site/edit" //微官网编辑
-	menu.Buttons[2].SubButtons[1].Name = "剑鱼"
-	//menu.Buttons[2].SubButtons[1].Type = MenuButtonTypeKey
-	//menu.Buttons[2].SubButtons[1].Key = "swordfish" //剑鱼
+
+	menu.Buttons[2].SubButtons[1].Name = "企业查询"
 	menu.Buttons[2].SubButtons[1].Type = MenuButtonTypeUrl ///search/enterprise/m_ent.html
-	menu.Buttons[2].SubButtons[1].Url = fmt.Sprintf(urlstr, "swordfishaction")
+	menu.Buttons[2].SubButtons[1].Url = fmt.Sprintf(urlstr, "entsearchaction")
+	menu.Buttons[2].SubButtons[2].Name = "法规查询"
+	menu.Buttons[2].SubButtons[2].Type = MenuButtonTypeUrl
+	menu.Buttons[2].SubButtons[2].Url = fmt.Sprintf(urlstr, "lawsearchaction")
 
-	menu.Buttons[2].SubButtons[2].Name = "企业查询"
-	menu.Buttons[2].SubButtons[2].Type = MenuButtonTypeUrl ///search/enterprise/m_ent.html
-	//menu.Buttons[2].SubButtons[2].Url = "http://" + wf.SysConfig.Domain + "/search/enterprise/ent.html" //
-	menu.Buttons[2].SubButtons[2].Url = fmt.Sprintf(urlstr, "entsearchaction")
-	menu.Buttons[2].SubButtons[3].Name = "法规查询"
+	menu.Buttons[2].SubButtons[3].Name = "领取红包"
 	menu.Buttons[2].SubButtons[3].Type = MenuButtonTypeUrl
-	//menu.Buttons[2].SubButtons[3].Url = "http://" + wf.SysConfig.Domain + "/law/qfw/index" //
-	menu.Buttons[2].SubButtons[3].Url = fmt.Sprintf(urlstr, "lawsearchaction")
+	menu.Buttons[2].SubButtons[3].Url = "http://mp.weixin.qq.com/s?__biz=MzA5MTk0MTk5Ng==&mid=401971726&idx=1&sn=89d2470f1de7e80975223041b06c106a#rd"
 
 	err := Mux.CreateMenu(menu)
 	if err != nil {

+ 2 - 50
weixin/src/qfw/weixin/rpc/rpc.go

@@ -25,22 +25,14 @@ const (
 	//msgnotify_tplid = "b7iuAMiTCIolnPhTdueKBVYThEMf2D-Bh2M_9v3J-68" //消息提醒
 )
 
-<<<<<<< HEAD
 var identify_tplid, offLineMsg_tplid, msgnotify_tplid, managernotiry_tplid string
-=======
-var identify_tplid, offLineMsg_tplid, msgnotify_tplid, managerNotify_tplid string
->>>>>>> 4923307c616d9c1f95b881ad75878f4d07df5134
 
 //读取配置
 func InitTpl() {
 	identify_tplid = wf.SysConfig.MessageTpl["identifytplid"]
 	offLineMsg_tplid = wf.SysConfig.MessageTpl["offLinemsgtplid"]
 	msgnotify_tplid = wf.SysConfig.MessageTpl["msgnotifytplid"]
-<<<<<<< HEAD
 	managernotiry_tplid = wf.SysConfig.MessageTpl["managernotirytplid"]
-=======
-	managerNotify_tplid = wf.SysConfig.MessageTpl["managernotifytplid"]
->>>>>>> 4923307c616d9c1f95b881ad75878f4d07df5134
 }
 
 func (wxrpc *WeiXinRpc) SendPushTplMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) (err error) {
@@ -126,8 +118,8 @@ func (wxrpc *WeiXinRpc) SendIdentifyTplMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcR
 	return
 }
 
+//发送管理员通知
 func (wxrpc *WeiXinRpc) SendManagerNotifyMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) (err error) {
-	log.Println("tpl::", identify_tplid)
 	//构造自定义消息文本
 	var msg struct {
 		ToUser   string `json:"touser"`
@@ -150,7 +142,7 @@ func (wxrpc *WeiXinRpc) SendManagerNotifyMsg(param *qrpc.NotifyMsg, ret *qrpc.Rp
 		} `json:"data"`
 	}
 	msg.ToUser = param.Openid
-	msg.TplId = managerNotify_tplid
+	msg.TplId = managernotiry_tplid
 	msg.Url = param.Url
 	msg.Data.Title.Value = param.Title
 	msg.Data.Detail.Value = param.Detail
@@ -206,46 +198,6 @@ func (wxrpc *WeiXinRpc) SendOffLineMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResul
 	return
 }
 
-//发送管理员通知
-func (wxrpc *WeiXinRpc) SendManagerNotifyMsg(param *qrpc.NotifyMsg, ret *qrpc.RpcResult) (err error) {
-	//构造自定义消息文本
-	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 = managernotiry_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
-
-	err = wxrpc.wx.PostTextCustom(tplapi_url, &msg)
-	if err != nil {
-		log.Println(err.Error())
-	} else {
-		log.Println("send tplmsg success!")
-	}
-	return
-}
-
 func StartWeixinRpc(wx *weixin.Weixin) {
 	wrpc := &WeiXinRpc{wx: wx}
 	//在此可以注册多个Rpc服务接口