传说这个方法可以生成20亿以内不重复long数值
public long GetCode(string shardField)
{
uint code = 0;
shardField = shardField.Trim();
for (int i = 0; i < shardField.Length; i += 2)
{
code *= 16777619;
code ^= shardField[i];
}
var ss = code;
return ss;
}