|
@@ -70,3 +70,27 @@ func AppPush(address string, m map[string]interface{}) bool {
|
|
}
|
|
}
|
|
return repl == "y"
|
|
return repl == "y"
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+/*企业级服务、企业数据流量包导数据、历史数据统一数据去重
|
|
|
|
+ *@param address rpc服务地址
|
|
|
|
+ *@param m 示例:map[string]interface{}{"appid": "","entid": 1,"ids": []string{"6466e5d78aea8786d104943c", "6465933e759cdf5aef2ef69c"}}
|
|
|
|
+ * appid、entid 二选一,判重的时候会优先使用appid
|
|
|
|
+ * ids 需要去重的标讯id集合
|
|
|
|
+ *@result map[string]bool{"6466e5d78aea8786d104943c":true} 去重后的标讯id集合
|
|
|
|
+ */
|
|
|
|
+func NoRepeatData(address string, m map[string]interface{}) (map[string]bool, error) {
|
|
|
|
+ defer util.Catch()
|
|
|
|
+ var repl = make(map[string]bool)
|
|
|
|
+ client, err := rpc.DialHTTP("tcp", address)
|
|
|
|
+ if err != nil {
|
|
|
|
+ log.Println("RemoveRepeat.NoRepeat rpc call error", err.Error())
|
|
|
|
+ return repl, err
|
|
|
|
+ }
|
|
|
|
+ defer client.Close()
|
|
|
|
+ err = client.Call("RemoveRepeat.NoRepeat", m, &repl)
|
|
|
|
+ if err != nil {
|
|
|
|
+ log.Println("RemoveRepeat.NoRepeat rpc call error", err.Error())
|
|
|
|
+ return repl, err
|
|
|
|
+ }
|
|
|
|
+ return repl, nil
|
|
|
|
+}
|