瀏覽代碼

fix:公司联想优化

xuemingyang 3 年之前
父節點
當前提交
b4f13c357d

+ 2 - 1
src/jfw/modules/subscribepay/src/config.json

@@ -111,5 +111,6 @@
 	"smsServiceRpc":"127.0.0.1:932",
 	"nsq":"192.168.3.240:4260",
   "nsq_topic": "jy_event",
-  "userCenterApi":"https://web-zxl.jydev.jianyu360.com"
+  "userCenterApi":"https://web-zxl.jydev.jianyu360.com",
+  "companySize": 10
 }

+ 1 - 0
src/jfw/modules/subscribepay/src/config/config.go

@@ -75,6 +75,7 @@ type config struct {
 	Nsq                string
 	Nsq_Topic          string
 	UserCenterApi      string
+	CompanySize        int64
 }
 type mgoConf struct {
 	Address           string

+ 1 - 1
src/jfw/modules/subscribepay/src/service/userAccountInfo.go

@@ -202,7 +202,7 @@ func (this *UserAccount) CompanyAssociation() {
 		name := this.GetString("name")
 		list := []string{}
 		if len([]rune(name)) > 2 {
-			query := fmt.Sprintf(`{"query": {"match_phrase": {"name": "%s"}},"_source": ["name"],"size": %d}`, name, 5)
+			query := fmt.Sprintf(`{"query": {"match_phrase": {"name": "%s"}},"_source": ["name"],"size": %d}`, name, config.Config.CompanySize)
 			r := elastic.Get("qyxy", "qyxy", query)
 			if r != nil {
 				for _, v := range *r {