|
@@ -4,6 +4,7 @@ import (
|
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
|
ME "app.yhyue.com/moapp/jybase/encrypt"
|
|
|
elastic "app.yhyue.com/moapp/jybase/es"
|
|
|
+ "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
"app.yhyue.com/moapp/jybase/redis"
|
|
|
IC "bp.jydev.jianyu360.cn/BaseService/jyMicroservices/jyBXCore/rpc/init"
|
|
|
"fmt"
|
|
@@ -429,9 +430,9 @@ func getArea(entid, positionId int64, labelArr *[]map[string]interface{}) map[st
|
|
|
(t1.行业要素值 IS NULL OR FIND_IN_SET(t0.INDUSTRY, t1.行业要素值)) AND
|
|
|
(t1.地区要素值 IS NULL OR FIND_IN_SET(t0.REGION, t1.地区要素值)) AND
|
|
|
(t1.中标标签要素值 IS NULL OR FIND_IN_SET(t0.WINNER_TAG, t1.中标标签要素值)) AND
|
|
|
- (t1.经营单位要素值 IS NULL OR FIND_IN_SET(t0.tagname2, t1.经营单位要素值)) AND
|
|
|
+ (t1.经营单位要素值 IS NULL OR t1.经营单位要素值="null" or FIND_IN_SET(t0.tagname2, t1.经营单位要素值)) AND
|
|
|
(t0.STATUS = 1)
|
|
|
- GROUP BY area, city, district`, positionId, entid)
|
|
|
+ GROUP BY area, city, district ORDER BY area, city, district`, positionId, entid)
|
|
|
if areaArr == nil || len(*areaArr) == 0 {
|
|
|
//查找全局变量
|
|
|
areaArr = IC.BiMysql.SelectBySql(`
|
|
@@ -850,7 +851,7 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
|
|
|
fmt.Println("时差", end1-start1)
|
|
|
if len(*data) > 0 {
|
|
|
//查询tidb真实数据
|
|
|
- idArr := []interface{}{gconv.String(operator.EntId)}
|
|
|
+ idArr := []interface{}{}
|
|
|
wh := []string{}
|
|
|
for _, v := range *data {
|
|
|
id := gconv.String(v["id"])
|
|
@@ -858,14 +859,10 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
|
|
|
wh = append(wh, "?")
|
|
|
}
|
|
|
sqlStr := fmt.Sprintf(` SELECT
|
|
|
- a.*,b.encrypt_id
|
|
|
+ a.*
|
|
|
FROM
|
|
|
customer_data a
|
|
|
- LEFT JOIN customer_data_yys_project_winner b
|
|
|
- on a.eid=?
|
|
|
- and a.projectId =b.projectId
|
|
|
- and a.s_winner=b.winner_name
|
|
|
- where a.id in (%s)
|
|
|
+ where a.id in (%s)
|
|
|
%s `, strings.Join(wh, ","), mysqlOrderStr)
|
|
|
fmt.Println(sqlStr, idArr)
|
|
|
data = IC.BiMysql.SelectBySql(sqlStr,
|
|
@@ -892,6 +889,12 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
|
|
|
key := gconv.String(m["file"])
|
|
|
newData[key] = v[key]
|
|
|
}
|
|
|
+ bid := gconv.String(v["bid"])
|
|
|
+ if mongodb.IsObjectIdHex(bid) {
|
|
|
+ newData["bid"] = ME.EncodeArticleId2ByCheck(bid)
|
|
|
+ } else {
|
|
|
+ newData["bid"] = ""
|
|
|
+ }
|
|
|
infoid := gconv.String(v["infoid"])
|
|
|
newData["infoid"] = ME.EncodeArticleId2ByCheck(infoid)
|
|
|
(*data)[i] = newData
|