|
@@ -4,7 +4,6 @@ import (
|
|
"context"
|
|
"context"
|
|
"fmt"
|
|
"fmt"
|
|
util "jygit.jydev.jianyu360.cn/data_processing/common_utils"
|
|
util "jygit.jydev.jianyu360.cn/data_processing/common_utils"
|
|
-
|
|
|
|
//"github.com/cron"
|
|
//"github.com/cron"
|
|
"github.com/wangbin/jiebago"
|
|
"github.com/wangbin/jiebago"
|
|
"go.mongodb.org/mongo-driver/bson"
|
|
"go.mongodb.org/mongo-driver/bson"
|
|
@@ -99,7 +98,7 @@ func updateStd() {
|
|
|
|
|
|
ctx, _ := context.WithTimeout(context.Background(), 99999*time.Hour)
|
|
ctx, _ := context.WithTimeout(context.Background(), 99999*time.Hour)
|
|
coll := sess.M.C.Database("mixdata").Collection("qyxy_std")
|
|
coll := sess.M.C.Database("mixdata").Collection("qyxy_std")
|
|
- find := options.Find().SetBatchSize(200).SetSort(bson.D{bson.E{"autoid", 1}}).SetProjection(bson.M{"_id": 1, "autoid": 1, "establish_date": 1, "create_time_msql": 1})
|
|
|
|
|
|
+ find := options.Find().SetBatchSize(200).SetSort(bson.D{bson.E{"autoid", 1}}).SetProjection(bson.M{"_id": 1, "autoid": 1, "establish_date": 1, "create_time_msql": 1, "nseo_id": 1})
|
|
cur, err := coll.Find(ctx, bson.M{"autoid": bson.M{"$gt": id}}, find)
|
|
cur, err := coll.Find(ctx, bson.M{"autoid": bson.M{"$gt": id}}, find)
|
|
|
|
|
|
if err != nil {
|
|
if err != nil {
|
|
@@ -113,7 +112,7 @@ func updateStd() {
|
|
cur.Decode(&tmp)
|
|
cur.Decode(&tmp)
|
|
id := util.Int64All(tmp["autoid"])
|
|
id := util.Int64All(tmp["autoid"])
|
|
//存在就不处理
|
|
//存在就不处理
|
|
- if _, ok := tmp["nseo_id"]; ok {
|
|
|
|
|
|
+ if nseoid, ok := tmp["nseo_id"]; ok && nseoid != "" {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
|
|
|