|
@@ -64,9 +64,9 @@ func GetCustomerData() {
|
|
|
exact := qu.IntAll(c["i_exact"])
|
|
|
s_bidding := qu.ObjToString(c["s_bidding"])
|
|
|
log.Println("当前客户 ", customer, s_bidding)
|
|
|
- if appId == "jyFhJXQAYDAANZTEVPFD1U" {
|
|
|
- continue
|
|
|
- }
|
|
|
+ // if appId == "jyFhJXQAYDAANZTEVPFD1U" {
|
|
|
+ // continue
|
|
|
+ // }
|
|
|
cus := &Customer{}
|
|
|
cus.SaveDataMap = map[string]map[string]interface{}{}
|
|
|
cus.SaveDataArr = map[string]map[string]interface{}{}
|
|
@@ -335,8 +335,13 @@ func (c *Customer) GetDepartments(stype string) {
|
|
|
func (c *Customer) GetData(stype string) {
|
|
|
log.Println("开始匹配数据...")
|
|
|
defer qu.Catch()
|
|
|
- esCon := Es.(*esv.EsV7)
|
|
|
- c.EsConGetDataV7(stype, esCon)
|
|
|
+ if stype == "all" {
|
|
|
+ esCon := Es2.(*esv.EsV7)
|
|
|
+ c.EsConGetDataV7(stype, esCon)
|
|
|
+ } else {
|
|
|
+ esCon := Es.(*esv.EsV7)
|
|
|
+ c.EsConGetDataV7(stype, esCon)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
type MySource struct {
|
|
@@ -355,15 +360,20 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 30*time.Minute)
|
|
|
for _, dm := range c.Departments {
|
|
|
for _, sr := range dm.Rules {
|
|
|
- for {
|
|
|
- listLen := redis.GetInt("session", "es_status")
|
|
|
- if listLen == 0 {
|
|
|
- log.Println("es空闲!")
|
|
|
- break
|
|
|
- } else if listLen == 1 || listLen == 2 {
|
|
|
- log.Println("系统繁忙,请稍后再试 ", listLen)
|
|
|
- }
|
|
|
- time.Sleep(5 * time.Second)
|
|
|
+ // for {
|
|
|
+ // listLen := redis.GetInt("session", "es_status")
|
|
|
+ // if listLen == 0 {
|
|
|
+ // log.Println("es空闲!")
|
|
|
+ // break
|
|
|
+ // } else if listLen == 1 || listLen == 2 {
|
|
|
+ // log.Println("系统繁忙,请稍后再试 ", listLen)
|
|
|
+ // }
|
|
|
+ // time.Sleep(5 * time.Second)
|
|
|
+ // }
|
|
|
+ if stype == "all" && c.AppId == "jyFhJXQAYDAANZTEVPFD1U" && sr.ID != "67e64794756e2b3b3b6d5062" {
|
|
|
+ continue
|
|
|
+ } else if stype != "all" && c.AppId == "jyFhJXQAYDAANZTEVPFD1U" && sr.ID == "67e64794756e2b3b3b6d5062" {
|
|
|
+ continue
|
|
|
}
|
|
|
|
|
|
//测试
|
|
@@ -377,7 +387,7 @@ func (c *Customer) EsConGetDataV7(stype string, esCon *esv.EsV7) {
|
|
|
qstr := sr.EsQuery
|
|
|
if stype == "all" {
|
|
|
esindex = "bidding_all"
|
|
|
- escount = Es.Count(esindex, Itype, qstr)
|
|
|
+ escount = Es2.Count(esindex, Itype, qstr)
|
|
|
} else {
|
|
|
escount = Es.Count(esindex, Itype, qstr)
|
|
|
}
|