|
@@ -40,7 +40,7 @@ var MysqlTool *Mysql
|
|
|
|
|
|
//解密
|
|
|
func decodeJyUrl() {
|
|
|
- test := "AbLY1wEcT0FOyo4NHNxZ3IkCCQCIDFjcWhwKS8wOT0wWmpzfVJUCds%3D"
|
|
|
+ test := "ALPY1wIdDIvUC06AlFzcE8zJicCCj1mdmB0Py8nLz0wc35zcFpUCgQ%3D"
|
|
|
var Decode = qu.CommonDecodeArticle("content", test)
|
|
|
log.Debug(Decode[0])
|
|
|
return
|
|
@@ -53,7 +53,75 @@ func encodeJyUrl() {
|
|
|
log.Debug(Encode)
|
|
|
}
|
|
|
|
|
|
+//修复重复标记
|
|
|
+func repairRepeatTag() {
|
|
|
+ log.Debug("6064aa900000000000000000")
|
|
|
+ log.Debug("遍历-result_20220218~查询~result_20210108")
|
|
|
+ log.Debug("重复标记~更新~repeat,repeat_reason,repeat_id")
|
|
|
+ log.Debug("不重复标记~更新~repeat_ids,是否存在")
|
|
|
+ log.Debug("~~~~~~~~~~~~~")
|
|
|
+ log.Debug("~~~~~~~~~~~~~")
|
|
|
+ sess := save_mgo.GetMgoConn()
|
|
|
+ defer save_mgo.DestoryMongoConn(sess)
|
|
|
+ q := map[string]interface{}{
|
|
|
+ "_id": map[string]interface{}{
|
|
|
+ "$lte": StringTOBsonId("6064aa900000000000000000"),
|
|
|
+ },
|
|
|
+ }
|
|
|
+ total,ok_1,ok_2,err_3,err_4 := 0,0,0,0,0
|
|
|
+ it := sess.DB("qfw").C("result_20220218").Find(&q).Sort("_id").Select(map[string]interface{}{
|
|
|
+ "_id":1,
|
|
|
+ }).Iter()
|
|
|
+ for tmp := make(map[string]interface{}); it.Next(&tmp);total++{
|
|
|
+ if total%10000==0 {
|
|
|
+ log.Debug("curent index ",total,"~",ok_1,ok_2,err_3,err_4)
|
|
|
+ }
|
|
|
+
|
|
|
+ tmpid := BsonTOStringId(tmp["_id"])
|
|
|
+
|
|
|
+ data := save_mgo.FindById("result_20210108",tmpid)
|
|
|
+ if data!=nil && len(data)>2 {
|
|
|
+ repeat := qu.IntAll(data["repeat"])
|
|
|
+ if repeat==1 {
|
|
|
+ update := map[string]interface{}{
|
|
|
+ "repeat":1,
|
|
|
+ }
|
|
|
+ if data["repeat_id"]!="" {
|
|
|
+ update["repeat_id"] = data["repeat_id"]
|
|
|
+ }
|
|
|
+ if data["repeat_reason"]!="" {
|
|
|
+ update["repeat_reason"] = data["repeat_reason"]
|
|
|
+ }
|
|
|
+ save_mgo.UpdateById("result_20220218",tmpid, map[string]interface{}{
|
|
|
+ "$set": update,
|
|
|
+ })
|
|
|
+ ok_1++
|
|
|
+ }else {
|
|
|
+ if data["repeat_ids"]!=nil {
|
|
|
+ ok_2++
|
|
|
+ save_mgo.UpdateById("result_20220218",tmpid, map[string]interface{}{
|
|
|
+ "$set": map[string]interface{}{
|
|
|
+ "repeat_ids": data["repeat_ids"],
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ err_3++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ log.Debug("异常~",tmpid)
|
|
|
+ err_4++
|
|
|
+ }
|
|
|
+ tmp = make(map[string]interface{})
|
|
|
+ }
|
|
|
+
|
|
|
+ log.Debug("is bidding over ",total,ok_1,ok_2,err_3,err_4)
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
+//统计医疗器械数据
|
|
|
func tongjiYLQX() {
|
|
|
//ylhydata
|
|
|
sess := save_mgo.GetMgoConn()
|