2015-10-28 05:48:48 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2015-10-28 06:34:58 +08:00
|
|
|
|
using MBuildModel = RedisMongoMigration.Mongo.BuildModel;
|
|
|
|
|
using MBuild = RedisMongoMigration.Mongo.Build;
|
|
|
|
|
using RBuild = RedisMongoMigration.Redis.Build;
|
|
|
|
|
|
2015-10-28 05:48:48 +08:00
|
|
|
|
namespace MongoTimeChecker
|
|
|
|
|
{
|
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
2015-10-28 06:34:58 +08:00
|
|
|
|
var builds = RBuild.Select();
|
|
|
|
|
|
|
|
|
|
MBuild mBuildObj = new MBuild();
|
|
|
|
|
foreach (var build in builds)
|
|
|
|
|
{
|
|
|
|
|
var mBuild = mBuildObj.SelectByLegacyId(build.Id);
|
|
|
|
|
if(mBuild != null)
|
|
|
|
|
{
|
|
|
|
|
bool isSame = mBuild.BuildTime == build.BuildTime;
|
|
|
|
|
if(!isSame)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine($"{build.FullBuildString}: {build.BuildTime} != {mBuild.BuildTime}");
|
|
|
|
|
DateTime dt = DateTime.SpecifyKind(build.BuildTime.Value, DateTimeKind.Utc);
|
|
|
|
|
mBuildObj.UpdateDateOfLegacy(build.Id, dt);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Console.ReadKey();
|
2015-10-28 05:48:48 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|