This commit is contained in:
parent
83042d09fa
commit
1e1510907c
|
@ -0,0 +1,89 @@
|
|||
using Api.Framework;
|
||||
using Api.Framework.SDK;
|
||||
using Api.Framework.Tools;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace DataDocking
|
||||
{
|
||||
internal class AutoBakThread : TimerTask
|
||||
{
|
||||
public override void Run(object state, bool timedOut)
|
||||
{
|
||||
try
|
||||
{
|
||||
#region 定时备份sqlite数据库的数据
|
||||
if (Class1.Config.Auto_Bak_OnOff)
|
||||
{
|
||||
if (ApiClient.GetSession().CurrentConnectionConfig.DbType == SqlSugar.DbType.MySql) return;
|
||||
if (string.IsNullOrWhiteSpace(Class1.Config.Auto_Bak_Path))
|
||||
{
|
||||
Class1.Config.Auto_Bak_Path = Util.MapPath($"File\\备份");
|
||||
Util.Save(Class1.Config);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(Class1.Config.Auto_Bak_Path) && Directory.Exists(Class1.Config.Auto_Bak_Path))
|
||||
{
|
||||
try
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
if (Class1.Config.Lately_Bak_Time.Date <= now.Date)
|
||||
{
|
||||
if (DateTime.Now.AddSeconds(-3).ToString("HHmm") == Class1.Config.Auto_Bak_Time.ToString("HHmm"))
|
||||
{
|
||||
Class1.Config.Lately_Bak_Time = Class1.Config.Lately_Bak_Time.Date.AddDays(Class1.Config.Auto_Bak_Day);
|
||||
Api.Framework.Tools.Util.Save(Class1.Config);
|
||||
|
||||
#region 删除很久以前的备份
|
||||
DirectoryInfo root = new DirectoryInfo(Class1.Config.Auto_Bak_Path.Trim());
|
||||
List<FileInfo> files = root.GetFiles().ToList().Where(f => f.Name.StartsWith("数据库")).OrderBy(f => f.CreationTime).ToList();
|
||||
if (files.Count >= 7)
|
||||
{
|
||||
int removeNum = files.Count - 7;
|
||||
for (int i = 0; i < removeNum; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(files[i].FullName);
|
||||
}
|
||||
catch (Exception)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
var path = Path.Combine(new string[] { Class1.Config.Auto_Bak_Path.Trim(), "数据库" + DateTime.Now.ToString("yyyyMMddHHmmssfff") });
|
||||
File.Copy(Util.MapFile("数据库.db", "Config"), path);
|
||||
if (File.Exists(path))
|
||||
{
|
||||
if (Class1.Config.Is_Bak_Send_Email)
|
||||
{
|
||||
Zip.Process(new string[] { path });
|
||||
|
||||
var zipPath = path + ".zip";
|
||||
if (File.Exists(zipPath))
|
||||
ApiClient.SendAdminEmail(ApiClient.Setting.SystemConfig.account_admin_email, $"数据库备份{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}", "数据库备份", zipPath, true);
|
||||
}
|
||||
EventClient.OnEvent(this, "定时备份成功 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:dd"));
|
||||
}
|
||||
else
|
||||
EventClient.OnEvent(this, "定时备份失败 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:dd"));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
EventClient.OnEvent(this, "定时备份异常" + ex.Message + "-" + ex.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
EventClient.OnEvent(this, ex.Message + " - " + ex.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,206 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{35A30202-1D63-413A-AD12-8FFB24165B43}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>BackupAndImport</RootNamespace>
|
||||
<AssemblyName>BackupAndImport</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Debug\Plugin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Api.Framework">
|
||||
<HintPath>..\..\Debug\Api.Framework.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Chat.Framework">
|
||||
<HintPath>..\..\Debug\Chat.Framework.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Printing.v19.2.Core, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraPrinting.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Grant.Framework">
|
||||
<HintPath>..\..\Debug\Grant.Framework.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="HttpHelper, Version=2.1.10.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Debug\HttpHelper.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DLL\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.HSSF">
|
||||
<HintPath>..\..\DLL\NPOI.HSSF.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="SqlSugar, Version=4.9.9.3, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Debug\SqlSugar.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="UI.Framework">
|
||||
<HintPath>..\..\Debug\UI.Framework.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AutoBakThread.cs" />
|
||||
<Compile Include="CheckAdminForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CheckAdminForm.Designer.cs">
|
||||
<DependentUpon>CheckAdminForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="Config.cs" />
|
||||
<Compile Include="ECO\Eco.cs" />
|
||||
<Compile Include="ECO\Entitys\EcoLoginInfo.cs" />
|
||||
<Compile Include="ECO\Entitys\ECOMemberInfo.cs" />
|
||||
<Compile Include="ECO\Entitys\ECOOrderInfo.cs" />
|
||||
<Compile Include="ECO\EventLog.cs" />
|
||||
<Compile Include="ECO\Events\LogEvent.cs" />
|
||||
<Compile Include="ECO\Tools.cs" />
|
||||
<Compile Include="EditRobotNameForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="EditRobotNameForm.Designer.cs">
|
||||
<DependentUpon>EditRobotNameForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Entitys\alitools\AliOrder.cs" />
|
||||
<Compile Include="Entitys\annaer_cloud\member.cs" />
|
||||
<Compile Include="Entitys\annaer\会员信息.cs" />
|
||||
<Compile Include="Entitys\annaer\上下级管理.cs" />
|
||||
<Compile Include="Entitys\annaer_cloud\fission.cs" />
|
||||
<Compile Include="Entitys\BindCache.cs" />
|
||||
<Compile Include="Entitys\alitools\MemberInfo.cs" />
|
||||
<Compile Include="Entitys\AliOrder.cs" />
|
||||
<Compile Include="Entitys\PrimaryKeyTemp.cs" />
|
||||
<Compile Include="Entitys\lieke\GroupInvite.cs" />
|
||||
<Compile Include="Entitys\lieke\Member.cs" />
|
||||
<Compile Include="Entitys\RobotUpdateName.cs" />
|
||||
<Compile Include="Entitys\淘某喵\members_46349.cs" />
|
||||
<Compile Include="Entitys\淘某喵\rewarded_orders_46349.cs" />
|
||||
<Compile Include="NianChu\Entitys\members.cs" />
|
||||
<Compile Include="NianChu\Entitys\robots.cs" />
|
||||
<Compile Include="Entitys\念初\member.cs" />
|
||||
<Compile Include="Entitys\念初\orders.cs" />
|
||||
<Compile Include="Entitys\悠哉\member.cs" />
|
||||
<Compile Include="Entitys\淘某喵\members_41235.cs" />
|
||||
<Compile Include="Entitys\淘某喵\rewarded_orders_41235.cs" />
|
||||
<Compile Include="Entitys\速推客\代理管理.cs" />
|
||||
<Compile Include="Entitys\速推客\会员信息.cs" />
|
||||
<Compile Include="Enums.cs" />
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainForm.Designer.cs">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NianChu\Entitys\TbOrder.cs" />
|
||||
<Compile Include="NianChu\EventLog.cs" />
|
||||
<Compile Include="NianChu\Nianchu.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="TestMutipleThreadRestEvent.cs" />
|
||||
<Compile Include="Tools.cs" />
|
||||
<Compile Include="UserId.cs" />
|
||||
<Compile Include="Utils\SetConnectionConfig.cs" />
|
||||
<Compile Include="速推客云端\Entitys\STKMemberInfo.cs" />
|
||||
<Compile Include="速推客云端\EventLog.cs" />
|
||||
<Compile Include="速推客云端\Stk.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="CheckAdminForm.resx">
|
||||
<DependentUpon>CheckAdminForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="EditRobotNameForm.resx">
|
||||
<DependentUpon>EditRobotNameForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Resources\备份与导入.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,117 @@
|
|||
namespace BackupAndImport
|
||||
{
|
||||
partial class CheckAdminForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(71, 37);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(127, 14);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "请输入软件登录密码:";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(204, 34);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.PasswordChar = '*';
|
||||
this.textBox1.Size = new System.Drawing.Size(259, 22);
|
||||
this.textBox1.TabIndex = 1;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(156, 95);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(122, 30);
|
||||
this.button1.TabIndex = 2;
|
||||
this.button1.Text = "确 定";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(317, 95);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(122, 30);
|
||||
this.button2.TabIndex = 2;
|
||||
this.button2.Text = "取 消";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.button2_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.ForeColor = System.Drawing.Color.Blue;
|
||||
this.label2.Location = new System.Drawing.Point(186, 70);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(211, 14);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "注:确保数据为管理导出,请验证身份";
|
||||
//
|
||||
// CheckAdminForm
|
||||
//
|
||||
this.AcceptButton = this.button1;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.button2;
|
||||
this.ClientSize = new System.Drawing.Size(539, 147);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.textBox1);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "CheckAdminForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "用户身份验证";
|
||||
this.Load += new System.EventHandler(this.CheckAdminForm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Label label2;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
using UI.Framework.Forms;
|
||||
using Api.Framework.Tools;
|
||||
using CsharpHttpHelper;
|
||||
using Grant.Framework;
|
||||
|
||||
namespace BackupAndImport
|
||||
{
|
||||
public partial class CheckAdminForm : BaseForm
|
||||
{
|
||||
public CheckAdminForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(textBox1.Text.Trim()))
|
||||
throw new Exception("请输入软件登录密码");
|
||||
|
||||
string pass = HttpExtend.DESEncrypt(textBox1.Text.Trim(), "12345678", "12378946");
|
||||
//var Config = new Api.Framework.Tools.IniHelper(HttpExtend.MapFile("系统配置.ini", "Config"));
|
||||
//var passData = Config.GetValue("帐号信息", "密码");
|
||||
if (pass == GrantClient.LoginPassMd5)
|
||||
this.DialogResult = DialogResult.OK;
|
||||
else
|
||||
throw new Exception("密码错误");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowErrorAutoClose(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckAdminForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Loding.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -0,0 +1,76 @@
|
|||
using Api.Framework;
|
||||
using Api.Framework.SDK;
|
||||
using BackupAndImport.Properties;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataDocking
|
||||
{
|
||||
public class Class1 : Plugin
|
||||
{
|
||||
|
||||
public Class1()
|
||||
{
|
||||
this.Logo = Resources.备份与导入;
|
||||
this.Name = Resources.PluginName;
|
||||
this.Note = Resources.PluginNote;
|
||||
}
|
||||
|
||||
#region 自定义变量
|
||||
public static Config Config = null;
|
||||
private MainForm mainForm = null;
|
||||
#endregion
|
||||
|
||||
public override void Start()
|
||||
{
|
||||
try
|
||||
{
|
||||
Config = this.ReadConfig<Config>();
|
||||
//创建线程
|
||||
TimerTask.NewTimer<AutoBakThread>(60); //创建线程 - 自动备份的线程 60秒
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.OnLog(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public override void ShowForm()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (mainForm == null || mainForm.IsDisposed)
|
||||
{
|
||||
mainForm = new MainForm();
|
||||
mainForm.Show();
|
||||
}
|
||||
mainForm.TopMost = true;
|
||||
mainForm.TopMost = false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.OnLog(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Stop()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (mainForm != null)
|
||||
{
|
||||
mainForm.CloseForm();
|
||||
mainForm = null;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.OnLog(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
using Api.Framework.SDK;
|
||||
using Api.Framework.Tools;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataDocking
|
||||
{
|
||||
[Config(Name = "插件-数据对接-配置")]
|
||||
public class Config
|
||||
{
|
||||
public Config()
|
||||
{
|
||||
|
||||
#region 自动备份
|
||||
this.Auto_Bak_OnOff = true;
|
||||
this.Auto_Bak_Path = Util.MapPath($"File\\备份");
|
||||
this.Auto_Bak_Time = DateTime.Parse("2019-5-15 23:59:59");
|
||||
this.Auto_Bak_Day = 1;
|
||||
this.Lately_Bak_Time = DateTime.Parse("2019-5-15 00:00:00");
|
||||
this.Is_Bak_Send_Email = false;
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#region 自动备份
|
||||
/// <summary>
|
||||
/// 自动备份开关
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public bool Auto_Bak_OnOff { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自动备份路径
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public string Auto_Bak_Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自动备份时间
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public DateTime Auto_Bak_Time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自动备份间隔
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public int Auto_Bak_Day { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自动备份间隔
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public bool Is_Bak_Send_Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最近自动备份日期(记录)
|
||||
/// </summary>
|
||||
public DateTime Lately_Bak_Time { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.ECO.Entitys
|
||||
{
|
||||
public class ECOMemberInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备ID
|
||||
/// </summary>
|
||||
public string device_id { get; set; }
|
||||
/// <summary>
|
||||
/// 用户昵称
|
||||
/// </summary>
|
||||
public string usernick { get; set; }
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
/// </summary>
|
||||
public string username { get; set; }
|
||||
/// <summary>
|
||||
/// 可提现金额
|
||||
/// </summary>
|
||||
public double cur_point { get; set; }
|
||||
/// <summary>
|
||||
/// 上级用户id
|
||||
/// </summary>
|
||||
public string invite_username { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static BackupAndImport.ECO.Eco;
|
||||
|
||||
namespace BackupAndImport.ECO.Entitys
|
||||
{
|
||||
public class ECOOrderInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询用户信息的id
|
||||
/// </summary>
|
||||
public string eco_id { get; set; }
|
||||
/// <summary>
|
||||
/// 订单是否绑定
|
||||
/// </summary>
|
||||
public bool isBing { get; set; }
|
||||
/// <summary>
|
||||
/// 订单是否完成
|
||||
/// </summary>
|
||||
public bool isComplete { get; set; }
|
||||
/// <summary>
|
||||
/// 商品id
|
||||
/// </summary>
|
||||
public string itemId { get; set; }
|
||||
/// <summary>
|
||||
/// 订单编号
|
||||
/// </summary>
|
||||
public string orderId { get; set; }
|
||||
/// <summary>
|
||||
/// 设备id
|
||||
/// </summary>
|
||||
public string deviceWxId { get; set; }
|
||||
/// <summary>
|
||||
/// 绑定用户的微信id
|
||||
/// </summary>
|
||||
public string fromWxId { get; set; }
|
||||
/// <summary>
|
||||
/// 订单状态
|
||||
/// </summary>
|
||||
public OrderStateType payStatus { get; set; }
|
||||
/// <summary>
|
||||
/// 平台类型
|
||||
/// </summary>
|
||||
public OrderType platformId { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.ECO.Entitys
|
||||
{
|
||||
public class EcoLoginInfo
|
||||
{
|
||||
public string username { get; set; }
|
||||
|
||||
public string loginValicateSingle { get; set; }
|
||||
|
||||
public string loginValicateName { get; set; }
|
||||
|
||||
public string token { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
using BackupAndImport.ECO.Events;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.ECO
|
||||
{
|
||||
public class EventLog
|
||||
{
|
||||
/// <summary>
|
||||
/// 日志事件
|
||||
/// </summary>
|
||||
public static event EventHandler<LogEvent> LogEvent;
|
||||
|
||||
public static void OnEvent(object sender, string log)
|
||||
{
|
||||
OnEvent(sender, new LogEvent(log));
|
||||
}
|
||||
/// <summary>
|
||||
/// 输出日志
|
||||
/// </summary>
|
||||
internal static void OnEvent(object sender, LogEvent e)
|
||||
{
|
||||
if (LogEvent != null)
|
||||
{
|
||||
LogEvent.Invoke(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.ECO.Events
|
||||
{
|
||||
public class LogEvent : EventArgs
|
||||
{
|
||||
public Exception Exception { get; internal set; }
|
||||
public string Message { get; set; }
|
||||
public DateTime CrtTime { get; private set; }
|
||||
public LogEvent(string message)
|
||||
{
|
||||
this.Message = message;
|
||||
this.CrtTime = DateTime.Now;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.ECO
|
||||
{
|
||||
class Tools
|
||||
{
|
||||
#region 直接删除指定目录下的所有文件及文件夹(保留目录)
|
||||
|
||||
/// <summary>
|
||||
///直接删除指定目录下的所有文件及文件夹(保留目录)
|
||||
/// </summary>
|
||||
/// <param name="strPath">文件夹路径</param>
|
||||
/// <returns>执行结果</returns>
|
||||
|
||||
public static void DeleteDir(string file)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
//去除文件夹和子文件的只读属性
|
||||
//去除文件夹的只读属性
|
||||
System.IO.DirectoryInfo fileInfo = new DirectoryInfo(file);
|
||||
fileInfo.Attributes = FileAttributes.Normal & FileAttributes.Directory;
|
||||
|
||||
//去除文件的只读属性
|
||||
System.IO.File.SetAttributes(file, System.IO.FileAttributes.Normal);
|
||||
|
||||
//判断文件夹是否还存在
|
||||
if (Directory.Exists(file))
|
||||
{
|
||||
foreach (string f in Directory.GetFileSystemEntries(file))
|
||||
{
|
||||
|
||||
if (File.Exists(f))
|
||||
{
|
||||
//如果有子文件删除文件
|
||||
File.Delete(f);
|
||||
//Console.WriteLine(f);
|
||||
}
|
||||
else
|
||||
{
|
||||
//循环递归删除子文件夹
|
||||
DeleteDir(f);
|
||||
}
|
||||
}
|
||||
//删除空文件夹
|
||||
Directory.Delete(file);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) // 异常处理
|
||||
{
|
||||
Console.WriteLine(ex.Message.ToString());// 异常信息
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
namespace BackupAndImport
|
||||
{
|
||||
partial class EditRobotNameForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.gridControl1 = new DevExpress.XtraGrid.GridControl();
|
||||
this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
|
||||
this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
|
||||
this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
|
||||
this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn();
|
||||
this.labelControl10 = new DevExpress.XtraEditors.LabelControl();
|
||||
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// gridControl1
|
||||
//
|
||||
this.gridControl1.Location = new System.Drawing.Point(1, 37);
|
||||
this.gridControl1.MainView = this.gridView1;
|
||||
this.gridControl1.Name = "gridControl1";
|
||||
this.gridControl1.Size = new System.Drawing.Size(588, 306);
|
||||
this.gridControl1.TabIndex = 7;
|
||||
this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
|
||||
this.gridView1});
|
||||
//
|
||||
// gridView1
|
||||
//
|
||||
this.gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true;
|
||||
this.gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
|
||||
this.gridColumn1,
|
||||
this.gridColumn3,
|
||||
this.gridColumn9});
|
||||
this.gridView1.GridControl = this.gridControl1;
|
||||
this.gridView1.Name = "gridView1";
|
||||
this.gridView1.OptionsPrint.PrintVertLines = false;
|
||||
this.gridView1.OptionsView.ShowGroupPanel = false;
|
||||
this.gridView1.CellValueChanged += new DevExpress.XtraGrid.Views.Base.CellValueChangedEventHandler(this.gridView1_CellValueChanged);
|
||||
//
|
||||
// gridColumn1
|
||||
//
|
||||
this.gridColumn1.AppearanceCell.Options.UseTextOptions = true;
|
||||
this.gridColumn1.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.gridColumn1.AppearanceHeader.Options.UseTextOptions = true;
|
||||
this.gridColumn1.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.gridColumn1.Caption = "当前机器人昵称";
|
||||
this.gridColumn1.FieldName = "nick";
|
||||
this.gridColumn1.Name = "gridColumn1";
|
||||
this.gridColumn1.OptionsColumn.AllowEdit = false;
|
||||
this.gridColumn1.OptionsColumn.AllowFocus = false;
|
||||
this.gridColumn1.Visible = true;
|
||||
this.gridColumn1.VisibleIndex = 0;
|
||||
this.gridColumn1.Width = 151;
|
||||
//
|
||||
// gridColumn3
|
||||
//
|
||||
this.gridColumn3.AppearanceCell.Options.UseTextOptions = true;
|
||||
this.gridColumn3.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.gridColumn3.Caption = "当前机器人账号";
|
||||
this.gridColumn3.FieldName = "name";
|
||||
this.gridColumn3.Name = "gridColumn3";
|
||||
this.gridColumn3.OptionsColumn.AllowEdit = false;
|
||||
this.gridColumn3.OptionsColumn.AllowFocus = false;
|
||||
this.gridColumn3.Visible = true;
|
||||
this.gridColumn3.VisibleIndex = 1;
|
||||
this.gridColumn3.Width = 125;
|
||||
//
|
||||
// gridColumn9
|
||||
//
|
||||
this.gridColumn9.AppearanceCell.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
this.gridColumn9.AppearanceCell.BackColor2 = System.Drawing.Color.LightGray;
|
||||
this.gridColumn9.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Underline);
|
||||
this.gridColumn9.AppearanceCell.ForeColor = System.Drawing.Color.Blue;
|
||||
this.gridColumn9.AppearanceCell.Options.UseBackColor = true;
|
||||
this.gridColumn9.AppearanceCell.Options.UseFont = true;
|
||||
this.gridColumn9.AppearanceCell.Options.UseForeColor = true;
|
||||
this.gridColumn9.AppearanceCell.Options.UseTextOptions = true;
|
||||
this.gridColumn9.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.gridColumn9.Caption = "新机器人账号";
|
||||
this.gridColumn9.FieldName = "newName";
|
||||
this.gridColumn9.Name = "gridColumn9";
|
||||
this.gridColumn9.Visible = true;
|
||||
this.gridColumn9.VisibleIndex = 2;
|
||||
this.gridColumn9.Width = 113;
|
||||
//
|
||||
// labelControl10
|
||||
//
|
||||
this.labelControl10.Appearance.ForeColor = System.Drawing.Color.Gray;
|
||||
this.labelControl10.Appearance.Options.UseForeColor = true;
|
||||
this.labelControl10.Location = new System.Drawing.Point(357, 3);
|
||||
this.labelControl10.Name = "labelControl10";
|
||||
this.labelControl10.Size = new System.Drawing.Size(232, 28);
|
||||
this.labelControl10.TabIndex = 12;
|
||||
this.labelControl10.Text = "修改机器人账号请点击单元格,即可直接修改\r\n(不修改的不操作即可)";
|
||||
//
|
||||
// simpleButton1
|
||||
//
|
||||
this.simpleButton1.Location = new System.Drawing.Point(403, 353);
|
||||
this.simpleButton1.Name = "simpleButton1";
|
||||
this.simpleButton1.Size = new System.Drawing.Size(175, 34);
|
||||
this.simpleButton1.TabIndex = 13;
|
||||
this.simpleButton1.Text = "点击确认";
|
||||
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.BackColor = System.Drawing.Color.White;
|
||||
this.label3.Font = new System.Drawing.Font("黑体", 18F);
|
||||
this.label3.Location = new System.Drawing.Point(80, 131);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(430, 24);
|
||||
this.label3.TabIndex = 20;
|
||||
this.label3.Text = "当前不存在机器人数据,请先登录机器人";
|
||||
//
|
||||
// EditRobotNameForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(590, 395);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.simpleButton1);
|
||||
this.Controls.Add(this.labelControl10);
|
||||
this.Controls.Add(this.gridControl1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "EditRobotNameForm";
|
||||
this.Text = "设置要修改的机器账号";
|
||||
this.Load += new System.EventHandler(this.EditRobotNameForm_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraGrid.GridControl gridControl1;
|
||||
private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
|
||||
private DevExpress.XtraGrid.Columns.GridColumn gridColumn3;
|
||||
private DevExpress.XtraGrid.Columns.GridColumn gridColumn9;
|
||||
private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
|
||||
private DevExpress.XtraEditors.LabelControl labelControl10;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton1;
|
||||
private System.Windows.Forms.Label label3;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraEditors;
|
||||
using UI.Framework.Forms;
|
||||
using Api.Framework;
|
||||
using Api.Framework.Tools;
|
||||
using Api.Framework.Model;
|
||||
using BackupAndImport.Entitys;
|
||||
|
||||
namespace BackupAndImport
|
||||
{
|
||||
public partial class EditRobotNameForm : BaseForm
|
||||
{
|
||||
|
||||
public Dictionary<string, string> RobotNameDic = null;
|
||||
|
||||
public EditRobotNameForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
RobotNameDic = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
private void gridView1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
|
||||
{
|
||||
List<RobotUpdateName> robots = null;
|
||||
try
|
||||
{
|
||||
robots = gridControl1.DataSource as List<RobotUpdateName>;
|
||||
if (e.Column.Caption == "新机器人账号" && e.Value != null)
|
||||
{
|
||||
var selectRow = gridView1.GetSelectedRows()[0];
|
||||
var name = this.gridView1.GetRowCellValue(selectRow, "name").ToString();//获取name列的数据
|
||||
|
||||
var newName = e.Value.ToString().Trim();
|
||||
if (!string.IsNullOrWhiteSpace(newName))
|
||||
{
|
||||
//var session = ApiClient.GetSession();
|
||||
var robot = robots.FirstOrDefault(f => f.name == newName);
|
||||
if (robot == null)
|
||||
robot = robots.Where(f => f.name != name).FirstOrDefault(f => f.newName == newName);
|
||||
if (robot != null)
|
||||
{
|
||||
robot = robots.FirstOrDefault(f => f.name == name);
|
||||
if (robot != null) robot.newName = string.Empty;
|
||||
throw new Exception("设置的账号已被使用");
|
||||
}
|
||||
|
||||
var isExit = RobotNameDic.Values.FirstOrDefault(f => f == newName);
|
||||
if (!string.IsNullOrWhiteSpace(isExit)) throw new Exception("设置的账号已被使用");
|
||||
|
||||
if (RobotNameDic.ContainsKey(name))
|
||||
RobotNameDic[name] = newName;
|
||||
else
|
||||
RobotNameDic.Add(name, newName);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (RobotNameDic.ContainsKey(name))
|
||||
RobotNameDic.Remove(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowError(ex);
|
||||
}
|
||||
gridControl1.DataSource = robots;
|
||||
}
|
||||
|
||||
private void EditRobotNameForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var session = ApiClient.GetSession();
|
||||
var robotUpdateName = new List<RobotUpdateName>();
|
||||
var robots = session.FindRobots();
|
||||
if (robots != null)
|
||||
{
|
||||
robots = robots.Where(f => f.type == Api.Framework.SDK.ChatType.微信 && f.remark != "PCWechat HOOK").ToList();
|
||||
if (robots != null && robots.Count != 0)
|
||||
{
|
||||
foreach (var item in robots)
|
||||
{
|
||||
robotUpdateName.Add(new RobotUpdateName()
|
||||
{
|
||||
name = item.name,
|
||||
nick = item.nick,
|
||||
newName = string.Empty
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
gridControl1.DataSource = robotUpdateName;
|
||||
label3.Visible = gridView1.RowCount == 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void simpleButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (RobotNameDic.Count == 0 && XtraMessageBox.Show(@"当前没有修改的数据,是否取消?", "温馨提示", MessageBoxButtons.YesNo) == DialogResult.No) return;
|
||||
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Loding.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -0,0 +1,33 @@
|
|||
using Api.Framework.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单状态信息
|
||||
/// </summary>
|
||||
public class AliOrder
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户账号
|
||||
/// </summary>
|
||||
public string username { get; set; }
|
||||
/// <summary>
|
||||
/// 订单号
|
||||
/// </summary>
|
||||
public string orderid { get; set; }
|
||||
/// <summary>
|
||||
/// 订单状态
|
||||
/// </summary>
|
||||
public int? status { get; set; }
|
||||
/// <summary>
|
||||
/// 冻结时间
|
||||
/// </summary>
|
||||
public string endtime { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataDocking.Entitys
|
||||
{
|
||||
public class BindCache
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户微信id
|
||||
/// </summary>
|
||||
public string username { get; set; }
|
||||
/// <summary>
|
||||
/// 订单号
|
||||
/// </summary>
|
||||
public string orderid { get; set; }
|
||||
/// <summary>
|
||||
/// 订单状态
|
||||
/// </summary>
|
||||
public string status { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataDocking.Entitys
|
||||
{
|
||||
public class PrimaryKeyTemp
|
||||
{
|
||||
public int OldId {get;set;}
|
||||
|
||||
public long NewId { get; set; }
|
||||
|
||||
public string UserName { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys
|
||||
{
|
||||
public class RobotUpdateName
|
||||
{
|
||||
/// <summary>
|
||||
/// 原始昵称
|
||||
/// </summary>
|
||||
public string nick { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 原始账号
|
||||
/// </summary>
|
||||
public string name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 新账号
|
||||
/// </summary>
|
||||
public string newName { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.alitools
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单状态信息
|
||||
/// </summary>
|
||||
public class AliOrder
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户账号
|
||||
/// </summary>
|
||||
public string username { get; set; }
|
||||
/// <summary>
|
||||
/// 订单号
|
||||
/// </summary>
|
||||
public string orderid { get; set; }
|
||||
/// <summary>
|
||||
/// 订单状态
|
||||
/// </summary>
|
||||
public string status { get; set; }
|
||||
/// <summary>
|
||||
/// 冻结时间
|
||||
/// </summary>
|
||||
public string endtime { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
|
||||
namespace DataDocking.Entitys.alitools
|
||||
{
|
||||
public class MemberInfo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int UserType { get; set; }
|
||||
|
||||
public string UserName { get; set; }
|
||||
|
||||
public int RecId { get; set; }
|
||||
|
||||
public double Point { get; set; }
|
||||
|
||||
public double SumPoint { get; set; }
|
||||
|
||||
public double TicPoint { get; set; }
|
||||
|
||||
public DateTime CrtTime { get; set; }
|
||||
|
||||
public string NickName { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
namespace BackupAndImport.Entitys.annaer
|
||||
{
|
||||
public class 上下级管理
|
||||
{
|
||||
public string 时间 { get; set; }
|
||||
public string 上级对应ID { get; set; }
|
||||
|
||||
public string 下级对应ID { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,254 @@
|
|||
using SqlSugar;
|
||||
using System;
|
||||
|
||||
namespace BackupAndImport.Entitys.annaer
|
||||
{
|
||||
|
||||
[SugarTable("会员信息")]
|
||||
public partial class 会员信息
|
||||
{
|
||||
public 会员信息()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public string 对应ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 微信名字 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 姓名 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 支付宝 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? 总提现金额 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? 可提现金额 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? 未收货金额 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? 总成功订单 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? 签到次数 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? 签到奖励 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 签到时间 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? 推广奖励 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 定向比例 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 独立PID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 注册时间 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 公众号对应ID { get; set; }
|
||||
|
||||
}
|
||||
|
||||
//[SugarTable("会员信息")]
|
||||
//public partial class 会员信息
|
||||
//{
|
||||
// public 会员信息()
|
||||
// {
|
||||
|
||||
|
||||
// }
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:False
|
||||
// /// </summary>
|
||||
// [SugarColumn(IsPrimaryKey = true)]
|
||||
// public string 对应ID { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public string 微信名字 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public string 姓名 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public string 支付宝 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public double? 总提现金额 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public double? 可提现金额 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public double? 未收货金额 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public double? 总成功订单 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public double? 签到次数 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public double? 签到奖励 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public string 签到时间 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public double? 推广奖励 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public double? 定向比例 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public string 独立PID { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public string 注册时间 { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// Desc:
|
||||
// /// Default:
|
||||
// /// Nullable:True
|
||||
// /// </summary>
|
||||
// public string 公众号对应ID { get; set; }
|
||||
|
||||
//}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.annaer_cloud
|
||||
{
|
||||
public class fission
|
||||
{
|
||||
public string creation_time { get; set; }
|
||||
public string sj_wxid { get; set; }
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public string xj_wxid { get; set; }
|
||||
public string channel { get; set; }
|
||||
public string my_user { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.annaer_cloud
|
||||
{
|
||||
public class member
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string wxid { get; set; }
|
||||
public string wx_user { get; set; }
|
||||
public string grade { get; set; }
|
||||
public string wx_name { get; set; }
|
||||
public string wx_remarks { get; set; }
|
||||
public string name { get; set; }
|
||||
public string zfb { get; set; }
|
||||
public double ztx_money { get; set; }
|
||||
public double ktx_money { get; set; }
|
||||
public double wsh_money { get; set; }
|
||||
public double ycs_money { get; set; }
|
||||
public int zcg_number { get; set; }
|
||||
public int zth_number { get; set; }
|
||||
public int zwq_number { get; set; }
|
||||
public int qd_number { get; set; }
|
||||
public double qd_money { get; set; }
|
||||
public string qd_time { get; set; }
|
||||
public double royalty_one { get; set; }
|
||||
public double royalty_two { get; set; }
|
||||
public double royalty_three { get; set; }
|
||||
public double royalty_total { get; set; }
|
||||
public string rebate_type { get; set; }
|
||||
public string royalty_type { get; set; }
|
||||
public string pid { get; set; }
|
||||
public string adding_time { get; set; }
|
||||
public string due_time { get; set; }
|
||||
public string shopping_time { get; set; }
|
||||
public string configure { get; set; }
|
||||
public string gzh_id { get; set; }
|
||||
public string record { get; set; }
|
||||
public string my_user { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.lieke
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("GroupInvite")]
|
||||
public partial class GroupInvite
|
||||
{
|
||||
public GroupInvite()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string gid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string inviterLkid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string inviteeLkid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string inviterNick { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string inviteeNick { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? createTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? updateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string log { get; set; }
|
||||
|
||||
}
|
||||
|
||||
//public class GroupInvite
|
||||
//{
|
||||
// public int id { get; set; }
|
||||
|
||||
// public string gid { get; set; }
|
||||
// /// <summary>
|
||||
// /// 上级微信id
|
||||
// /// </summary>
|
||||
// public string inviterLkid { get; set; }
|
||||
// /// <summary>
|
||||
// /// 上级微信昵称
|
||||
// /// </summary>
|
||||
// public string inviterNick { get; set; }
|
||||
// /// <summary>
|
||||
// /// 下级微信id
|
||||
// /// </summary>
|
||||
// public string inviteeLkid { get; set; }
|
||||
// /// <summary>
|
||||
// /// 下级微信昵称
|
||||
// /// </summary>
|
||||
// public string inviteeNick { get; set; }
|
||||
|
||||
// public int status { get; set; }
|
||||
|
||||
// public int createTime { get; set; }
|
||||
|
||||
// public int updateTime { get; set; }
|
||||
|
||||
// public string log { get; set; }
|
||||
|
||||
//}
|
||||
}
|
|
@ -0,0 +1,405 @@
|
|||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.lieke
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("Member")]
|
||||
public partial class Member
|
||||
{
|
||||
public Member()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public int id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string lkid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string alias { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string origId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string v1id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string tempUserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string inviteCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string usernick { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string alipayId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string realname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string robotUin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string robotAlias { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? ketixianMoney { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? tixianzhongMoney { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? yitixianMoney { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string tradeidSuffix { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string tradeidSixSuffix { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? parentid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? isContactMember { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? isNeedGroupSend { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? isListen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public string adzonePid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? adzoneRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? firstLevelAdzoneRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? secondLevelAdzoneRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string note { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? createTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? updateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? channelRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? isChannel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? bindChannelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string kanJiaRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? firstLevelkanJiaRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? secondLevelkanJiaRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string jdAdzonePid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string pddAdzonePid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string mPersonFanliSet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? closePersonShaShu { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? personShaShuNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? personShaShuRate { get; set; }
|
||||
|
||||
}
|
||||
//public class Member
|
||||
//{
|
||||
|
||||
// public int id { get; set; }
|
||||
|
||||
// public string lkid { get; set; }
|
||||
|
||||
// public string alias { get; set; }
|
||||
|
||||
// public string origId { get; set; }
|
||||
|
||||
// public string v1id { get; set; }
|
||||
|
||||
// public string tempUserName { get; set; }
|
||||
|
||||
// public string inviteCode { get; set; }
|
||||
|
||||
// public string usernick { get; set; }
|
||||
|
||||
// public string alipayId { get; set; }
|
||||
|
||||
// public string realname { get; set; }
|
||||
|
||||
// public string robotUin { get; set; }
|
||||
|
||||
// public string robotAlias { get; set; }
|
||||
|
||||
// public double ketixianMoney { get; set; }
|
||||
|
||||
// public double tixianzhongMoney { get; set; }
|
||||
|
||||
// public double yitixianMoney { get; set; }
|
||||
|
||||
// public string tradeidSuffix { get; set; }
|
||||
|
||||
// public string tradeidSixSuffix { get; set; }
|
||||
|
||||
// public int parentid { get; set; }
|
||||
|
||||
// public int isContactMember { get; set; }
|
||||
|
||||
// public int isNeedGroupSend { get; set; }
|
||||
|
||||
// public int isListen { get; set; }
|
||||
|
||||
// public int level { get; set; }
|
||||
|
||||
// public int status { get; set; }
|
||||
|
||||
// public string adzonePid { get; set; }
|
||||
|
||||
// public double adzoneRate { get; set; }
|
||||
|
||||
// public double firstLevelAdzoneRate { get; set; }
|
||||
|
||||
// public double secondLevelAdzoneRate { get; set; }
|
||||
|
||||
// public string note { get; set; }
|
||||
|
||||
// public int createTime { get; set; }
|
||||
|
||||
// public int updateTime { get; set; }
|
||||
|
||||
// public double channelRate { get; set; }
|
||||
|
||||
// public int isChannel { get; set; }
|
||||
|
||||
// public int bindChannelId { get; set; }
|
||||
|
||||
// public string kanJiaRate { get; set; }
|
||||
|
||||
// public string firstLevelkanJiaRate { get; set; }
|
||||
|
||||
// public string secondLevelkanJiaRate { get; set; }
|
||||
|
||||
// public string jdAdzonePid { get; set; }
|
||||
|
||||
// public string pddAdzonePid { get; set; }
|
||||
|
||||
// public string mPersonFanliSet { get; set; }
|
||||
|
||||
// public int closePersonShaShu { get; set; }
|
||||
|
||||
// public int personShaShuNum { get; set; }
|
||||
|
||||
// public double personShaShuRate { get; set; }
|
||||
|
||||
//}
|
||||
}
|
|
@ -0,0 +1,175 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.念初
|
||||
{
|
||||
/// <summary>
|
||||
/// member
|
||||
/// </summary>
|
||||
public class member
|
||||
{
|
||||
/// <summary>
|
||||
/// member
|
||||
/// </summary>
|
||||
public member()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// uid
|
||||
/// </summary>
|
||||
public System.Int64 uid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// wxid
|
||||
/// </summary>
|
||||
public string wxid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// nickname
|
||||
/// </summary>
|
||||
public string nickname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// username
|
||||
/// </summary>
|
||||
public string username { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// usertype
|
||||
/// </summary>
|
||||
public System.Int64? usertype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// integral
|
||||
/// </summary>
|
||||
public System.Int64? integral { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// qdcount
|
||||
/// </summary>
|
||||
public System.Int64? qdcount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// qdlastdt
|
||||
/// </summary>
|
||||
public string qdlastdt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// mmpid
|
||||
/// </summary>
|
||||
public string mmpid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// pidname
|
||||
/// </summary>
|
||||
public string pidname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// trjid
|
||||
/// </summary>
|
||||
public System.Int64? trjid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// groupid
|
||||
/// </summary>
|
||||
public System.Int64? groupid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// groupwxid
|
||||
/// </summary>
|
||||
public string groupwxid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// groupname
|
||||
/// </summary>
|
||||
public string groupname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// balance
|
||||
/// </summary>
|
||||
public System.Double? balance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// alipayrealname
|
||||
/// </summary>
|
||||
public string alipayrealname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// alipaynum
|
||||
/// </summary>
|
||||
public string alipaynum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// regtime
|
||||
/// </summary>
|
||||
public string regtime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// order_sixbit
|
||||
/// </summary>
|
||||
public string order_sixbit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// jdpid
|
||||
/// </summary>
|
||||
public string jdpid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// pddpid
|
||||
/// </summary>
|
||||
public string pddpid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// pdd_order_lastbit
|
||||
/// </summary>
|
||||
public string pdd_order_lastbit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// order_num
|
||||
/// </summary>
|
||||
public string order_num { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// smkey
|
||||
/// </summary>
|
||||
public System.Int64? smkey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// del
|
||||
/// </summary>
|
||||
public System.Int64? del { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// order_date
|
||||
/// </summary>
|
||||
public System.String order_date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// jinjie1
|
||||
/// </summary>
|
||||
public System.Int64? jinjie1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// jinjie2
|
||||
/// </summary>
|
||||
public System.Int64? jinjie2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// jinjie3
|
||||
/// </summary>
|
||||
public System.Int64? jinjie3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Evaluate_num
|
||||
/// </summary>
|
||||
public string Evaluate_num { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// avatar
|
||||
/// </summary>
|
||||
public string avatar { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.念初
|
||||
{
|
||||
/// <summary>
|
||||
/// orders
|
||||
/// </summary>
|
||||
public class orders
|
||||
{
|
||||
/// <summary>
|
||||
/// orders
|
||||
/// </summary>
|
||||
public orders()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// id
|
||||
/// </summary>
|
||||
public System.Int64 id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// orderno
|
||||
/// </summary>
|
||||
public System.String orderno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// iid
|
||||
/// </summary>
|
||||
public System.String iid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// title
|
||||
/// </summary>
|
||||
public System.String title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// amount
|
||||
/// </summary>
|
||||
public System.Int64? amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// price
|
||||
/// </summary>
|
||||
public System.Double? price { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// realprice
|
||||
/// </summary>
|
||||
public System.Double? realprice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// tkrate
|
||||
/// </summary>
|
||||
public System.Double? tkrate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// tkcommission
|
||||
/// </summary>
|
||||
public System.Double? tkcommission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// mediaid
|
||||
/// </summary>
|
||||
public System.String mediaid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// adid
|
||||
/// </summary>
|
||||
public System.String adid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// mmpid
|
||||
/// </summary>
|
||||
public System.String mmpid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// pidname
|
||||
/// </summary>
|
||||
public System.String pidname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// createdt
|
||||
/// </summary>
|
||||
public System.String createdt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// accountdt
|
||||
/// </summary>
|
||||
public System.String accountdt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ordertype
|
||||
/// </summary>
|
||||
public System.String ordertype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// orderstatus
|
||||
/// </summary>
|
||||
public System.Int64? orderstatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// wxid
|
||||
/// </summary>
|
||||
public System.String wxid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// userid
|
||||
/// </summary>
|
||||
public System.Int64? userid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// fl_group
|
||||
/// </summary>
|
||||
public System.Double? fl_group { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// fl_agent
|
||||
/// </summary>
|
||||
public System.Double? fl_agent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// fl_user
|
||||
/// </summary>
|
||||
public System.Double? fl_user { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// fl_Integral
|
||||
/// </summary>
|
||||
public System.Int64? fl_Integral { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// flstatus
|
||||
/// </summary>
|
||||
public System.Int64? flstatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// luckdrawTAG
|
||||
/// </summary>
|
||||
public System.Int64? luckdrawTAG { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// exceltype
|
||||
/// </summary>
|
||||
public System.Int64? exceltype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// batch
|
||||
/// </summary>
|
||||
public System.String batch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// modifytime
|
||||
/// </summary>
|
||||
public System.Int64? modifytime { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,226 @@
|
|||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.悠哉
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("member")]
|
||||
public partial class member
|
||||
{
|
||||
public member()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int uid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string wxid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string nickname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string username { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? usertype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? integral { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? qdcount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string qdlastdt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string mmpid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string pidname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? trjid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? groupid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string groupwxid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string groupname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public double? balance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string alipayrealname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string alipaynum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string regtime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string order_sixbit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string jdpid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string pddpid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string pdd_order_lastbit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? isblacklist { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? isadmin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? isync { get; set; }
|
||||
|
||||
}
|
||||
//public class member
|
||||
//{
|
||||
// public long uid { get; set; }
|
||||
// public string wxid { get; set; }
|
||||
// public string nickname { get; set; }
|
||||
// public string username { get; set; }
|
||||
// public int usertype { get; set; }
|
||||
// public int integral { get; set; }
|
||||
// public int qdcount { get; set; }
|
||||
// public string qdlastdt { get; set; }
|
||||
// public string mmpid { get; set; }
|
||||
// public string pidname { get; set; }
|
||||
// public int trjid { get; set; }
|
||||
// public int groupid { get; set; }
|
||||
// public string groupwxid { get; set; }
|
||||
// public string groupname { get; set; }
|
||||
// public double balance { get; set; }
|
||||
// public string alipayrealname { get; set; }
|
||||
// public string alipaynum { get; set; }
|
||||
// public string regtime { get; set; }
|
||||
// public string order_sixbit { get; set; }
|
||||
// public string jdpid { get; set; }
|
||||
// public string pddpid { get; set; }
|
||||
// public string pdd_order_lastbit { get; set; }
|
||||
// public int isblacklist { get; set; }
|
||||
// public int isadmin { get; set; }
|
||||
// public int isync { get; set; }
|
||||
//}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.淘某喵
|
||||
{
|
||||
/// <summary>
|
||||
/// members_41235
|
||||
/// </summary>
|
||||
public class members_41235
|
||||
{
|
||||
/// <summary>
|
||||
/// time
|
||||
/// </summary>
|
||||
public DateTime? time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// wxid
|
||||
/// </summary>
|
||||
public string wxid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// superior
|
||||
/// </summary>
|
||||
public string superior { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// name
|
||||
/// </summary>
|
||||
public string name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// order_code
|
||||
/// </summary>
|
||||
public string order_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// city
|
||||
/// </summary>
|
||||
public string city { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// group_id
|
||||
/// </summary>
|
||||
public string group_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// coins
|
||||
/// </summary>
|
||||
public double? coins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// frozen_coins
|
||||
/// </summary>
|
||||
public double? frozen_coins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// kickback
|
||||
/// </summary>
|
||||
public double? kickback { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// total
|
||||
/// </summary>
|
||||
public double? total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// purchase_volume
|
||||
/// </summary>
|
||||
public int? purchase_volume { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// commission
|
||||
/// </summary>
|
||||
public double? commission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// withdraw_count
|
||||
/// </summary>
|
||||
public int? withdraw_count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sign_in_count
|
||||
/// </summary>
|
||||
public int? sign_in_count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sign_in_time
|
||||
/// </summary>
|
||||
public DateTime? sign_in_time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// unreceived_coins
|
||||
/// </summary>
|
||||
public double? unreceived_coins { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.淘某喵
|
||||
{
|
||||
/// <summary>
|
||||
/// members_41235
|
||||
/// </summary>
|
||||
public class members_46349
|
||||
{
|
||||
/// <summary>
|
||||
/// time
|
||||
/// </summary>
|
||||
public DateTime? time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// wxid
|
||||
/// </summary>
|
||||
public string wxid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// superior
|
||||
/// </summary>
|
||||
public string superior { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// name
|
||||
/// </summary>
|
||||
public string name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// order_code
|
||||
/// </summary>
|
||||
public string order_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// city
|
||||
/// </summary>
|
||||
public string city { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// group_id
|
||||
/// </summary>
|
||||
public string group_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// coins
|
||||
/// </summary>
|
||||
public double? coins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// frozen_coins
|
||||
/// </summary>
|
||||
public double? frozen_coins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// kickback
|
||||
/// </summary>
|
||||
public double? kickback { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// total
|
||||
/// </summary>
|
||||
public double? total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// purchase_volume
|
||||
/// </summary>
|
||||
public int? purchase_volume { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// commission
|
||||
/// </summary>
|
||||
public double? commission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// withdraw_count
|
||||
/// </summary>
|
||||
public int? withdraw_count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sign_in_count
|
||||
/// </summary>
|
||||
public int? sign_in_count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// sign_in_time
|
||||
/// </summary>
|
||||
public DateTime? sign_in_time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// unreceived_coins
|
||||
/// </summary>
|
||||
public double? unreceived_coins { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.淘某喵
|
||||
{
|
||||
/// <summary>
|
||||
/// rewarded_orders_41235
|
||||
/// </summary>
|
||||
public class rewarded_orders_41235
|
||||
{
|
||||
/// <summary>
|
||||
/// order_no
|
||||
/// </summary>
|
||||
public System.Int64? order_no { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// item_id
|
||||
/// </summary>
|
||||
public System.Int64? item_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// volume
|
||||
/// </summary>
|
||||
public System.Int32? volume { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// pay_status
|
||||
/// </summary>
|
||||
public System.Int32? pay_status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// create_time
|
||||
/// </summary>
|
||||
public System.DateTime? create_time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// settle_time
|
||||
/// </summary>
|
||||
public System.DateTime? settle_time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// title
|
||||
/// </summary>
|
||||
public System.String title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// pay_fee
|
||||
/// </summary>
|
||||
public System.Double? pay_fee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// comm_rate
|
||||
/// </summary>
|
||||
public System.String comm_rate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// commission
|
||||
/// </summary>
|
||||
public System.Double? commission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// site_id
|
||||
/// </summary>
|
||||
public System.String site_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// site_name
|
||||
/// </summary>
|
||||
public System.String site_name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// adzone_id
|
||||
/// </summary>
|
||||
public System.String adzone_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// adzone_name
|
||||
/// </summary>
|
||||
public System.String adzone_name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// reward_fee
|
||||
/// </summary>
|
||||
public System.Double? reward_fee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// superior_reward_fee
|
||||
/// </summary>
|
||||
public System.Double? superior_reward_fee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// wxid
|
||||
/// </summary>
|
||||
public System.String wxid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// superior
|
||||
/// </summary>
|
||||
public System.String superior { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// bind_time
|
||||
/// </summary>
|
||||
public System.DateTime? bind_time { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.淘某喵
|
||||
{
|
||||
/// <summary>
|
||||
/// rewarded_orders_41235
|
||||
/// </summary>
|
||||
public class rewarded_orders_46349
|
||||
{
|
||||
/// <summary>
|
||||
/// order_no
|
||||
/// </summary>
|
||||
public System.Int64? order_no { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// item_id
|
||||
/// </summary>
|
||||
public System.Int64? item_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// volume
|
||||
/// </summary>
|
||||
public System.Int32? volume { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// pay_status
|
||||
/// </summary>
|
||||
public System.Int32? pay_status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// create_time
|
||||
/// </summary>
|
||||
public System.DateTime? create_time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// settle_time
|
||||
/// </summary>
|
||||
public System.DateTime? settle_time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// title
|
||||
/// </summary>
|
||||
public System.String title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// pay_fee
|
||||
/// </summary>
|
||||
public System.Double? pay_fee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// comm_rate
|
||||
/// </summary>
|
||||
public System.String comm_rate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// commission
|
||||
/// </summary>
|
||||
public System.Double? commission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// site_id
|
||||
/// </summary>
|
||||
public System.String site_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// site_name
|
||||
/// </summary>
|
||||
public System.String site_name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// adzone_id
|
||||
/// </summary>
|
||||
public System.String adzone_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// adzone_name
|
||||
/// </summary>
|
||||
public System.String adzone_name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// reward_fee
|
||||
/// </summary>
|
||||
public System.Double? reward_fee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// superior_reward_fee
|
||||
/// </summary>
|
||||
public System.Double? superior_reward_fee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// wxid
|
||||
/// </summary>
|
||||
public System.String wxid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// superior
|
||||
/// </summary>
|
||||
public System.String superior { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// bind_time
|
||||
/// </summary>
|
||||
public System.DateTime? bind_time { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
using SqlSugar;
|
||||
|
||||
namespace BackupAndImport.Entitys.速推客
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("代理管理")]
|
||||
public partial class 代理管理
|
||||
{
|
||||
public 代理管理()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public string 上级ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 上级名称 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public string 下级ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 下级名称 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 绑定时间 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 来源 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 类型 { get; set; }
|
||||
|
||||
}
|
||||
|
||||
//public class 代理管理
|
||||
//{
|
||||
// public string 上级ID { get; set; }
|
||||
|
||||
// public string 上级名称 { get; set; }
|
||||
|
||||
// public string 下级ID { get; set; }
|
||||
|
||||
// public string 下级名称 { get; set; }
|
||||
|
||||
// public string 绑定时间 { get; set; }
|
||||
|
||||
// //public string 来源 { get; set; }
|
||||
|
||||
// //public string 类型 { get; set; }
|
||||
|
||||
//}
|
||||
}
|
|
@ -0,0 +1,179 @@
|
|||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.Entitys.速推客
|
||||
{
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
[SugarTable("会员信息")]
|
||||
public partial class 会员信息
|
||||
{
|
||||
public 会员信息()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public string ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 名称 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 姓名 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 支付宝 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 已提现金额 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 结算金额 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 付款金额 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 失效金额 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? 结算订单笔数 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? 付款订单笔数 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? 失效订单笔数 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 签到奖励 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 推广奖励 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 额外奖励 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 加入时间 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 公众号ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string 创建时间 { get; set; }
|
||||
|
||||
}
|
||||
//public class 会员信息
|
||||
//{
|
||||
// public string ID { get; set; }
|
||||
|
||||
// public string 名称 { get; set; }
|
||||
|
||||
// public string 姓名 { get; set; }
|
||||
|
||||
// public string 支付宝 { get; set; }
|
||||
|
||||
// public double 已提现金额 { get; set; }
|
||||
|
||||
// public double 结算金额 { get; set; }
|
||||
|
||||
// public double 付款金额 { get; set; }
|
||||
|
||||
// public double 失效金额 { get; set; }
|
||||
|
||||
// public int 结算订单笔数 { get; set; }
|
||||
|
||||
// public int 付款订单笔数 { get; set; }
|
||||
|
||||
// public double 失效订单笔数 { get; set; }
|
||||
|
||||
// public double 签到奖励 { get; set; }
|
||||
|
||||
// public double 推广奖励 { get; set; }
|
||||
|
||||
// public double 额外奖励 { get; set; }
|
||||
|
||||
// public string 加入时间 { get; set; }
|
||||
|
||||
// public string 公众号ID { get; set; }
|
||||
|
||||
// //public string 创建时间 { get; set; }
|
||||
|
||||
//}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataDocking
|
||||
{
|
||||
class Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// 软件类型
|
||||
/// </summary>
|
||||
public enum SoftwareType
|
||||
{
|
||||
AliTools = 1,
|
||||
安娜儿 = 2,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,237 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Loding.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="simpleButton14.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAUdEVYdFRpdGxlAEh5cGVybGluaztXZWI7Bv6gzgAA
|
||||
BGFJREFUWEfFlXtQVFUcxxUWsEwT/pFmUsnRNI0EEi2EeAwiYOqyKwuLYAGxAgt7eQTyUAZalOWZ1oxB
|
||||
BqQwU1pOBj3MxBZiWpYWQeSNoBINWiZvcMr8ds4VaWGvI39dz+znj/O933u/v3vO756dB+CJwinyCafI
|
||||
J5win3CKfMIp8gmnyCecIp9winxiKMwc82dhpAedzx6P9RvkzZj8Px7eLCCYEMwITxEWTvH0lGZM0A+b
|
||||
k39GJke4kUiWtiIwtuCLgLj836VMHvwU2fCVZ0EccQjCsIwBr71Jles3e9gQ7zMEEx9ZmhXxfzlHPy1y
|
||||
uojZBczfHaFczyiPD2kudeCvoVFyaea4PTiM6rrLCIxRjbzssN3LXSJ3iM4oGqqpb8HNPwfxz717+Pf+
|
||||
fZDftL9G2/zA/7q3O8mgRRiTSwYF0GUUSJncr+qaOtkH9d0aRNv1ATR29aOhow/a1mv4uakbal07lB+W
|
||||
w8knXCMMS6+uuKBB97XfoG3uhoZAfbr2G6hvuw5NSy/qrvQgp+gU3hBF/kQyLAmmNI+rADNpTO7w+MRd
|
||||
3Lh1BwfzS7DVn8FGz2Bs9g5FgOIQ5OlFCIx/H/5MDsSRWdglU2J7SBo8glLg/VYq3CQM7L1CWL9UnoHy
|
||||
impUN3YhObcErhJmgmSsJND+MCiANtFCv6hsMgVaewfgKAyHpzSqyFhg8tJiC0v7wLiCyebOPgyNTuD2
|
||||
8Bhu3hlBb/8fuNTWg3PVOhwrq4CjiPl7tZ2rD/UHRKR86huhxEVdJ1LySuEsjqZB62gOwaAA2qHPiiMP
|
||||
03w0dveTt4/Btt3BsQJTM1sLSysXX7lqrKm9F2ptCyrUOpz5UYviM1XIKjyNWGUhpNGZ2CJSTK6ycfZf
|
||||
ZL7UcZdf8IHQ/UdwTtPCroCjMJIGvUKgfWBQAO1Oc6EsfXR8YpLd85NnL2JHcDI8g/ZjR2ga/BUqiMKV
|
||||
2LY3BW4BiXCWxMNJHEtCGRYXSRzcpfHw2JPA+t9JOopfr1xF+Tc1eDfrOF57M+wuybAmPHIFlngGJV74
|
||||
paGNNM9VtoFqm3ugbujCeW0rTv2gwdGTlWDeOwZ/sr+27tJuN4mirfT09zhxtgqffVeLr9UNOK9pRZWu
|
||||
A9/WXkZZZQ3SjpQhNCEXNm5+9SRjNeHRPWDt4O2xhzk8ovroc7JsxThYcAIH8kuRnFeCpOxP2PC341XY
|
||||
IpRNPP/iq8y6TVtDpFGZY8oPypGo+hipZK9TiTeFkJxTjNjMQoQk5MDRZ9+45QvWQSRjKcFkOlevAPoV
|
||||
0FPMYvkaO2ennTK1izhq0NlXASeRnN0/h537sMkreHiDi6/W4rmVYmOB6SqB6YJlK9ZudH2c39zSSkSe
|
||||
vZxAT0UjgwL0iqDf6BLCMsJawgaCHcF+ClvCGgJ9E7qXCwhz9c8IZzP1J6zwoAjaD/TspgGLCIv1oHO6
|
||||
h3S1Hv7JzNlvkDdb4BtOkU84RT7hFPmEU+QTTpFPOEU+4RT5hFPkD8z7D3RuucIJQA76AAAAAElFTkSu
|
||||
QmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="simpleButton7.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACF0RVh0VGl0
|
||||
bGUAQXBwbHk7T0s7Q2hlY2s7QmFycztSaWJib247ZGPIaAAACrBJREFUWEeVVwtQlccZXdu82jyaNmNr
|
||||
0zTpREBBBURRFEEMrysQlEReakAUH4ii4BtBERFRQOSN4AUFQZP4BARBAQmgiIkoaAQEL29RQUTBTpzM
|
||||
nH7fwkVN03a6M2d2//2//c75zu7+XMT2ZEuxQ2kldh6yFqEZCrEnUyHCj80Wkd/aiKiTNiL6tI2IzbYV
|
||||
8Tm2IiHPTlAb8d8Qm6sQ+7OtRNQpSxFx3EKEfW0uQrNmieAMM7E9zVQEpJiILYnGYmPcdAqnti3ZQrQ/
|
||||
PSw6nqaLzv4McW/giETXQCYhS9x/lsVhaoLfEH5LeI3w+i/Acwx+z3Ej2p9miranR0TrkwzR3JcuVI8P
|
||||
ibu9aaLxkVKsj5tGIdQCDphT0CEpoKN/UESnFJHJr9XEkjQ0w9wg+rQiOD5/dkViwexrSYU2PydfsPk5
|
||||
Id+6Oj7P+tK+ExYh2w+aTKbYNzieIIW09pGAx+nirlpAT6pYH2tEr6gFJH1GClNF25M0coKE9JMbBGrq
|
||||
il8PyzR3is62bkgtmocLNzegtnMf6h/EoWvgqET9g3iai0Rh7TocPP8FIk+ZN+w4ZLKA1r5JkEKah8ib
|
||||
HqWKOz0HxbqYIQH+CWaipS+ZRKSQiIMkQsnTsupNMdNHh39jUZlRMh817eHo6FeisTcStx4G4+bDbaju
|
||||
2oBrXetR8yAQtQ+2o6EnAq1PlLhOsYeLXbDrqGmVZ6DuWMrFjkg3GntSxJ3uZOEXM5UeqW2ON6G9SaQ9
|
||||
SiIhB3iKyV/zT5phufdri0fFtzZB1ReLG/e3oqpjDa52MtZKfH+Pxz6o6lyNyvZVuNTmjYpWL1zt2ICG
|
||||
RzEorNmAXVkzH/mET7KhnOyGFFHfnSR89xvSkNrGWGPR9DiWRMTxoyTfGD3NKuIbq5+uqoKpsm24REkv
|
||||
txHaVxLRSlzpGOzVuNzuReQrUN66DN81e6JUtRjFTR74ocMflxuDEZo56/nKUP1hEXUPE8SaKD4q1Hyj
|
||||
porG3igeStuX75g4dme6WfdV1TZcaV+DsuYlEuUtnkSwFBVtni+Bnlt5nmIIpc0eKFG5o+iuGxLzFVi8
|
||||
Uwdnazxw6U4QApXGPc5rxk4gDrkdPpGTmFOIpbt0RcOjcB6yPW9sSTK6lHeN7VyJoqaFKLn7FS5Swosq
|
||||
N3zX4k5Y9KJvdkdpixsRuxHxVyhWLcSpakd4hugiMNYPMRlRWBIyAQV1S3Dm6mr4RU+qJI53CHwwuWAh
|
||||
vgocx5203mevwYKIrxW0134ouOOEQsKFRheJoiZXqsyVSOYTGWOBHDN4/gK9Tz5vDdcNU3CioBB1qm40
|
||||
qJow13c0EgotUaZai91HrLAocJwHcb1F4IKFWBigzR0/vLkuxrDh/M1VyK93xNk6B+TVO+Bcw5ck5EsU
|
||||
NM6j3hHnGxkkjvsm6hk03n/aDIv8FSj/vh5t95+ip68Hq3fb4vjl5cj50RknauyRV+2DVeH6jcT1HmHY
|
||||
BVm9k6+WIijVjOwmu27aIvu2HXJuf47c2/bIrZtDoggNcyXONThQz6BnEhmSZQS3Lda4fL0J97qfoffJ
|
||||
Y6zYaY3MUg/k3HLCsWprZP1ghXN1ixF40AxzvTTsiVN9K6SAN1w3jY2KO+NCgbNxvMYaJ2sVOHVrNk4T
|
||||
sm/bEGxJiB0JIlF1jMHx5hQDeGy1xZUaFToePkP3414sC7LCgTwXnPnREUerLZF5zRIZVeZIv6JAfLYL
|
||||
XDaM5Sv3NoG/sFLFW/O3aFcoi1wRd9EECd/NICHmJMQSx65ZwF85kcZWJEYhBTHOEHYcmYxFW+1QVdOM
|
||||
ju4B9D79CcFJXtiutJS2Z1Vb4AjlOVQ5CwmllLd0JtJKFoC4+DDyNgwL+L3rFu3utDJHRBdNw/5iI8QU
|
||||
T0fCxRlYsE0THgE2cNs+DhlXZ+F4rSVO1FohMnsanNfPQEV1A9ofDqCr558ovHwCHkG6yK9zk8RpV8xw
|
||||
oMwEcSUzEFMynWCMQxVOWLhVp4c4/0jgcyBVvO2yWft5SrkdIi8YYt+FqRILgzTgt3cRvr/VjqNns+G8
|
||||
aTwSimYg9rwxHHzHIa+sEq33+6WA1q4WOK6bgG+r3JFcYYbEUlPEl84gR40l+f4iI8ppBGWFPRb46zwn
|
||||
zj8R+K+oFPCO80bt5wkXzRFeaIjI81MQljsV9ms/QeX1K7hH1d3t6MPpC8WYt04X9ms0cCz/LFSdfWh7
|
||||
0I/uvmfwC5+HyBP2SC7/7CViY3KTHCVXuaDI84YkzAKuVCxxfvCKgHnrxnbvO2eKiMLJiCgwJNtmQlnk
|
||||
THZNRld3Bzp7nqGJCPPKqpD4Df1RautFK5HzwTtVpKSPz0SkV86hdWz1dERLYiNEFZGbVFAEkTOiCmbC
|
||||
acNY3oJhAXwG3nZYPeZS6HETRJwzxN78SQgvmISkMkv6pM7D8hAzPOh9gDay+m7nE/yo6kELWd9MaOlq
|
||||
w9y1mkgtdRokVRMPbSNXzcScL5IK233CFA6rtaqIc/gMsIDf2S7XiNmcMp0CDRGWb4A9BQZyUXKZFfad
|
||||
ssOavTbo6++XVTNxc9dTuTW7lV4IUJqR5TOHSbli3sZI2s5wcjS8YDIVZUDuTsGWg8aw8RydRJyv3II3
|
||||
Z7l8Yu8RpE/BU7H7rD7C8hgTpRsp5QqEHrVCYMJ8PO5/BhWRM67XV8LFXwOpFXNkpbJaJhzCXiqACwnL
|
||||
nyhzRVDuxTv0YTLvY2fi5O8Acw9+CQl/+NxLsykwy0AKCD2rNySEFlMCZbktAtJMEZ7ujb6Bn2hLBrBq
|
||||
jyWic+nmSIuZ8AXpHqo4LI8xcThP4NFJsPfWUhHXnwn8JRwhbJZrUj/4LSAXli4MnIA9eZMRkqOLXbm6
|
||||
UkjoUII0ukLrE42QfDIAeeXpWBmhh/iSWZJskHAirR2sNoyLIBdDc/Vknr2U023bBJg6fuxNXGr7R4jZ
|
||||
yzSoly7wiXzfZpnG1bWJRJ6jL0WE0OIXQvRw+NJc+EQb4IuNHyO+wEZWt5sImUyOmZhjh9bJtbn68E3S
|
||||
BeW+Thwvquem8NQQ+bdY1OBh1DcfZWS/aswj/yO62EkCdmZPkL10ZEhQ+mUHnKxeRKd66iAJEe4aqpTB
|
||||
seo1ITl68M/Uwxxvzd7xJiNNiYN/DwxWz816iYbIrfUSObXL+ZHPwjtG9h99OddH6/n6NB3sODMewWdI
|
||||
RPb4QTESlJjxChGLHRJNCKY4Xsc5HNZoPTe0/dCVcr9PYKdHKJZK5/9NgHor3pti9zdHuxWaj73jtKUI
|
||||
NYJJyKsgIklG7+n55dhV8dqwW6HVZ6j4cD7l5E8v/xwbkUN81kvk2VMLWP6yALWId7WNRk6xXvxptdNm
|
||||
Law/pIMgShp0Zhx2nCYCAj8zkZx/aY5jnbeMgZXH6Btahh/w/2BcuSRnMBfzysYDnmCwEGpqEbwdfFdH
|
||||
Gs35yNt68egWB19NLNkzBn5KbWw8rIPtp8ch6NQ4bEzXgV+qDjzpnYOvFqwXa7Qa2f99Na0dRXiXIG1n
|
||||
qHl+IcBryAXeCi+eVovgw8Inlq/NX/Q/G/W5qfM/4i3cR9+wdP+0ng4wGJbuo+st3D+9Yer8SYLerFFz
|
||||
KPavBK6af/txIcPkvyrgP4Hay0LYQnaEE48kcHUfDoHHfL34+86nnEUPE/9absb/09RC+KpyYraUBTER
|
||||
g8c8x+84Rh3/P5oQ/wKtHXLtkLLsUQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="simpleButton3.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAUdEVYdFRpdGxlAEh5cGVybGluaztXZWI7Bv6gzgAA
|
||||
BGFJREFUWEfFlXtQVFUcxxUWsEwT/pFmUsnRNI0EEi2EeAwiYOqyKwuLYAGxAgt7eQTyUAZalOWZ1oxB
|
||||
BqQwU1pOBj3MxBZiWpYWQeSNoBINWiZvcMr8ds4VaWGvI39dz+znj/O933u/v3vO756dB+CJwinyCafI
|
||||
J5win3CKfMIp8gmnyCecIp9winxiKMwc82dhpAedzx6P9RvkzZj8Px7eLCCYEMwITxEWTvH0lGZM0A+b
|
||||
k39GJke4kUiWtiIwtuCLgLj836VMHvwU2fCVZ0EccQjCsIwBr71Jles3e9gQ7zMEEx9ZmhXxfzlHPy1y
|
||||
uojZBczfHaFczyiPD2kudeCvoVFyaea4PTiM6rrLCIxRjbzssN3LXSJ3iM4oGqqpb8HNPwfxz717+Pf+
|
||||
fZDftL9G2/zA/7q3O8mgRRiTSwYF0GUUSJncr+qaOtkH9d0aRNv1ATR29aOhow/a1mv4uakbal07lB+W
|
||||
w8knXCMMS6+uuKBB97XfoG3uhoZAfbr2G6hvuw5NSy/qrvQgp+gU3hBF/kQyLAmmNI+rADNpTO7w+MRd
|
||||
3Lh1BwfzS7DVn8FGz2Bs9g5FgOIQ5OlFCIx/H/5MDsSRWdglU2J7SBo8glLg/VYq3CQM7L1CWL9UnoHy
|
||||
impUN3YhObcErhJmgmSsJND+MCiANtFCv6hsMgVaewfgKAyHpzSqyFhg8tJiC0v7wLiCyebOPgyNTuD2
|
||||
8Bhu3hlBb/8fuNTWg3PVOhwrq4CjiPl7tZ2rD/UHRKR86huhxEVdJ1LySuEsjqZB62gOwaAA2qHPiiMP
|
||||
03w0dveTt4/Btt3BsQJTM1sLSysXX7lqrKm9F2ptCyrUOpz5UYviM1XIKjyNWGUhpNGZ2CJSTK6ycfZf
|
||||
ZL7UcZdf8IHQ/UdwTtPCroCjMJIGvUKgfWBQAO1Oc6EsfXR8YpLd85NnL2JHcDI8g/ZjR2ga/BUqiMKV
|
||||
2LY3BW4BiXCWxMNJHEtCGRYXSRzcpfHw2JPA+t9JOopfr1xF+Tc1eDfrOF57M+wuybAmPHIFlngGJV74
|
||||
paGNNM9VtoFqm3ugbujCeW0rTv2gwdGTlWDeOwZ/sr+27tJuN4mirfT09zhxtgqffVeLr9UNOK9pRZWu
|
||||
A9/WXkZZZQ3SjpQhNCEXNm5+9SRjNeHRPWDt4O2xhzk8ovroc7JsxThYcAIH8kuRnFeCpOxP2PC341XY
|
||||
IpRNPP/iq8y6TVtDpFGZY8oPypGo+hipZK9TiTeFkJxTjNjMQoQk5MDRZ9+45QvWQSRjKcFkOlevAPoV
|
||||
0FPMYvkaO2ennTK1izhq0NlXASeRnN0/h537sMkreHiDi6/W4rmVYmOB6SqB6YJlK9ZudH2c39zSSkSe
|
||||
vZxAT0UjgwL0iqDf6BLCMsJawgaCHcF+ClvCGgJ9E7qXCwhz9c8IZzP1J6zwoAjaD/TspgGLCIv1oHO6
|
||||
h3S1Hv7JzNlvkDdb4BtOkU84RT7hFPmEU+QTTpFPOEU+4RT5hFPkD8z7D3RuucIJQA76AAAAAElFTkSu
|
||||
QmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>109, 17</value>
|
||||
</metadata>
|
||||
<metadata name="xtraTabbedMdiManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>289, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>64</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -0,0 +1,302 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.NianChu.Entitys
|
||||
{
|
||||
public class TbOrder
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int code { get; set; }
|
||||
/// <summary>
|
||||
/// 操作成功
|
||||
/// </summary>
|
||||
public string msg { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public OrderList data { get; set; }
|
||||
}
|
||||
|
||||
public class User_info
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int uid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string wxid { get; set; }
|
||||
/// <summary>
|
||||
/// A惠省钱一号
|
||||
/// </summary>
|
||||
public string nickname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string username { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int usertype { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int integral { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int qdcount { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string qdlastdt { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string mmpid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string pidname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string trjid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string groupid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string groupwxid { get; set; }
|
||||
/// <summary>
|
||||
/// 每周五晚8点抽淘宝100元免单
|
||||
/// </summary>
|
||||
public string groupname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string balance { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string alipayrealname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string alipaynum { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string regtime { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string order_sixbit { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string jdpid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string pddpid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string pdd_order_lastbit { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int order_num { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int smkey { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string del { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string order_date { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string jinjie1 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string jinjie2 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string jinjie3 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Evaluate_num { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string avatar { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string tag { get; set; }
|
||||
}
|
||||
|
||||
public class Order
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string orderno { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string iid { get; set; }
|
||||
/// <summary>
|
||||
/// 超火cec卫衣女早春秋薄款韩版ins潮慵懒风bf宽松waitmore百搭外套
|
||||
/// </summary>
|
||||
public string title { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string item_img { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string cid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int amount { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string price { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string realprice { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string tkrate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string tkcommission { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string mediaid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string adid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string mmpid { get; set; }
|
||||
/// <summary>
|
||||
/// 柠檬
|
||||
/// </summary>
|
||||
public string pidname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string createdt { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string accountdt { get; set; }
|
||||
/// <summary>
|
||||
/// 天猫
|
||||
/// </summary>
|
||||
public string ordertype { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int orderstatus { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string wxid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string userid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string fl_group { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string fl_agent { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string fl_user { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string fl_Integral { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int flstatus { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int luckdrawTAG { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int exceltype { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string batch { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string modifytime { get; set; }
|
||||
/// <summary>
|
||||
/// 女装/女士精品
|
||||
/// </summary>
|
||||
public string item_tag { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public User_info user_info { get; set; }
|
||||
}
|
||||
|
||||
public class OrderList
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Order> list { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int count { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,205 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.NianChu.Entitys
|
||||
{
|
||||
public class User_group_info
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int id { get; set; }
|
||||
/// <summary>
|
||||
/// 黑铁会员
|
||||
/// </summary>
|
||||
public string name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int rebate_group { get; set; }
|
||||
}
|
||||
|
||||
public class Superiors_info
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int uid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string nickname { get; set; }
|
||||
}
|
||||
|
||||
public class Member
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int uid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string wxid { get; set; }
|
||||
/// <summary>
|
||||
/// (默)&
|
||||
/// </summary>
|
||||
public string nickname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string username { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int usertype { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int integral { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int qdcount { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string qdlastdt { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string mmpid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string pidname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string trjid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string groupid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string groupwxid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string groupname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string balance { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string alipayrealname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string alipaynum { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string regtime { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string order_sixbit { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string jdpid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string pddpid { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string pdd_order_lastbit { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int order_num { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int smkey { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string del { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string order_date { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string jinjie1 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string jinjie2 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string jinjie3 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Evaluate_num { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string avatar { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string tag { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public User_group_info user_group_info { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Superiors_info superiors_info { get; set; }
|
||||
}
|
||||
|
||||
public class MemberList
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Member> list { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int count { get; set; }
|
||||
}
|
||||
|
||||
public class members
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int code { get; set; }
|
||||
/// <summary>
|
||||
/// 操作成功
|
||||
/// </summary>
|
||||
public string msg { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public MemberList data { get; set; }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.NianChu.Entitys
|
||||
{
|
||||
public class robots
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int code { get; set; }
|
||||
/// <summary>
|
||||
/// 操作成功
|
||||
/// </summary>
|
||||
public string msg { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public RobotList data { get; set; }
|
||||
}
|
||||
public class RobotList
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Robot> list { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int count { get; set; }
|
||||
}
|
||||
|
||||
public class Web_sub_database_info
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int sub_id { get; set; }
|
||||
}
|
||||
|
||||
public class Robot
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int main_id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string wx_id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string nickname { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int time { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string credit { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string wx_avatar { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string create_time { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int group_id { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Web_sub_database_info web_sub_database_info { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string get_robot_group_list { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string get_ecc_project { get; set; }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
using BackupAndImport.ECO.Events;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.NianChu
|
||||
{
|
||||
public class EventLog
|
||||
{
|
||||
public static event EventHandler<LogEvent> LogEvent;
|
||||
|
||||
public static void OnEvent(object sender, string log)
|
||||
{
|
||||
OnEvent(sender, new LogEvent(log));
|
||||
}
|
||||
/// <summary>
|
||||
/// 输出日志
|
||||
/// </summary>
|
||||
internal static void OnEvent(object sender, LogEvent e)
|
||||
{
|
||||
if (LogEvent != null)
|
||||
{
|
||||
LogEvent.Invoke(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,704 @@
|
|||
using Api.Framework;
|
||||
using Api.Framework.Enums;
|
||||
using Api.Framework.Model;
|
||||
using Api.Framework.SDK;
|
||||
using Api.Framework.Tools;
|
||||
using BackupAndImport.NianChu.Entitys;
|
||||
using CsharpHttpHelper;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using static BackupAndImport.NianChu.EventLog;
|
||||
|
||||
namespace BackupAndImport.NianChu
|
||||
{
|
||||
public class Nianchu
|
||||
{
|
||||
private Random random = new Random();
|
||||
private string token = string.Empty;
|
||||
|
||||
public Nianchu(string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.token = token;
|
||||
var url = $"{domainUrl}/5ca310d13e8b3?pageNo=1&pageSize=10&page=1&size=10";
|
||||
var html = GetNCHtml(url);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(html))
|
||||
{
|
||||
if (!html.Contains("操作成功"))
|
||||
{
|
||||
token = string.Empty;
|
||||
throw new Exception($"念初token无效,请重新获取!{html}");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 默认域名
|
||||
/// </summary>
|
||||
string domainUrl = "https://yun-api95d.nianchu.net:9991/api";
|
||||
|
||||
/// <summary>
|
||||
/// 获取机器人列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private List<Robot> GetRobots()
|
||||
{
|
||||
List<Robot> robotList = null;
|
||||
try
|
||||
{
|
||||
var objJson = GetNCHtml($"{domainUrl}/5ca310d13e8b3?pageSize=10000&page=1&size=10000");
|
||||
var robots = HttpHelper.JsonToObject<robots>(objJson) as robots;
|
||||
if (robots != null && robots.code == 1)
|
||||
{
|
||||
if (robots.data.count == 0) throw new Exception("机器人列表为空,导入终止");
|
||||
if (robots.data.list != null)
|
||||
robotList = robots.data.list;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnEvent(this, $"获取机器人信息异常:{ex.Message} ~ {ex.StackTrace}");
|
||||
throw new Exception($"{ex.Message} ~ {ex.StackTrace}");
|
||||
}
|
||||
return robotList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取机器人对应的用户列表
|
||||
/// </summary>
|
||||
/// <param name="robots"></param>
|
||||
/// <returns></returns>
|
||||
private Dictionary<Robot, List<Member>> GetMembers(List<Robot> robots)
|
||||
{
|
||||
Dictionary<Robot, List<Member>> objectDic = new Dictionary<Robot, List<Member>>();
|
||||
try
|
||||
{
|
||||
if (robots != null)
|
||||
{
|
||||
var page = 1;//获取的页数
|
||||
var size = 5000;//获取的数量
|
||||
var isGo = false;//是否获取下一页的member数据
|
||||
var objJson = string.Empty;
|
||||
|
||||
|
||||
for (int i = 0; i < robots.Count; i++)
|
||||
{
|
||||
var members = new List<Member>();
|
||||
var robot = robots[i];
|
||||
page = 1;
|
||||
isGo = false;
|
||||
do
|
||||
{
|
||||
objJson = GetNCHtml($"{domainUrl}/5cb07ea5d4413?pageNo={page}&pageSize={size}&sub_id={robot.id}&page={page}&size={size}");
|
||||
var _members = HttpHelper.JsonToObject<members>(objJson) as members;
|
||||
if (_members != null && _members.code == 1)
|
||||
{
|
||||
if (_members.data.count == 0) throw new Exception("用户列表为空,导入终止");
|
||||
isGo = (_members.data.count > size * page);//判断是否获取下一页数据
|
||||
members.AddRange(_members.data.list);//追加数据到
|
||||
}
|
||||
Thread.Sleep(2000 + random.Next(1000));
|
||||
page++;
|
||||
} while (isGo);
|
||||
objectDic.Add(robot, members);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnEvent(this, $"获取机器人信息异常:{ex.Message} ~ {ex.StackTrace}");
|
||||
throw new Exception($"{ex.Message} ~ {ex.StackTrace}");
|
||||
}
|
||||
return objectDic;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 插入用户数据到秒单客数据库(包括绑定上下级)
|
||||
/// </summary>
|
||||
public void InsertMember()
|
||||
{
|
||||
var session = ApiClient.GetSession();
|
||||
session.BeginTransaction();
|
||||
try
|
||||
{
|
||||
var robots = GetRobots();
|
||||
var wxInfos = GetMembers(robots);//所有的机器人账号,键 为 机器人信息,值 为 用户集合信息
|
||||
|
||||
if (wxInfos != null && wxInfos.Count != 0)
|
||||
{
|
||||
var srcMemberInfo = session.Find<fl_member_info>("select * from fl_member_info");
|
||||
|
||||
List<fl_member_info> unMemberInfos = new List<fl_member_info>();//保存不存在的用户对象
|
||||
List<fl_member_info> memberInfos = new List<fl_member_info>();//保存存在的用户对象
|
||||
|
||||
foreach (KeyValuePair<Robot, List<Member>> item in wxInfos)
|
||||
{
|
||||
var members = item.Value;
|
||||
foreach (var member in members)
|
||||
{
|
||||
var user = srcMemberInfo.FirstOrDefault(f => f.username == member.wxid && f.robot_type == ChatType.微信);
|
||||
if (user == null)
|
||||
{
|
||||
user = new fl_member_info()
|
||||
{
|
||||
username = member.wxid,
|
||||
robot_type = ChatType.微信,
|
||||
usernick = member.nickname.Replace("'", "''"),
|
||||
cur_point = double.Parse(member.balance),
|
||||
sum_point = 0,
|
||||
ext_point = 0,
|
||||
finish_order = member.order_num,
|
||||
bind_order = member.order_num,
|
||||
robot_name = item.Key.wx_id,
|
||||
alipay_name = string.Empty,
|
||||
alipay_num = string.Empty,
|
||||
remark = string.Empty
|
||||
};
|
||||
var groups = session.FindGroups();
|
||||
if (groups.Count != 0)
|
||||
user.group_id = groups[0].id;
|
||||
unMemberInfos.Add(user);
|
||||
}
|
||||
else
|
||||
{
|
||||
user.cur_point = (double)((decimal)user.cur_point + (decimal.Parse(member.balance)));
|
||||
user.finish_order = user.finish_order + member.order_num;
|
||||
user.bind_order = user.bind_order + member.order_num;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(user.robot_name))
|
||||
{
|
||||
user.robot_name = item.Key.wx_id;
|
||||
user.robot_type = ChatType.微信;
|
||||
}
|
||||
memberInfos.Add(user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OnEvent(this, $"执行用户导入操作...");
|
||||
|
||||
var _num1 = (int)Math.Ceiling((decimal)unMemberInfos.Count / 1000m);
|
||||
for (int o = 1; o <= _num1; o++)
|
||||
{
|
||||
var _list = unMemberInfos.Skip((o - 1) * 1000).Take(1000).ToList();
|
||||
session.Insertable(_list.ToArray()).ExecuteCommand();
|
||||
}
|
||||
|
||||
var _num2 = (int)Math.Ceiling((decimal)memberInfos.Count / 1000m);
|
||||
for (int o = 1; o <= _num2; o++)
|
||||
{
|
||||
var _list = memberInfos.Skip((o - 1) * 1000).Take(1000).ToList();
|
||||
session.Updateable(_list.ToArray()).ExecuteCommand();
|
||||
}
|
||||
|
||||
OnEvent(this, $"导入数据完成,正在绑定上下级...");
|
||||
//将有上级的用户筛选出来
|
||||
|
||||
var memberss = wxInfos.Values.ToList();
|
||||
|
||||
List<Member> memberList = new List<Member>();//所有的用户用户列表
|
||||
foreach (var item in memberss)
|
||||
{
|
||||
memberList.AddRange(item);
|
||||
}
|
||||
|
||||
var exiteInviteMemberList = memberList.Where(f => f.trjid != "0").ToList();//存在上级的用户集合
|
||||
|
||||
//绑定上下级
|
||||
if (exiteInviteMemberList != null && exiteInviteMemberList.Count != 0)
|
||||
{
|
||||
var newDbs = session.Queryable<fl_member_info>().ToList();
|
||||
|
||||
foreach (var item in exiteInviteMemberList)
|
||||
{
|
||||
var new_user = newDbs.FirstOrDefault(f => f.username == item.wxid);
|
||||
if (new_user != null && new_user.inviter_id == 0)
|
||||
{
|
||||
var invitemember = memberList.FirstOrDefault(f => item.trjid == f.uid.ToString());
|
||||
if (invitemember != null)
|
||||
{
|
||||
var inviter = newDbs.FirstOrDefault(f => f.username == invitemember.wxid);//找出上级账号
|
||||
if (inviter != null)
|
||||
{
|
||||
new_user.inviter_id = inviter.id;//填写上级ID
|
||||
session.Updateable<fl_member_info>(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{ }
|
||||
}
|
||||
}
|
||||
newDbs.Clear();
|
||||
}
|
||||
OnEvent(this, $"用户上下级关系绑定成功!");
|
||||
session.Commit();
|
||||
srcMemberInfo.Clear();
|
||||
exiteInviteMemberList.Clear();
|
||||
memberss.Clear();
|
||||
memberList.Clear();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnEvent(this, $"导入用户数据异常,开始回滚数据...");
|
||||
session.Rollback();
|
||||
OnEvent(this, $"导入用户数据异常,回滚执行成功! 异常:{ex.Message} ~ {ex.StackTrace}");
|
||||
throw new Exception($"{ex.Message} ~ {ex.StackTrace}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定淘宝订单
|
||||
/// </summary>
|
||||
public void BindTb()
|
||||
{
|
||||
var session = ApiClient.GetSession();
|
||||
try
|
||||
{
|
||||
var robots = GetRobots();
|
||||
|
||||
if (robots != null)
|
||||
{
|
||||
var page = 1;//获取的页数
|
||||
var size = 5000;//获取的数量
|
||||
var isGo = false;//是否获取下一页的member数据
|
||||
var objJson = string.Empty;
|
||||
|
||||
TbOrder tbOrder = null;
|
||||
|
||||
List<Order> orderList = new List<Order>();//将所有的订单保存下来
|
||||
|
||||
for (int i = 0; i < robots.Count; i++)
|
||||
{
|
||||
var robot = robots[i];
|
||||
page = 1;
|
||||
isGo = false;
|
||||
do
|
||||
{
|
||||
objJson = GetNCHtml($"{domainUrl}/5caf22f33b600?pageNo={page}&pageSize={size}&page={page}&size={size}&sub_id={robot.id}");
|
||||
tbOrder = HttpHelper.JsonToObject<TbOrder>(objJson) as TbOrder;
|
||||
if (tbOrder != null && tbOrder.code == 1)
|
||||
{
|
||||
if (tbOrder.data.count == 0) continue;
|
||||
orderList.AddRange(tbOrder.data.list.Where(f => !string.IsNullOrWhiteSpace(f.userid)));
|
||||
isGo = (tbOrder.data.count > page * size);
|
||||
Thread.Sleep(2000 + random.Next(1000));
|
||||
page++;
|
||||
}
|
||||
} while (isGo);
|
||||
}
|
||||
|
||||
#region 绑定订单
|
||||
var unBinds = session.Find<fl_order_alimama>("select * from fl_order_alimama where db_userid = 0");//本地所有没有绑定的订单
|
||||
|
||||
if (unBinds != null && unBinds.Count != 0)
|
||||
{
|
||||
var userId = session.Find<UserId>("select id,username from fl_member_info", new { });//所有 fl_member_info 用户id 和 username
|
||||
|
||||
foreach (var item in unBinds)
|
||||
{
|
||||
var result = orderList.Where(f => f.orderno == item.trade_parent_id).ToList();
|
||||
//EventClient.OnEvent(this,$"找到订单-{item.trade_parent_id}");
|
||||
if (result != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < result.Count; i++)
|
||||
{
|
||||
var user = userId.FirstOrDefault(f => f.username == result[i].wxid);//fl_member_info 查询用户信息
|
||||
//EventClient.OnEvent(this, $"找到用户-{item.trade_parent_id}");
|
||||
if (user != null)
|
||||
{
|
||||
item.db_userid = user.id;
|
||||
if (!item.IsFinish())
|
||||
{
|
||||
SystemOrderStatus orderStatus = SystemOrderStatus.订单付款;
|
||||
|
||||
switch (result[i].orderstatus)
|
||||
{
|
||||
case 0:
|
||||
orderStatus = SystemOrderStatus.订单付款;
|
||||
break;
|
||||
case 2:
|
||||
orderStatus = SystemOrderStatus.订单失效;
|
||||
break;
|
||||
case 3:
|
||||
orderStatus = SystemOrderStatus.全额退款;
|
||||
break;
|
||||
case 1:
|
||||
case 4:
|
||||
orderStatus = SystemOrderStatus.订单结算;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
item.db_status = orderStatus;
|
||||
item.db_endtime = string.IsNullOrWhiteSpace(result[i].accountdt) ? DateTime.MinValue : DateTime.Parse(result[i].accountdt);
|
||||
var member = session.FindMemberInfoById(user.id);
|
||||
if (member != null)
|
||||
{
|
||||
item.db_robotname = member.robot_name;
|
||||
item.db_robottype = member.robot_type;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item.db_robotname))
|
||||
{
|
||||
var member = session.FindMemberInfoById(user.id);
|
||||
if (member != null)
|
||||
{
|
||||
item.db_robotname = member.robot_name;
|
||||
item.db_robottype = member.robot_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
session.SaveOrUpdate(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnEvent(this, $"绑定淘宝订单异常:{ex.Message} ~ {ex.StackTrace}");
|
||||
throw new Exception($"{ex.Message} ~ {ex.StackTrace}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定京东订单
|
||||
/// </summary>
|
||||
public void BindJd()
|
||||
{
|
||||
var session = ApiClient.GetSession();
|
||||
try
|
||||
{
|
||||
var robots = GetRobots();
|
||||
|
||||
if (robots != null)
|
||||
{
|
||||
var page = 1;//获取的页数
|
||||
var size = 5000;//获取的数量
|
||||
var isGo = false;//是否获取下一页的member数据
|
||||
var objJson = string.Empty;
|
||||
|
||||
TbOrder tbOrder = null;
|
||||
|
||||
List<Order> orderList = new List<Order>();//将所有的订单保存下来
|
||||
|
||||
for (int i = 0; i < robots.Count; i++)
|
||||
{
|
||||
var robot = robots[i];
|
||||
page = 1;
|
||||
isGo = false;
|
||||
do
|
||||
{
|
||||
objJson = GetNCHtml($"{domainUrl}/5cb0037ad62f5?pageNo={page}&pageSize={size}&page={page}&size={size}&sub_id={robot.id}");
|
||||
tbOrder = HttpHelper.JsonToObject<TbOrder>(objJson) as TbOrder;
|
||||
if (tbOrder != null && tbOrder.code == 1)
|
||||
{
|
||||
if (tbOrder.data.count == 0) continue;
|
||||
orderList.AddRange(tbOrder.data.list.Where(f => !string.IsNullOrWhiteSpace(f.userid)));
|
||||
isGo = (tbOrder.data.count > page * size);
|
||||
Thread.Sleep(2000 + random.Next(1000));
|
||||
page++;
|
||||
}
|
||||
} while (isGo);
|
||||
}
|
||||
|
||||
#region 绑定订单
|
||||
var unBinds = session.Find<fl_order_alimama>("select * from fl_order_alimama where db_userid = 0");//本地所有没有绑定的订单
|
||||
|
||||
if (unBinds != null && unBinds.Count != 0)
|
||||
{
|
||||
var userId = session.Find<UserId>("select id,username from fl_member_info", new { });//所有 fl_member_info 用户id 和 username
|
||||
|
||||
foreach (var item in unBinds)
|
||||
{
|
||||
var result = orderList.Where(f => f.orderno == item.trade_parent_id).ToList();
|
||||
//EventClient.OnEvent(this,$"找到订单-{item.trade_parent_id}");
|
||||
if (result != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < result.Count; i++)
|
||||
{
|
||||
var user = userId.FirstOrDefault(f => f.username == result[i].wxid);//fl_member_info 查询用户信息
|
||||
//EventClient.OnEvent(this, $"找到用户-{item.trade_parent_id}");
|
||||
if (user != null)
|
||||
{
|
||||
item.db_userid = user.id;
|
||||
if (!item.IsFinish())
|
||||
{
|
||||
SystemOrderStatus orderStatus = SystemOrderStatus.订单付款;
|
||||
|
||||
switch (result[i].orderstatus)
|
||||
{
|
||||
case 0:
|
||||
orderStatus = SystemOrderStatus.订单付款;
|
||||
break;
|
||||
case 2:
|
||||
orderStatus = SystemOrderStatus.订单失效;
|
||||
break;
|
||||
case 3:
|
||||
orderStatus = SystemOrderStatus.全额退款;
|
||||
break;
|
||||
case 1:
|
||||
case 4:
|
||||
orderStatus = SystemOrderStatus.订单结算;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
item.db_status = orderStatus;
|
||||
item.db_endtime = string.IsNullOrWhiteSpace(result[i].accountdt) ? DateTime.MinValue : DateTime.Parse(result[i].accountdt);
|
||||
var member = session.FindMemberInfoById(user.id);
|
||||
if (member != null)
|
||||
{
|
||||
item.db_robotname = member.robot_name;
|
||||
item.db_robottype = member.robot_type;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item.db_robotname))
|
||||
{
|
||||
var member = session.FindMemberInfoById(user.id);
|
||||
if (member != null)
|
||||
{
|
||||
item.db_robotname = member.robot_name;
|
||||
item.db_robottype = member.robot_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
session.SaveOrUpdate(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnEvent(this, $"绑定淘宝订单异常:{ex.Message} ~ {ex.StackTrace}");
|
||||
throw new Exception($"{ex.Message} ~ {ex.StackTrace}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定拼多多订单
|
||||
/// </summary>
|
||||
public void BindPdd()
|
||||
{
|
||||
var session = ApiClient.GetSession();
|
||||
try
|
||||
{
|
||||
var robots = GetRobots();
|
||||
|
||||
if (robots != null)
|
||||
{
|
||||
var page = 1;//获取的页数
|
||||
var size = 5000;//获取的数量
|
||||
var isGo = false;//是否获取下一页的member数据
|
||||
var objJson = string.Empty;
|
||||
|
||||
TbOrder tbOrder = null;
|
||||
|
||||
List<Order> orderList = new List<Order>();//将所有的订单保存下来
|
||||
|
||||
for (int i = 0; i < robots.Count; i++)
|
||||
{
|
||||
var robot = robots[i];
|
||||
page = 1;
|
||||
isGo = false;
|
||||
do
|
||||
{
|
||||
objJson = GetNCHtml($"{domainUrl}/5caf22f33b600?pageNo={page}&pageSize={size}&page={page}&size={size}&sub_id={robot.id}");
|
||||
tbOrder = HttpHelper.JsonToObject<TbOrder>(objJson) as TbOrder;
|
||||
if (tbOrder != null && tbOrder.code == 1)
|
||||
{
|
||||
if (tbOrder.data.count == 0) continue;
|
||||
orderList.AddRange(tbOrder.data.list.Where(f => !string.IsNullOrWhiteSpace(f.userid)));
|
||||
isGo = (tbOrder.data.count > page * size);
|
||||
Thread.Sleep(2000 + random.Next(1000));
|
||||
page++;
|
||||
}
|
||||
} while (isGo);
|
||||
}
|
||||
|
||||
#region 绑定订单
|
||||
var unBinds = session.Find<fl_order_alimama>("select * from fl_order_alimama where db_userid = 0");//本地所有没有绑定的订单
|
||||
|
||||
if (unBinds != null && unBinds.Count != 0)
|
||||
{
|
||||
var userId = session.Find<UserId>("select id,username from fl_member_info", new { });//所有 fl_member_info 用户id 和 username
|
||||
|
||||
foreach (var item in unBinds)
|
||||
{
|
||||
var result = orderList.Where(f => f.orderno == item.trade_parent_id).ToList();
|
||||
//EventClient.OnEvent(this,$"找到订单-{item.trade_parent_id}");
|
||||
if (result != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
for (int i = 0; i < result.Count; i++)
|
||||
{
|
||||
var user = userId.FirstOrDefault(f => f.username == result[i].wxid);//fl_member_info 查询用户信息
|
||||
//EventClient.OnEvent(this, $"找到用户-{item.trade_parent_id}");
|
||||
if (user != null)
|
||||
{
|
||||
item.db_userid = user.id;
|
||||
if (!item.IsFinish())
|
||||
{
|
||||
SystemOrderStatus orderStatus = SystemOrderStatus.订单付款;
|
||||
|
||||
switch (result[i].orderstatus)
|
||||
{
|
||||
case 0:
|
||||
orderStatus = SystemOrderStatus.订单付款;
|
||||
break;
|
||||
case 2:
|
||||
orderStatus = SystemOrderStatus.订单失效;
|
||||
break;
|
||||
case 3:
|
||||
orderStatus = SystemOrderStatus.全额退款;
|
||||
break;
|
||||
case 1:
|
||||
case 4:
|
||||
orderStatus = SystemOrderStatus.订单结算;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
item.db_status = orderStatus;
|
||||
item.db_endtime = string.IsNullOrWhiteSpace(result[i].accountdt) ? DateTime.MinValue : DateTime.Parse(result[i].accountdt);
|
||||
var member = session.FindMemberInfoById(user.id);
|
||||
if (member != null)
|
||||
{
|
||||
item.db_robotname = member.robot_name;
|
||||
item.db_robottype = member.robot_type;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(item.db_robotname))
|
||||
{
|
||||
var member = session.FindMemberInfoById(user.id);
|
||||
if (member != null)
|
||||
{
|
||||
item.db_robotname = member.robot_name;
|
||||
item.db_robottype = member.robot_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
session.SaveOrUpdate(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnEvent(this, $"绑定淘宝订单异常:{ex.Message} ~ {ex.StackTrace}");
|
||||
throw new Exception($"{ex.Message} ~ {ex.StackTrace}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 请求念初服务器数据
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
private string GetNCHtml(string url)
|
||||
{
|
||||
try
|
||||
{
|
||||
HttpHelper http = new HttpHelper();
|
||||
HttpItem item = new HttpItem()
|
||||
{
|
||||
URL = url,
|
||||
Method = "GET",
|
||||
Encoding = UTF8Encoding.UTF8,
|
||||
Timeout = 100000,
|
||||
ReadWriteTimeout = 30000,
|
||||
IsToLower = false,
|
||||
Cookie = "",
|
||||
UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)",
|
||||
Accept = "text/html, application/xhtml+xml, */*",
|
||||
ContentType = "application/json",
|
||||
Referer = "https://yun.nianchu.net/",
|
||||
Allowautoredirect = false,
|
||||
AutoRedirectCookie = false,
|
||||
};
|
||||
item.Header.Add("version", "v3.0");
|
||||
item.Header.Add("user-token", token);
|
||||
HttpResult result = http.GetHtml(item);
|
||||
string html = result.Html;
|
||||
|
||||
return html;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{ }
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 念初订单状态
|
||||
/// </summary>
|
||||
enum NcOrderStatic
|
||||
{
|
||||
已付款 = 0,
|
||||
已结算 = 1,
|
||||
已失效 = 2,
|
||||
订单退款 = 3,
|
||||
订单完成 = 4
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("DataDocking")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DataDocking")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("35a30202-1d63-413a-ad12-8ffb24165b43")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2019.06.10.2")]
|
||||
[assembly: AssemblyFileVersion("2019.06.10.2")]
|
|
@ -0,0 +1,100 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace BackupAndImport.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BackupAndImport.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性
|
||||
/// 重写当前线程的 CurrentUICulture 属性。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 备份与导入 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string MainFormTitle {
|
||||
get {
|
||||
return ResourceManager.GetString("MainFormTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 备份与导入 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string PluginName {
|
||||
get {
|
||||
return ResourceManager.GetString("PluginName", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 备份与导入,多机器人数据对接 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string PluginNote {
|
||||
get {
|
||||
return ResourceManager.GetString("PluginNote", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap 备份与导入 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("备份与导入", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="MainFormTitle" xml:space="preserve">
|
||||
<value>备份与导入</value>
|
||||
<comment>插件主窗体名称</comment>
|
||||
</data>
|
||||
<data name="PluginName" xml:space="preserve">
|
||||
<value>备份与导入</value>
|
||||
<comment>插件名称</comment>
|
||||
</data>
|
||||
<data name="PluginNote" xml:space="preserve">
|
||||
<value>备份与导入,多机器人数据对接</value>
|
||||
<comment>插件介绍</comment>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="备份与导入" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\备份与导入.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,26 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace BackupAndImport.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
</SettingsFile>
|
|
@ -0,0 +1,5 @@
|
|||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraTabbedMdi.XtraTabbedMdiManager, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport
|
||||
{
|
||||
/// <summary>
|
||||
/// 封装ManualResetEvent
|
||||
/// </summary>
|
||||
public class MutipleThreadResetEvent : IDisposable
|
||||
{
|
||||
private readonly ManualResetEvent done;
|
||||
private readonly int total;
|
||||
private long current;
|
||||
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
/// <param name="total">需要等待执行的线程总数</param>
|
||||
public MutipleThreadResetEvent(int total)
|
||||
{
|
||||
this.total = total;
|
||||
current = total;
|
||||
done = new ManualResetEvent(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 唤醒一个等待的线程
|
||||
/// </summary>
|
||||
public void SetOne()
|
||||
{
|
||||
// Interlocked 原子操作类 ,此处将计数器减1
|
||||
if (Interlocked.Decrement(ref current) == 0)
|
||||
{
|
||||
//当所以等待线程执行完毕时,唤醒等待的线程
|
||||
done.Set();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 等待所以线程执行完毕
|
||||
/// </summary>
|
||||
public void WaitAll()
|
||||
{
|
||||
done.WaitOne();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 释放对象占用的空间
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
((IDisposable)done).Dispose();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport
|
||||
{
|
||||
class Tools
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取指定目录中的匹配文件
|
||||
/// </summary>
|
||||
/// <param name="dir">要搜索的目录</param>
|
||||
/// <param name="regexPattern">文件名模式(正则)。null表示忽略模式匹配,返回所有文件</param>
|
||||
/// <param name="depth">递归深度。负数表示不限,0表示仅顶级</param>
|
||||
/// <param name="throwEx">是否抛异常</param>
|
||||
/// <returns></returns>GetFiles(path,"(?<db>(数据库.db)|(aliTools.db))",-1)
|
||||
public static string[] GetFiles(string dir, string regexPattern = null, int depth = 0, bool throwEx = false)
|
||||
{
|
||||
List<string> lst = new List<string>();
|
||||
|
||||
try
|
||||
{
|
||||
foreach (string item in Directory.GetFileSystemEntries(dir))
|
||||
{
|
||||
try
|
||||
{
|
||||
bool isFile = (File.GetAttributes(item) & FileAttributes.Directory) != FileAttributes.Directory;
|
||||
|
||||
if (isFile && (regexPattern == null || Regex.IsMatch(Path.GetFileName(item), regexPattern, RegexOptions.IgnoreCase | RegexOptions.Multiline)))
|
||||
{ lst.Add(item); }
|
||||
|
||||
//递归
|
||||
if (depth != 0 && !isFile) { lst.AddRange(GetFiles(item, regexPattern, depth - 1, throwEx)); }
|
||||
}
|
||||
catch { if (throwEx) { throw; } }
|
||||
}
|
||||
}
|
||||
catch { if (throwEx) { throw; } }
|
||||
|
||||
return lst.ToArray();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 序列化 对象到字符串
|
||||
/// </summary>
|
||||
/// <param name="obj">泛型对象</param>
|
||||
/// <returns>序列化后的字符串</returns>
|
||||
public static string Serialize<T>(T obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
IFormatter formatter = new BinaryFormatter();
|
||||
MemoryStream stream = new MemoryStream();
|
||||
formatter.Serialize(stream, obj);
|
||||
stream.Position = 0;
|
||||
byte[] buffer = new byte[stream.Length];
|
||||
stream.Read(buffer, 0, buffer.Length);
|
||||
stream.Flush();
|
||||
stream.Close();
|
||||
return Convert.ToBase64String(buffer);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception("序列化失败,原因:" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 反序列化 字符串到对象
|
||||
/// </summary>
|
||||
/// <param name="obj">泛型对象</param>
|
||||
/// <param name="str">要转换为对象的字符串</param>
|
||||
/// <returns>反序列化出来的对象</returns>
|
||||
public static T Desrialize<T>(T obj, string str)
|
||||
{
|
||||
try
|
||||
{
|
||||
obj = default(T);
|
||||
IFormatter formatter = new BinaryFormatter();
|
||||
byte[] buffer = Convert.FromBase64String(str);
|
||||
MemoryStream stream = new MemoryStream(buffer);
|
||||
obj = (T)formatter.Deserialize(stream);
|
||||
stream.Flush();
|
||||
stream.Close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception("反序列化失败,原因:" + ex.Message);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户信息
|
||||
/// </summary>
|
||||
public class UserId
|
||||
{
|
||||
public long id { get; set; }
|
||||
|
||||
public string username { get; set; }
|
||||
}
|
||||
|
||||
public class UserName
|
||||
{
|
||||
public string username { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 速推客
|
||||
/// </summary>
|
||||
public class GZH
|
||||
{
|
||||
public string ID { get; set; }
|
||||
public string 公众号ID { get; set; }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
using Api.Framework;
|
||||
using Api.Framework.Tools;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataDocking.Utils
|
||||
{
|
||||
public class SetConnectionConfig
|
||||
{
|
||||
public ConnectionConfig tempConfig = null;
|
||||
|
||||
public bool IsOk { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 测试mysql数据库是否可以链接
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public string CheckMysqlLink(string host, string name, string user, string pass, string port)
|
||||
{
|
||||
try
|
||||
{
|
||||
tempConfig = new ConnectionConfig();
|
||||
|
||||
tempConfig.ConnectionString = string.Format($"Data Source={host};Initial Catalog={name};Persist Security Info=True;User ID={user};Password={pass};Port={port};Min Pool Size = 5; Max Pool Size = 30;Charset=utf8;");
|
||||
tempConfig.DatabaseType = DatabaseType.MYSQL;
|
||||
var session = ApiClient.GetSession(tempConfig);
|
||||
session.BeginTransaction();
|
||||
session.Rollback();
|
||||
return string.Empty;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
tempConfig = null;
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试sqlite数据是否可以链接
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="pass"></param>
|
||||
/// <returns></returns>
|
||||
public string CheckSqliteLink(string url, string pass = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
string src = string.Format("Data Source={0};Version=3;password={1};Journal Mode=WAL;", url, pass);
|
||||
tempConfig = new ConnectionConfig() { ConnectionString = src, DatabaseType = DatabaseType.SQLITE };
|
||||
var session = ApiClient.GetSession(tempConfig);
|
||||
session.BeginTransaction();
|
||||
session.Rollback();
|
||||
return string.Empty;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BackupAndImport.速推客云端.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 云端速推客用户数据
|
||||
/// </summary>
|
||||
public class STKMemberInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询索引 - 无用
|
||||
/// </summary>
|
||||
public int numbers { get; set; }
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
/// </summary>
|
||||
public string id { get; set; }
|
||||
/// <summary>
|
||||
/// 微信头像
|
||||
/// </summary>
|
||||
public string wx_img { get; set; }
|
||||
/// <summary>
|
||||
/// 微信昵称
|
||||
/// </summary>
|
||||
public string wx_name { get; set; }
|
||||
/// <summary>
|
||||
/// 用户id
|
||||
/// </summary>
|
||||
public string uid { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string wx_note { get; set; }
|
||||
/// <summary>
|
||||
/// 用户账号
|
||||
/// </summary>
|
||||
public string wx_id { get; set; }
|
||||
/// <summary>
|
||||
/// 分组
|
||||
/// </summary>
|
||||
public string group_name { get; set; }
|
||||
/// <summary>
|
||||
/// 机器人昵称
|
||||
/// </summary>
|
||||
public string robot_name { get; set; }
|
||||
/// <summary>
|
||||
/// 机器人id
|
||||
/// </summary>
|
||||
public string robot_id { get; set; }
|
||||
/// <summary>
|
||||
/// 上级wxid
|
||||
/// </summary>
|
||||
public string father_id { get; set; }
|
||||
/// <summary>
|
||||
/// 可提现
|
||||
/// </summary>
|
||||
public string effec_money { get; set; }
|
||||
/// <summary>
|
||||
/// 已提现
|
||||
/// </summary>
|
||||
public string take_money { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string processing_money { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int for_order_fee { get; set; }
|
||||
///// <summary>
|
||||
///// 创建时间
|
||||
///// </summary>
|
||||
//public DateTime create_time { get; set; }
|
||||
/// <summary>
|
||||
/// 固定率利
|
||||
/// </summary>
|
||||
public string fixed_rate { get; set; }
|
||||
/// <summary>
|
||||
/// 积分变动时间
|
||||
/// </summary>
|
||||
public string update_money_time { get; set; }
|
||||
/// <summary>
|
||||
/// 总订单数
|
||||
/// </summary>
|
||||
public string order_num { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BackupAndImport.ECO.Events;
|
||||
|
||||
namespace BackupAndImport.速推客云端
|
||||
{
|
||||
public class EventLog
|
||||
{
|
||||
public static event EventHandler<LogEvent> LogEvent;
|
||||
|
||||
public static void OnEvent(object sender, string log)
|
||||
{
|
||||
OnEvent(sender, new LogEvent(log));
|
||||
}
|
||||
/// <summary>
|
||||
/// 输出日志
|
||||
/// </summary>
|
||||
internal static void OnEvent(object sender, LogEvent e)
|
||||
{
|
||||
if (LogEvent != null)
|
||||
{
|
||||
LogEvent.Invoke(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,865 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Api.Framework;
|
||||
using Api.Framework.Enums;
|
||||
using Api.Framework.Model;
|
||||
using Api.Framework.SDK;
|
||||
using Api.Framework.Tools;
|
||||
using BackupAndImport.速推客云端.Entitys;
|
||||
using Chat.Framework.WXSdk.IPAD;
|
||||
using CsharpHttpHelper;
|
||||
using CsharpHttpHelper.Enum;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using static BackupAndImport.速推客云端.EventLog;
|
||||
|
||||
namespace BackupAndImport.速推客云端
|
||||
{
|
||||
public class Stk
|
||||
{
|
||||
private string ck;
|
||||
|
||||
public Stk(string ck)
|
||||
{
|
||||
this.ck = ck;
|
||||
}
|
||||
|
||||
#region 云端速推客导入
|
||||
|
||||
/// <summary>
|
||||
/// 获取机器人列表
|
||||
/// </summary>
|
||||
/// <param name="robots"></param>
|
||||
public void GetRobot(Dictionary<string, string> robots, int page = 1, int pageSize = 30)
|
||||
{
|
||||
var url = "http://yun.yunsutuike.com/page/robot/data.php?typeName=robotList&type=1&page=" + page + "&limit=" + pageSize;
|
||||
var html = GetHtml(url);
|
||||
|
||||
#region 数据结构
|
||||
//{"code":0,"msg":"","count":"4","data":[{"uid":"11","wx_img":"http:\/\/wx.qlogo.cn\/mmhead\/ver_1\/0SXNqzaIpVNdlUrezfv6Hlepsp6FMr1qWa13ozRFhCC2z8ntELjhPbHWficegATH7cRa71Ria7pFQXqxMAghswfpV3ZzdwvF3UGO1KkZvj2D8\/0","wx_type":"1","wx_id":"wxid_qhemii9dknvp22","wx_name":"A \u7701\u94b1\u7ba1\u5bb6 \u638f\u3001\u62fc\u3001\u4eac\u67e5\u8be2","gruop_name":"\u672a\u5206\u7ec4","km_user":"letee88","km_ip":"118.24.33.97","version":"2.0.6","remarks":null,"wx_number":"","km_expire_time":"2022-07-01 20:14:04","update_time":"2022-05-27 19:54:06","oauth":"\u65e0\/\u65e0\/22222\/\u65e0","status":0,"wx_version":"3.3.0","member_num":"4370"},{"uid":"6","wx_img":"http:\/\/wx.qlogo.cn\/mmhead\/ver_1\/9Pias2AZwGBYcuLlLUSiad23q9smXM8g3f9lQIc8EQoHo8ek0N0ODYUpg2eeYVDU4IAxJOic2ibdvVVHlocezEQOU7Esn7opz7KQ5HdaQBDJNFU\/0","wx_type":"1","wx_id":"wxid_scynpy2cpotu12","wx_name":"A \u5238\u9505\u513f\uff08\u638f\u3001\u62fc\u3001\u4eac\uff09","gruop_name":"\u672a\u5206\u7ec4","km_user":"letao879","km_ip":"118.24.33.97","version":"2.0.6","remarks":null,"wx_number":"","km_expire_time":"2023-04-02 09:01:17","update_time":"2022-05-27 19:54:09","oauth":"\u65e0\/\u65e0\/22222\/\u65e0","status":0,"wx_version":"3.3.0","member_num":"5451"},{"uid":"3","wx_img":"http:\/\/wx.qlogo.cn\/mmhead\/ver_1\/m6qtl2JnRJ3ibQV1t7jfetl9xXH0j3VGTjA1ZjQXUwicN5uYcwZVMNBrJiahR0veicj0MH6sAQVRHOYEzzWHVeuyQm5Q1roeRZtoUaxPlgj0tUc\/0","wx_type":"1","wx_id":"wxid_64arztvjyh512","wx_name":"A \u5238\u5927\u5927 ? \u638f\u62fc\u4eac24\u5c0f\u65f6\u67e5\u8be2","gruop_name":"\u672a\u5206\u7ec4","km_user":"18550782199","km_ip":"118.24.33.97","version":"2.0.6","remarks":null,"wx_number":"","km_expire_time":"2023-03-02 20:41:01","update_time":"2022-05-27 19:54:14","oauth":"\u65e0\/\u65e0\/22222\/\u65e0","status":0,"wx_version":"3.3.0","member_num":"4931"},{"uid":"1","wx_img":"http:\/\/wx.qlogo.cn\/mmhead\/ver_1\/4XBEJdC1ULpibibalNibS8N48h8UdKVnMtDwC4BcCjPeg9Hgjsk2czUuDajq98GaqicaBOGn2SwhhibKKucWibIG0qOHxKEH64Au1gczc7vaAE4Q0\/0","wx_type":"1","wx_id":"lzy1249923552","wx_name":"A\u5341\u7c73??\u5b9d\u770b\u670b\u53cb\u5708\u6f6e\u978b\u5728\u89c6\u9891\u53f7","gruop_name":"\u672a\u5206\u7ec4","km_user":"17312558003","km_ip":"120.242.233.249","version":"1.9.2","remarks":null,"wx_number":"","km_expire_time":"2022-02-10 13:22:34","update_time":"2022-02-09 23:48:08","oauth":"\u65e0\/\u65e0\/\u65e0\/\u65e0","status":2,"wx_version":"3.3.5","member_num":"4"}]}
|
||||
#endregion
|
||||
|
||||
OnEvent(this, $"正在获取第{page}页机器人数据...");
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
var count = jObj["count"].Value<int>();//总用户数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
if (data.Length == 0) throw new Exception("不存在机器人,疑似没有任何数据");
|
||||
|
||||
OnEvent(this, $"获取第{page}页机器人数据成功");
|
||||
|
||||
foreach (var tmp in data)
|
||||
{
|
||||
robots[tmp["wx_id"].ToString()] = tmp["wx_type"].ToString();
|
||||
}
|
||||
|
||||
if (count > (page * pageSize))
|
||||
{
|
||||
page++;
|
||||
//Thread.Sleep(200);
|
||||
GetRobot(robots, page, pageSize);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
OnEvent(this, $"正在获取机器人,第{page}页数据异常");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取机器人对应的用户列表
|
||||
/// </summary>
|
||||
/// <param name="robotname"></param>
|
||||
/// <param name="memberInfos"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void GetMembers(string robotname, List<STKMemberInfo> memberInfos, int page = 1, int pageSize = 100)
|
||||
{
|
||||
if (ReadLogIsContains(robotname))
|
||||
{
|
||||
OnEvent(this, $"机器人{robotname},执行过用户导入。跳过");
|
||||
return;
|
||||
}
|
||||
|
||||
OnEvent(this, $"正在获取机器人{robotname},第{page}页用户数据...");
|
||||
var url = "http://yun.yunsutuike.com/page/member/data.php?typeName=getMemberNew&data={%22desc_name%22:%22create_time%22,%22create_time%22:%22%22,%22order_time_type%22:%22update_money_time%22,%22order_time%22:%22%22,%22group_name%22:%22all%22,%22robot_id%22:%22" + robotname + "%22,%22screen_type%22:%22all%22,%22screen_val_1%22:%22%22,%22screen_val_2%22:%22%22,%22search_type%22:%22all%22,%22search_val%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
#region 数据结构
|
||||
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
var count = jObj["count"].Value<int>();//总用户数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
OnEvent(this, $"获取机器人{robotname},第{page}页用户数据成功");
|
||||
|
||||
if (data.Length != 0)
|
||||
{
|
||||
var members = jObj["data"].ToObject<List<STKMemberInfo>>();
|
||||
if (members != null)
|
||||
memberInfos.AddRange(members);
|
||||
|
||||
if (count > (page * pageSize))
|
||||
{
|
||||
page++;
|
||||
//Thread.Sleep(200);
|
||||
GetMembers(robotname, memberInfos, page, pageSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
OnEvent(this, $"正在获取机器人{robotname},第{page}页用户数据异常");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 插入用户数据到秒单客数据库(包括绑定上下级)
|
||||
/// </summary>
|
||||
/// <param name="STKMemberInfos"></param>
|
||||
public void STKInsertMember(string robotname, ChatType chatType, List<STKMemberInfo> STKMemberInfos)
|
||||
{
|
||||
if (ReadLogIsContains(robotname))
|
||||
{
|
||||
OnEvent(this, $"机器人{robotname},执行过用户导入。跳过");
|
||||
return;
|
||||
}
|
||||
|
||||
var session = ApiClient.GetSession();
|
||||
session.BeginTransaction();
|
||||
try
|
||||
{
|
||||
//var srcMemberInfo = session.Find<fl_member_info>("select * from fl_member_info");
|
||||
|
||||
List<fl_member_info> unMemberInfos = new List<fl_member_info>();//保存不存在的用户对象
|
||||
List<fl_member_info> memberInfos = new List<fl_member_info>();//保存存在的用户对象
|
||||
|
||||
foreach (var member in STKMemberInfos)
|
||||
{
|
||||
//TODO 这里就不判断企业微信了
|
||||
var user = session.Queryable<fl_member_info>().First(f => f.robot_type == chatType && f.username == member.wx_id);
|
||||
if (user == null)
|
||||
{
|
||||
user = new fl_member_info()
|
||||
{
|
||||
username = member.wx_id,
|
||||
robot_type = ChatType.微信,
|
||||
usernick = member.wx_name.Replace("'", "''"),
|
||||
cur_point = string.IsNullOrWhiteSpace(member.effec_money) ? 0 : double.Parse(member.effec_money),
|
||||
sum_point = string.IsNullOrWhiteSpace(member.take_money) ? 0 : double.Parse(member.take_money),
|
||||
ext_point = string.IsNullOrWhiteSpace(member.take_money) ? 0 : double.Parse(member.take_money),
|
||||
finish_order = member.order_num == "无" ? 0 : int.Parse(member.order_num),
|
||||
robot_name = member.robot_name,
|
||||
headurl = member.wx_img,
|
||||
bind_order = member.order_num == "无" ? 0 : int.Parse(member.order_num),
|
||||
remark = member.wx_note,
|
||||
realnick = member.wx_name,
|
||||
alipay_name = string.Empty,
|
||||
alipay_num = string.Empty,
|
||||
};
|
||||
var groups = session.FindGroups();
|
||||
if (groups.Count != 0)
|
||||
user.group_id = groups[0].id;
|
||||
unMemberInfos.Add(user);
|
||||
}
|
||||
else
|
||||
{
|
||||
user.cur_point = (double)((decimal)user.cur_point + (string.IsNullOrWhiteSpace(member.effec_money) ? 0m : decimal.Parse(member.effec_money)));
|
||||
user.finish_order = user.finish_order + (member.order_num == "无" ? 0 : long.Parse(member.order_num));
|
||||
|
||||
if (string.IsNullOrWhiteSpace(user.robot_name))
|
||||
{
|
||||
user.robot_name = member.robot_id;
|
||||
user.robot_type = chatType;
|
||||
}
|
||||
memberInfos.Add(user);
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"机器人{robotname},执行用户导入操作...");
|
||||
|
||||
var _num1 = (int)Math.Ceiling((decimal)unMemberInfos.Count / 1000m);
|
||||
for (int o = 1; o <= _num1; o++)
|
||||
{
|
||||
var _list = unMemberInfos.Skip((o - 1) * 1000).Take(1000).ToList();
|
||||
session.Insertable(_list.ToArray()).ExecuteCommand();
|
||||
}
|
||||
|
||||
var _num2 = (int)Math.Ceiling((decimal)memberInfos.Count / 1000m);
|
||||
for (int o = 1; o <= _num2; o++)
|
||||
{
|
||||
var _list = memberInfos.Skip((o - 1) * 1000).Take(1000).ToList();
|
||||
session.Updateable(_list.ToArray()).ExecuteCommand();
|
||||
}
|
||||
|
||||
OnEvent(this, $"机器人{robotname},导入数据完成,正在绑定上下级...");
|
||||
//将有上级的用户筛选出来
|
||||
STKMemberInfos = STKMemberInfos.Where(f => !string.IsNullOrEmpty(f.father_id)).ToList();
|
||||
//绑定上下级
|
||||
if (STKMemberInfos != null && STKMemberInfos.Count != 0)
|
||||
{
|
||||
foreach (var item in STKMemberInfos)
|
||||
{
|
||||
var new_user = session.Queryable<fl_member_info>().First(f => f.robot_type == chatType && f.username == item.wx_id);
|
||||
if (new_user != null && new_user.inviter_id == 0)
|
||||
{
|
||||
var inviter = session.Queryable<fl_member_info>().First(f => f.robot_type == chatType && f.username == item.father_id);//找出上级账号
|
||||
if (inviter != null)
|
||||
{
|
||||
new_user.inviter_id = inviter.id;//填写上级ID
|
||||
session.Updateable<fl_member_info>(new { inviter_id = inviter.id }).Where(f => f.id == new_user.id).ExecuteCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"用户上下级关系绑定成功!");
|
||||
session.Commit();
|
||||
|
||||
WriteLog(robotname);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnEvent(this, $"导入用户数据异常,开始回滚数据...");
|
||||
session.Rollback();
|
||||
OnEvent(this, $"导入用户数据异常,回滚执行成功! 异常:{ex.Message} ~ {ex.StackTrace}");
|
||||
throw new Exception($"{ex.Message} ~ {ex.StackTrace}");
|
||||
}
|
||||
}
|
||||
|
||||
private void WriteLog(string _log)
|
||||
{
|
||||
var log = _log;
|
||||
var m = new Action(delegate ()
|
||||
{
|
||||
try
|
||||
{
|
||||
string filename = CsharpHttpHelper.HttpExtend.MapFile($"stk.log", "Cache");
|
||||
|
||||
//(优化写法)创建或打开日志文件,向日志文件末尾追加记录,关闭日志文件
|
||||
using (StreamWriter mySw = File.AppendText(filename))
|
||||
{
|
||||
string writeContent = log;
|
||||
mySw.WriteLine(writeContent);//向日志文件写入内容
|
||||
mySw.Close(); //关闭日志文件
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
});
|
||||
m.BeginInvoke(null, null);
|
||||
}
|
||||
|
||||
private bool ReadLogIsContains(string log)
|
||||
{
|
||||
string filename = CsharpHttpHelper.HttpExtend.MapFile($"stk.log", "Cache");
|
||||
if (File.Exists(filename))
|
||||
{
|
||||
var lines = File.ReadLines(filename).ToList();
|
||||
return lines.Contains(log);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void Exchanges(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取未审核数据,第{page}页...");
|
||||
|
||||
//未审核的订单
|
||||
var url = "http://yun.yunsutuike.com/page/retrieve/data.php?typeName=mainListNew&data={%22create_time%22:%22%22,%22robot_id%22:%22all%22,%22grant_type%22:%22all%22,%22order_status%22:%220%22,%22search_type%22:%22all%22,%22search_val%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
var money = item["money"].ToObject<double>();
|
||||
|
||||
var exchange = new fl_exchange_info();
|
||||
|
||||
var member = db.FindMemberInfoByUsername(wx_id);
|
||||
if (member != null)
|
||||
{
|
||||
var robot = db.FindRobotInfo(robot_id, member.robot_type);
|
||||
if (robot != null)
|
||||
{
|
||||
exchange.rid = robot.id;
|
||||
}
|
||||
exchange.uid = member.id;
|
||||
}
|
||||
|
||||
var time = DateTime.Now;
|
||||
try
|
||||
{
|
||||
time = item["create_time"].ToObject<DateTime>();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
time = DateTime.Now;
|
||||
}
|
||||
|
||||
exchange.IsTransmatic = false;
|
||||
exchange.point = money;
|
||||
exchange.time = time;
|
||||
exchange.state = ApplyType.未审核;
|
||||
|
||||
db.Saveable(exchange).ExecuteCommand();
|
||||
|
||||
}
|
||||
OnEvent(this, $"未审核数据,第{page}页完成,并成功导入信息");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void BindTBOrder(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取淘宝绑定数据,第{page}页...");
|
||||
|
||||
//三个月已经绑定的订单请求
|
||||
var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getTbListNew&data={%22desc_name%22:%22tk_create_time%22,%22order_time_type%22:%22tk_create_time%22,%22order_time%22:%22" + date.AddMonths(-3).ToString("yyyy-MM-dd") + "%20-%20" + date.ToString("yyyy-MM-dd") + "%22,%22cps_user_id%22:%22all%22,%22order_type%22:%22all%22,%22tk_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var trade_parent_id = item["trade_parent_id"].ToString();
|
||||
var trade_id = item["trade_id"].ToString();
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
|
||||
var order = db.FindSingle<fl_order_alimama>("trade_parent_id = @trade_parent_id and trade_id = @trade_id",
|
||||
new { trade_parent_id = trade_parent_id, trade_id = trade_id });
|
||||
if (order != null && order.db_userid == 0)
|
||||
{
|
||||
var member = db.FindMemberInfoByUsername(wx_id);
|
||||
if (member != null)
|
||||
{
|
||||
order.db_robotname = robot_id;
|
||||
order.db_userid = member.id;
|
||||
order.db_robottype = member.robot_type;
|
||||
db.Updateable(order).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"淘宝绑定数据,第{page}页完成,并成功绑定用户信息");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void BindJDOrder(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取京东绑定数据,第{page}页...");
|
||||
|
||||
//三个月已经绑定的订单请求
|
||||
var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getJdListNew&data={%22desc_name%22:%22order_time%22,%22order_time_type%22:%22order_time%22,%22order_time%22:%22" + date.AddMonths(-3).ToString("yyyy-MM-dd") + "%20-%20" + date.ToString("yyyy-MM-dd") + "%22,%22cps_user_id%22:%22all%22,%22plus%22:%22all%22,%22valid_code%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var order_id = item["order_parent_id"].ToString();
|
||||
var sku_id = item["sku_id"].ToString();
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
|
||||
var order = db.FindSingle<fl_order_jingdong>("orderId = @orderId and skuId = @skuId",
|
||||
new { orderId = order_id, skuId = sku_id });
|
||||
if (order != null && order.db_userid == 0)
|
||||
{
|
||||
var member = db.FindMemberInfoByUsername(wx_id);
|
||||
if (member != null)
|
||||
{
|
||||
order.db_robotname = robot_id;
|
||||
order.db_userid = member.id;
|
||||
order.db_robottype = member.robot_type;
|
||||
db.Updateable(order).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"京东绑定数据,第{page}页完成,并成功绑定用户信息");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void BindPDDOrder(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取拼多多绑定数据,第{page}页...");
|
||||
|
||||
//三个月已经绑定的订单请求
|
||||
var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getPddListNew&data={%22desc_name%22:%22order_pay_time%22,%22order_time_type%22:%22order_pay_time%22,%22order_time%22:%22" + date.AddMonths(-3).ToString("yyyy-MM-dd") + "%20-%20" + date.ToString("yyyy-MM-dd") + "%22,%22cps_user_id%22:%22all%22,%22order_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
//http://yun.yunsutuike.com/page/order/data.php?typeName=getPddListNew&data={%22desc_name%22:%22order_pay_time%22,%22order_time_type%22:%22order_pay_time%22,%22order_time%22:%222022-02-28%20-%202022-05-28%22,%22cps_user_id%22:%22all%22,%22order_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=1&limit=15
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var order_sn = item["order_sn"].ToString();
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
|
||||
var order = db.FindSingle<fl_order_pinduoduo>("order_sn = @order_sn", new { order_sn = order_sn });
|
||||
if (order != null && order.db_userid == 0)
|
||||
{
|
||||
var member = db.FindMemberInfoByUsername(wx_id);
|
||||
if (member != null)
|
||||
{
|
||||
order.db_robotname = robot_id;
|
||||
order.db_userid = member.id;
|
||||
order.db_robottype = member.robot_type;
|
||||
db.Updateable(order).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"拼多多绑定数据,第{page}页完成,并成功绑定用户信息");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void BindWPHOrder(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取唯品会绑定数据,第{page}页...");
|
||||
|
||||
//三个月已经绑定的订单请求
|
||||
var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getVipListNew&data={%22desc_name%22:%22order_time%22,%22order_time_type%22:%22order_time%22,%22order_time%22:%22" + date.AddMonths(-3).ToString("yyyy-MM-dd") + "%20-%20" + date.ToString("yyyy-MM-dd") + "%22,%22cps_user_id%22:%22all%22,%22order_sub_status_name%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
//http://yun.yunsutuike.com/page/order/data.php?typeName=getVipListNew&data={%22desc_name%22:%22order_time%22,%22order_time_type%22:%22order_time%22,%22order_time%22:%222022-02-28%20-%202022-05-28%22,%22cps_user_id%22:%22all%22,%22order_sub_status_name%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=1&limit=15
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var orderSn = item["order_parent_sn"].ToString();
|
||||
var goodsId = item["goods_id"].ToString();
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
|
||||
var orders = db.Find<fl_order_weipinhui>("orderSn = @orderSn and goodsId= @goodsId", new { orderSn = orderSn, goodsId = goodsId }).ToList();
|
||||
if (orders.Count != 0)
|
||||
{
|
||||
foreach (var order in orders)
|
||||
{
|
||||
if (order.db_userid == 0)
|
||||
{
|
||||
var member = db.FindMemberInfoByUsername(wx_id);
|
||||
if (member != null)
|
||||
{
|
||||
order.db_robotname = robot_id;
|
||||
order.db_userid = member.id;
|
||||
order.db_robottype = member.robot_type;
|
||||
db.Updateable(order).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"唯品会绑定数据,第{page}页完成,并成功绑定用户信息");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void BindDYOrder(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取抖音绑定数据,第{page}页...");
|
||||
|
||||
//三个月已经绑定的订单请求
|
||||
var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getDyListNew&data={%22desc_name%22:%22pay_time%22,%22order_time_type%22:%22pay_time%22,%22order_time%22:%22" + date.AddMonths(-3).ToString("yyyy-MM-dd") + "%20-%20" + date.ToString("yyyy-MM-dd") + "%22,%22cps_user_id%22:%22all%22,%22order_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
//http://yun.yunsutuike.com/page/order/data.php?typeName=getDyListNew&data={%22desc_name%22:%22pay_time%22,%22order_time_type%22:%22pay_time%22,%22order_time%22:%222022-05-02%20-%202022-06-14%22,%22cps_user_id%22:%22all%22,%22order_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=1&limit=15
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var order_id = item["order_id"].ToString();
|
||||
var product_id = item["product_id"].ToString();
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
|
||||
var order = db.FindSingle<fl_order_douyin>("order_id = @order_id and product_id=@product_id", new { order_id = order_id, product_id = product_id });
|
||||
if (order != null && order.db_userid == 0)
|
||||
{
|
||||
var member = db.FindMemberInfoByUsername(wx_id);
|
||||
if (member != null)
|
||||
{
|
||||
order.db_robotname = robot_id;
|
||||
order.db_userid = member.id;
|
||||
order.db_robottype = member.robot_type;
|
||||
db.Updateable(order).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"抖音绑定数据,第{page}页完成,并成功绑定用户信息");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void BindTBOrder2(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取淘宝绑定数据,第{page}页...");
|
||||
|
||||
//三个月已经绑定的订单请求
|
||||
//var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getTbListNew&data={%22desc_name%22:%22tk_create_time%22,%22order_time_type%22:%22tk_create_time%22,%22order_time%22:%22" + date.AddMonths(-3).ToString("yyyy-MM-dd") + "%20-%20" + date.ToString("yyyy-MM-dd") + "%22,%22cps_user_id%22:%22all%22,%22order_type%22:%22all%22,%22tk_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getTbListNew&data={%22desc_name%22:%22tk_create_time%22,%22order_time_type%22:%22tk_create_time%22,%22order_time%22:%22%22,%22cps_user_id%22:%22all%22,%22order_type%22:%22all%22,%22tk_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%222%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var trade_parent_id = item["trade_parent_id"].ToString();
|
||||
var trade_id = item["trade_id"].ToString();
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
|
||||
var order = db.FindSingle<fl_order_alimama>("trade_parent_id = @trade_parent_id and trade_id = @trade_id",
|
||||
new { trade_parent_id = trade_parent_id, trade_id = trade_id });
|
||||
if (order != null)
|
||||
{
|
||||
order.db_robotname = robot_id;
|
||||
order.db_status = SystemOrderStatus.订单冻结;
|
||||
order.db_endtime = DateTime.Now.AddMinutes(10);
|
||||
db.Updateable(order).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"淘宝绑定数据,第{page}页完成,并成功绑定用户信息");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void BindJDOrder2(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取京东绑定数据,第{page}页...");
|
||||
|
||||
//三个月已经绑定的订单请求
|
||||
//var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getJdListNew&data={%22desc_name%22:%22order_time%22,%22order_time_type%22:%22order_time%22,%22order_time%22:%22" + date.AddMonths(-3).ToString("yyyy-MM-dd") + "%20-%20" + date.ToString("yyyy-MM-dd") + "%22,%22cps_user_id%22:%22all%22,%22plus%22:%22all%22,%22valid_code%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getJdListNew&data={%22desc_name%22:%22order_time%22,%22order_time_type%22:%22order_time%22,%22order_time%22:%22%22,%22cps_user_id%22:%22all%22,%22plus%22:%22all%22,%22valid_code%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%222%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var order_id = item["order_parent_id"].ToString();
|
||||
var sku_id = item["sku_id"].ToString();
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
|
||||
var order = db.FindSingle<fl_order_jingdong>("orderId = @orderId and skuId = @skuId",
|
||||
new { orderId = order_id, skuId = sku_id });
|
||||
if (order != null)
|
||||
{
|
||||
order.db_robotname = robot_id;
|
||||
order.db_status = SystemOrderStatus.订单冻结;
|
||||
order.db_endtime = DateTime.Now.AddMinutes(10);
|
||||
db.Updateable(order).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"京东绑定数据,第{page}页完成,并成功绑定用户信息");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void BindPDDOrder2(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取拼多多绑定数据,第{page}页...");
|
||||
|
||||
//三个月已经绑定的订单请求
|
||||
//var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getPddListNew&data={%22desc_name%22:%22order_pay_time%22,%22order_time_type%22:%22order_pay_time%22,%22order_time%22:%22" + date.AddMonths(-3).ToString("yyyy-MM-dd") + "%20-%20" + date.ToString("yyyy-MM-dd") + "%22,%22cps_user_id%22:%22all%22,%22order_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getPddListNew&data={%22desc_name%22:%22order_pay_time%22,%22order_time_type%22:%22order_pay_time%22,%22order_time%22:%22%22,%22cps_user_id%22:%22all%22,%22order_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%222%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
//http://yun.yunsutuike.com/page/order/data.php?typeName=getPddListNew&data={%22desc_name%22:%22order_pay_time%22,%22order_time_type%22:%22order_pay_time%22,%22order_time%22:%222022-02-28%20-%202022-05-28%22,%22cps_user_id%22:%22all%22,%22order_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=1&limit=15
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var order_sn = item["order_sn"].ToString();
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
|
||||
var order = db.FindSingle<fl_order_pinduoduo>("order_sn = @order_sn", new { order_sn = order_sn });
|
||||
if (order != null)
|
||||
{
|
||||
order.db_robotname = robot_id;
|
||||
order.db_status = SystemOrderStatus.订单冻结;
|
||||
order.db_endtime = DateTime.Now.AddMinutes(10);
|
||||
db.Updateable(order).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"拼多多绑定数据,第{page}页完成,并成功绑定用户信息");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void BindWPHOrder2(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取唯品会绑定数据,第{page}页...");
|
||||
|
||||
//三个月已经绑定的订单请求
|
||||
//var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getVipListNew&data={%22desc_name%22:%22order_time%22,%22order_time_type%22:%22order_time%22,%22order_time%22:%22" + date.AddMonths(-3).ToString("yyyy-MM-dd") + "%20-%20" + date.ToString("yyyy-MM-dd") + "%22,%22cps_user_id%22:%22all%22,%22order_sub_status_name%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getVipListNew&data={%22desc_name%22:%22order_time%22,%22order_time_type%22:%22order_time%22,%22order_time%22:%22%22,%22cps_user_id%22:%22all%22,%22order_sub_status_name%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%222%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
//http://yun.yunsutuike.com/page/order/data.php?typeName=getVipListNew&data={%22desc_name%22:%22order_time%22,%22order_time_type%22:%22order_time%22,%22order_time%22:%222022-02-28%20-%202022-05-28%22,%22cps_user_id%22:%22all%22,%22order_sub_status_name%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=1&limit=15
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var orderSn = item["order_parent_sn"].ToString();
|
||||
var goodsId = item["goods_id"].ToString();
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
|
||||
var orders = db.Find<fl_order_weipinhui>("orderSn = @orderSn and goodsId= @goodsId", new { orderSn = orderSn, goodsId = goodsId }).ToList();
|
||||
if (orders.Count != 0)
|
||||
{
|
||||
foreach (var order in orders)
|
||||
{
|
||||
//if (order.db_userid == 0)
|
||||
//{
|
||||
// var member = db.FindMemberInfoByUsername(wx_id);
|
||||
// if (member != null)
|
||||
// {
|
||||
// order.db_robotname = robot_id;
|
||||
// order.db_userid = member.id;
|
||||
// order.db_robottype = member.robot_type;
|
||||
// db.Updateable(order).ExecuteCommand();
|
||||
// }
|
||||
//}
|
||||
order.db_robotname = robot_id;
|
||||
order.db_status = SystemOrderStatus.订单冻结;
|
||||
order.db_endtime = DateTime.Now.AddMinutes(10);
|
||||
db.Updateable(order).ExecuteCommand();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"唯品会绑定数据,第{page}页完成,并成功绑定用户信息");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载并绑定订单数据
|
||||
/// </summary>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public void BindDYOrder2(DateTime date, int page, int pageSize, out int total)
|
||||
{
|
||||
OnEvent(this, $"正在获取抖音绑定数据,第{page}页...");
|
||||
|
||||
//三个月已经绑定的订单请求
|
||||
//var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getDyListNew&data={%22desc_name%22:%22pay_time%22,%22order_time_type%22:%22pay_time%22,%22order_time%22:%22" + date.AddMonths(-3).ToString("yyyy-MM-dd") + "%20-%20" + date.ToString("yyyy-MM-dd") + "%22,%22cps_user_id%22:%22all%22,%22order_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
var url = "http://yun.yunsutuike.com/page/order/data.php?typeName=getDyListNew&data={%22desc_name%22:%22pay_time%22,%22order_time_type%22:%22pay_time%22,%22order_time%22:%22%22,%22cps_user_id%22:%22all%22,%22order_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%222%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=" + page + "&limit=" + pageSize;
|
||||
|
||||
//http://yun.yunsutuike.com/page/order/data.php?typeName=getDyListNew&data={%22desc_name%22:%22pay_time%22,%22order_time_type%22:%22pay_time%22,%22order_time%22:%222022-05-02%20-%202022-06-14%22,%22cps_user_id%22:%22all%22,%22order_status%22:%22all%22,%22robot_id%22:%22all%22,%22fl_status%22:%22100%22,%22fl_source%22:%22all%22,%22search_type%22:%22all%22,%22search_val%22:%22%22,%22user_rate%22:%22%22}&page=1&limit=15
|
||||
|
||||
var html = GetHtml(url);
|
||||
html = HttpExtend.Unicode2String(html);
|
||||
|
||||
var jObj = JObject.Parse(html);
|
||||
total = jObj["count"].Value<int>();//总订单数
|
||||
var data = jObj["data"]?.ToArray();
|
||||
if (data != null)
|
||||
{
|
||||
var db = ApiClient.GetSession();
|
||||
foreach (var item in data)
|
||||
{
|
||||
var order_id = item["order_id"].ToString();
|
||||
var product_id = item["product_id"].ToString();
|
||||
var robot_id = item["robot_id"].ToString();
|
||||
var wx_id = item["wx_id"].ToString();
|
||||
|
||||
var order = db.FindSingle<fl_order_douyin>("order_id = @order_id and product_id=@product_id", new { order_id = order_id, product_id = product_id });
|
||||
if (order != null && order.db_userid == 0)
|
||||
{
|
||||
order.db_robotname = robot_id;
|
||||
order.db_status = SystemOrderStatus.订单冻结;
|
||||
order.db_endtime = DateTime.Now.AddMinutes(10);
|
||||
db.Updateable(order).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
OnEvent(this, $"抖音绑定数据,第{page}页完成,并成功绑定用户信息");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// http请求方法
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <returns></returns>
|
||||
private string GetHtml(string url)
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
HttpHelper http = new HttpHelper();
|
||||
HttpItem item = new HttpItem()
|
||||
{
|
||||
URL = url,
|
||||
Method = "GET",
|
||||
Timeout = 100000,
|
||||
ReadWriteTimeout = 30000,
|
||||
IsToLower = false,
|
||||
Cookie = ck,
|
||||
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0",
|
||||
Accept = "text/html, application/xhtml+xml, */*",
|
||||
ContentType = "text/html",
|
||||
Referer = "http://yun.yunsutuike.com/page/member/mainNew.php",
|
||||
Allowautoredirect = false,
|
||||
AutoRedirectCookie = false,
|
||||
Postdata = "",
|
||||
ResultType = ResultType.String,
|
||||
};
|
||||
HttpResult result = http.GetHtml(item);
|
||||
if (result.StatusCode == System.Net.HttpStatusCode.OK)
|
||||
{
|
||||
string html = result.Html;
|
||||
if (html.Contains("Empty needle in"))
|
||||
throw new Exception("可能Cookie错误");
|
||||
return html;
|
||||
}
|
||||
|
||||
OnEvent(this, $"请求数据异常,正在重试第{(i + 1)}次...");
|
||||
Thread.Sleep(2000);
|
||||
}
|
||||
throw new Exception("多次请求数据异常:终止操作");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue