diff --git a/BBWY.Server.Business/Sync/JDPopularizeSyncBusiness.cs b/BBWY.Server.Business/Sync/JDPopularizeSyncBusiness.cs index a5c61242..3b20e6f1 100644 --- a/BBWY.Server.Business/Sync/JDPopularizeSyncBusiness.cs +++ b/BBWY.Server.Business/Sync/JDPopularizeSyncBusiness.cs @@ -66,29 +66,29 @@ namespace BBWY.Server.Business.Sync }); } - #region 新增pin保存逻辑 - var pinList = jArray.Select(j => j.Value("pin")).Distinct().ToList(); - var dbPinList = fsql.Select().Where(p => p.ShopId == shopId).ToList(p => p.AccessPin); - var pinchajiList = pinList.Except(dbPinList).ToList(); - List insertJDShopPinList = null; - if (pinchajiList.Count() > 0) - { - insertJDShopPinList = pinchajiList.Select(pin => new JdShopPin() - { - Id = idGenerator.NewLong(), - AccessPin = pin, - CreateTime = DateTime.Now, - ShopId = shopId - }).ToList(); - } - #endregion + //#region 新增pin保存逻辑 + //var pinList = jArray.Select(j => j.Value("pin")).Distinct().ToList(); + //var dbPinList = fsql.Select().Where(p => p.ShopId == shopId).ToList(p => p.AccessPin); + //var pinchajiList = pinList.Except(dbPinList).ToList(); + //List insertJDShopPinList = null; + //if (pinchajiList.Count() > 0) + //{ + // insertJDShopPinList = pinchajiList.Select(pin => new JdShopPin() + // { + // Id = idGenerator.NewLong(), + // AccessPin = pin, + // CreateTime = DateTime.Now, + // ShopId = shopId + // }).ToList(); + //} + //#endregion - fsql.Transaction(() => - { - if (insertJDShopPinList != null) - fsql.Insert(insertJDShopPinList).ExecuteAffrows(); - fsql.Insert(insertList).ExecuteAffrows(); - }); + //fsql.Transaction(() => + // { + // if (insertJDShopPinList != null) + // fsql.Insert(insertJDShopPinList).ExecuteAffrows(); + fsql.Insert(insertList).ExecuteAffrows(); + //}); } private void SyncShopPopularizeRecord(ShopResponse shop, DateTime startDate, DateTime endDate, int pageIndex, out int currentCount) @@ -140,12 +140,7 @@ namespace BBWY.Server.Business.Sync private void DeleteOldData(IList shops, DateTime startDate, DateTime endDate) { var shopIds = shops.Select(s => Convert.ToInt64(s.ShopId)).ToList(); - - fsql.Transaction(() => - { - fsql.Delete().Where(p => shopIds.Contains(p.ShopId.Value)).ExecuteAffrows(); - fsql.Delete().Where(s => shopIds.Contains(s.ShopId.Value) && s.Date >= startDate && s.Date <= endDate).ExecuteAffrows(); - }); + fsql.Delete().Where(s => shopIds.Contains(s.ShopId.Value) && s.Date >= startDate && s.Date <= endDate).ExecuteAffrows(); } public void SyncAllShopPopularizeRecord() diff --git a/doc/.back_步步为盈数据库/步步为盈数据库-backup-20221011194630.pdma.json b/doc/.back_步步为盈数据库/步步为盈数据库-backup-20221011194720.pdma.json similarity index 99% rename from doc/.back_步步为盈数据库/步步为盈数据库-backup-20221011194630.pdma.json rename to doc/.back_步步为盈数据库/步步为盈数据库-backup-20221011194720.pdma.json index be9c8b29..9e74e8b3 100644 --- a/doc/.back_步步为盈数据库/步步为盈数据库-backup-20221011194630.pdma.json +++ b/doc/.back_步步为盈数据库/步步为盈数据库-backup-20221011194720.pdma.json @@ -2,9 +2,9 @@ "name": "步步为盈数据库", "describe": "步步为盈数据库关系图", "avatar": "", - "version": "4.1.1", + "version": "4.1.3", "createdTime": "2022-10-3 12:39:39", - "updatedTime": "2022-10-11 19:45:20", + "updatedTime": "2022-10-11 03:56:02", "dbConns": [], "profile": { "default": { diff --git a/doc/步步为盈数据库.pdma.json b/doc/步步为盈数据库.pdma.json index c7cd1ab8..67df4006 100644 --- a/doc/步步为盈数据库.pdma.json +++ b/doc/步步为盈数据库.pdma.json @@ -4,7 +4,7 @@ "avatar": "", "version": "4.1.1", "createdTime": "2022-10-3 12:39:39", - "updatedTime": "2022-10-11 19:46:30", + "updatedTime": "2022-10-11 19:47:20", "dbConns": [], "profile": { "default": {