Explorar o código

Merge branch 'dev3.4' of http://192.168.3.207:10080/qmx/jy-data-extract into dev3.4

* 'dev3.4' of http://192.168.3.207:10080/qmx/jy-data-extract:
  xg
  备份
  xg
  jyhref

# Conflicts:
#	qyxy/src/task.go
Jianghan %!s(int64=4) %!d(string=hai) anos
pai
achega
3eaa64279c
Modificáronse 5 ficheiros con 36 adicións e 18 borrados
  1. 1 1
      projectinfo/src/task.go
  2. 10 1
      qyxy/src/task.go
  3. 5 5
      udpcreateindex/src/main.go
  4. 15 6
      udpfilterdup/src/main.go
  5. 5 5
      udps/main.go

+ 1 - 1
projectinfo/src/task.go

@@ -190,7 +190,7 @@ func GetProjectData(sid, eid string) {
 			//id
 			id := mgoutil.BsonIdToSId(pro["_id"])
 			pro["infoid"] = id
-			pro["jyhref"] = `https://www.jianyu360.com/article/content/` + qu.CommonEncodeArticle("content", id) + `.html`
+			pro["jyhref"] = `/jyapp/article/content/` + qu.CommonEncodeArticle("content", id) + `.html`
 			delete(pro, "_id")
 			//yucetime
 			pro["yucetime"] = time.Now().Unix()

+ 10 - 1
qyxy/src/task.go

@@ -34,6 +34,12 @@ var (
 		[]string{"report_year", "company_phone", "zip_code", "company_email", "employee_no", "operator_name"},
 		[]string{"total_assets", "total_equity", "total_sales", "total_profit", "main_business_income", "profit_amount", "total_tax", "total_liability"},
 	}
+
+	//区域code补全
+	CodeMap = map[int]string{
+		2: "0000",
+		4: "00",
+	}
 )
 
 // var AllFieldListMap = map[string]string{
@@ -389,7 +395,6 @@ func QyxyStandard() bool {
 					EsSaveFlag = false
 				}
 			}
-			//qu.Debug("esMap---", esMap)
 			// qu.Debug("mgoMap---", mgoMap)
 			// return
 			lock.Lock()
@@ -794,6 +799,10 @@ func InitAddress() {
 	address, _ := Mgo.Find("address", nil, nil, nil, false, -1, -1)
 	for _, tmp := range *address {
 		code := qu.ObjToString(tmp["code"])
+		// codeLen := len(code)
+		// if t_code := CodeMap[codeLen]; t_code != "" { //新的address表补齐code
+		// 	code = code + t_code
+		// }
 		remark := fmt.Sprint(tmp["Remarks"])
 		city := &City{}
 		tmpjson, err := json.Marshal(tmp)

+ 5 - 5
udpcreateindex/src/main.go

@@ -46,8 +46,8 @@ var (
 
 func init() {
 	util.ReadConfig(&Sysconfig)
-	//inits()
-	//go checkMapJob()
+	inits()
+	go checkMapJob()
 	detailLength = util.IntAllDef(Sysconfig["detaillength"], 50000)
 	fileLength = util.IntAllDef(Sysconfig["filelength"], 50000)
 	updport, _ = Sysconfig["updport"].(string)
@@ -65,7 +65,7 @@ func init() {
 		MongodbAddr: mconf["addr"].(string),
 		Size:        util.IntAllDef(mconf["pool"], 5),
 		DbName:      mconf["db"].(string),
-		//ReplSet:     "bidding",
+		ReplSet:     "bidding",
 	}
 	mgo.InitPool()
 
@@ -101,7 +101,7 @@ func init() {
 	}
 	mgostandard = &mongodb.MongodbSim{
 		MongodbAddr: standard["addr"].(string),
-		//ReplSet:     "bidding",
+		ReplSet:     "bidding",
 		Size:        util.IntAllDef(standard["pool"], 5),
 		DbName:      standard["db"].(string),
 	}
@@ -182,7 +182,7 @@ func init() {
 }
 
 func main() {
-	//go task_index()
+	go task_index()
 	updport := Sysconfig["udpport"].(string)
 	udpclient = mu.UdpClient{Local: updport, BufSize: 1024}
 	udpclient.Listen(processUdpMsg)

+ 15 - 6
udpfilterdup/src/main.go

@@ -58,7 +58,7 @@ var (
 
 
 func init() {
-	
+
 	flag.StringVar(&lastid, "id", "", "增量加载的lastid") //增量
 	flag.StringVar(&gtid, "gtid", "", "历史增量的起始id")	//历史
 	flag.StringVar(&gtept, "gtept", "", "全量gte发布时间")//全量区间pt
@@ -132,11 +132,6 @@ func init() {
 
 func main() {
 
-	//exportAllBuyerAlias()
-	////testmain()
-	//return
-
-
 	go checkMapJob()
 	updport := Sysconfig["udpport"].(string)
 	udpclient = mu.UdpClient{Local: updport, BufSize: 1024}
@@ -171,6 +166,20 @@ func main() {
 
 //测试组人员使用
 func mainT() {
+	//dealBuyerAlias() //生成别名
+	//dealWithBuyerNameAliasRecord()//处理数据-别名相关
+	//dealRepeatAliasBuyerName() //处理多余重复
+	//exportXiuFuData()
+	//buyerRedisXiuFuData()//更新别名
+	//exportAllBuyerAlias() //导出测试数据
+
+
+	dealWithAddressData()//城市
+
+
+
+	return
+
 	if TimingTask {
 		go historyTaskDay()
 		time.Sleep(99999 * time.Hour)

+ 5 - 5
udps/main.go

@@ -16,14 +16,14 @@ var startDate, endDate string
 
 func main() {
 	ip, p, tmptime, tmpkey, id1, id2, stype, q, bkey, param, ids := "", 0, 0, "", "", "", "", "", "", "", ""
-	flag.StringVar(&startDate, "start", "2020-10-10", "开始日期2006-01-02")
+	flag.StringVar(&startDate, "start", "", "开始日期2006-01-02")
 	flag.StringVar(&endDate, "end", "", "结束日期2006-01-02")
-	flag.StringVar(&ip, "ip", "127.0.0.1", "ip")
-	flag.IntVar(&p, "p", 1483, "端口")
+	flag.StringVar(&ip, "ip", "192.168.3.205", "ip")
+	flag.IntVar(&p, "p", 1484, "端口")
 	flag.IntVar(&tmptime, "tmptime", 0, "时间查询")
 	flag.StringVar(&tmpkey, "tmpkey", "", "时间字段")
-	flag.StringVar(&id1, "gtid", "5ed869759e628c5991636bca", "gtid")
-	flag.StringVar(&id2, "lteid", "5eec14bd4c87bb08581c03cb", "lteid")
+	flag.StringVar(&id1, "gtid", "5a86328a40d2d9bbe88e4138", "gtid")
+	flag.StringVar(&id2, "lteid", "5a8f8cd340d2d9bbe8a21400", "lteid")
 	flag.StringVar(&ids, "ids", "", "id1,id2")
 	flag.StringVar(&stype, "stype", "biddingall", "stype,传递类型")
 	flag.StringVar(&bkey, "bkey", "", "bkey,加上此参数表示不生关键词和摘要")