DuGuYang 3 лет назад
Родитель
Сommit
5cb71e192e
1 измененных файлов с 23 добавлено и 1 удалено
  1. 23 1
      Areas/Admin/Controllers/MainServer/StoreHouseController.cs

+ 23 - 1
Areas/Admin/Controllers/MainServer/StoreHouseController.cs

@@ -715,7 +715,7 @@ namespace MySystem.Areas.Admin.Controllers
                         var user = db.Users.FirstOrDefault(m => m.Id == toStore.UserId) ?? new Users();
                         var userAccount = db.UserAccount.FirstOrDefault(m => m.Id == toStore.UserId) ?? new UserAccount();
                         var brandInfo = db.KqProducts.FirstOrDefault(m => m.Id == Convert.ToInt32(BrandId)) ?? new KqProducts();
-                        var fuserMachineData = db.UserMachineData.FirstOrDefault(m => m.IdBrand == user.Id + "_" + brandInfo.Id);
+                        var fuserMachineData = db.UserMachineData.FirstOrDefault(m => m.IdBrand == userForMakerCode.UserId+ "_" + brandInfo.Id);
                         if (brandInfo.Name.Contains("电签"))
                         {
                             amount = 200;
@@ -801,6 +801,28 @@ namespace MySystem.Areas.Admin.Controllers
 
                                 posInfo.StoreId = toStore.Id;
                                 posInfo.BuyUserId = 0;
+                                posInfo.UserId = 0;
+                                posInfo.RecycEndDate = null;
+                                posInfo.PosSnType = 0;
+                                posInfo.BindMerchantId = 0;
+                                posInfo.ActivityList = null;
+                                posInfo.ScanQrTrade = 0;
+                                posInfo.DebitCardTrade = 0;
+                                posInfo.PrizeParams = null;
+                                posInfo.IsVip = 0;
+                                posInfo.CreditTrade = 0;
+                                posInfo.UserNav = null;
+                                posInfo.TransferTime = null;
+                                posInfo.IsPurchase = 0;
+                                posInfo.BindingTime = null;
+                                posInfo.BindingState = 0;
+                                posInfo.ActivationTime = null;
+                                posInfo.ActivationState = 0;
+                                posInfo.LeaderUserId = 0;
+                                posInfo.PreUserId = 0;
+                                posInfo.IsFirst = 0;
+                                fuserMachineData.TotalMachineCount -= 1;
+                                fuserMachineData.UnBindCount -= 1;
                                 toStore.TotalNum += 1;
                                 toStore.LaveNum += 1;
                                 fromStore.TotalNum -= 1;