From 8992e6cfce0a935dcd716db39b284aa3009b6139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=88=E6=A3=AE=E5=90=B4?= <8402134@qq.com> Date: Mon, 10 Oct 2022 15:15:51 +0800 Subject: [PATCH] 11 --- FLSystem/Forms/AddCloudblack.cs | 11 +++++++++-- 应用/BackupAndImport/ECO/Eco.cs | 3 ++- 应用/BackupAndImport/MainForm.cs | 6 ++++-- 应用/BackupAndImport/NianChu/Nianchu.cs | 3 ++- 应用/BackupAndImport/速推客云端/Stk.cs | 3 ++- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/FLSystem/Forms/AddCloudblack.cs b/FLSystem/Forms/AddCloudblack.cs index c39d258..7aef3a6 100644 --- a/FLSystem/Forms/AddCloudblack.cs +++ b/FLSystem/Forms/AddCloudblack.cs @@ -2,6 +2,7 @@ using Api.Framework.Model; using Api.Framework.Tools; using System; +using System.Text; using Newtonsoft.Json; using UI.Framework.Forms; @@ -29,9 +30,11 @@ namespace FLSystem.Forms { info.status = Api.Framework.Enums.MemberType.黑名单; var session = ApiClient.GetSession(); - session.Updateable(new { status = info.status }).Where(f => f.id == info.id).ExecuteCommand(); + //session.Updateable(new { status = info.status }).Where(f => f.id == info.id).ExecuteCommand(); + session.Updateable(info); var _black = session.Queryable().First(f => f.username == info.username && f.usertype == info.robot_type); + if (_black != null) { _black.nickname = info.usernick; @@ -57,7 +60,9 @@ namespace FLSystem.Forms this.Close(); } else + { throw new Exception(rst.Message ?? rst.Data?.ToString()); + } } catch (Exception ex) { @@ -77,7 +82,9 @@ namespace FLSystem.Forms { info.status = Api.Framework.Enums.MemberType.正常; var session = ApiClient.GetSession(); - session.Updateable(new { status = info.status }).Where(f => f.id == info.id).ExecuteCommand(); + //session.Updateable(new { status = info.status }).Where(f => f.id == info.id).ExecuteCommand(); + session.Updateable(info); + var blackuser = session.Queryable().First(f => f.username == info.username && f.usertype == info.robot_type); if (blackuser != null) { diff --git a/应用/BackupAndImport/ECO/Eco.cs b/应用/BackupAndImport/ECO/Eco.cs index 97ad22d..b5989b7 100644 --- a/应用/BackupAndImport/ECO/Eco.cs +++ b/应用/BackupAndImport/ECO/Eco.cs @@ -570,7 +570,8 @@ namespace BackupAndImport.ECO if (inviter != null) { new_user.inviter_id = inviter.id;//填写上级ID - session.Updateable(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand(); + //session.Updateable(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand(); + session.Updateable(new_user); } else { diff --git a/应用/BackupAndImport/MainForm.cs b/应用/BackupAndImport/MainForm.cs index 1ff7b98..04a4d31 100644 --- a/应用/BackupAndImport/MainForm.cs +++ b/应用/BackupAndImport/MainForm.cs @@ -1004,7 +1004,8 @@ namespace DataDocking if (inviter != null) { new_user.inviter_id = inviter.id;//填写上级ID - session.Updateable(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand(); + //session.Updateable(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand(); + session.Updateable(new_user); } } AddJindu(); @@ -1644,7 +1645,8 @@ namespace DataDocking if (inviter != null) { new_user.inviter_id = inviter.id;//填写上级ID - session.Updateable(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand(); + //session.Updateable(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand(); + session.Updateable(new_user); } } AddJindu(); diff --git a/应用/BackupAndImport/NianChu/Nianchu.cs b/应用/BackupAndImport/NianChu/Nianchu.cs index 80e7340..5f6fda7 100644 --- a/应用/BackupAndImport/NianChu/Nianchu.cs +++ b/应用/BackupAndImport/NianChu/Nianchu.cs @@ -233,7 +233,8 @@ namespace BackupAndImport.NianChu if (inviter != null) { new_user.inviter_id = inviter.id;//填写上级ID - session.Updateable(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand(); + //session.Updateable(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand(); + session.Updateable(new_user); } else { diff --git a/应用/BackupAndImport/速推客云端/Stk.cs b/应用/BackupAndImport/速推客云端/Stk.cs index 7cebe0d..1b35544 100644 --- a/应用/BackupAndImport/速推客云端/Stk.cs +++ b/应用/BackupAndImport/速推客云端/Stk.cs @@ -219,7 +219,8 @@ namespace BackupAndImport.速推客云端 if (inviter != null) { new_user.inviter_id = inviter.id;//填写上级ID - session.Updateable(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand(); + //session.Updateable(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand(); + session.Updateable(new_user); } else {