Commit 84fa22f7 authored by wuliangshun's avatar wuliangshun

添加定时任务

parent f905230d
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonUtil
{
public class ChineseNameUtils
{
private static readonly string FIRST_NAMES = "赵钱孙李刘周吴郑王冯陈褚卫蒋沈韩杨朱秦尤许叶何吕施张孔曹严华金魏姜谢邹喻水章苏潘葛范彭鲁韦昌马苗花方俞任袁柳史唐费廉岑薛雷贺倪汤罗毕郝安乐于时傅皮卞康伍余元卜顾孟平黄";
public static Random Random = new Random();
/// <summary>
/// 随机姓名
/// </summary>
/// <returns></returns>
public static string Generate()
{
string name = "";
//姓
name += FIRST_NAMES[Random.Next(0, FIRST_NAMES.Length - 1)];
//名
for (int i = 0; i < 1; i++)
{
name += (char)Random.Next(16128, 36597);
}
return name;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonUtil
{
/// <summary>
/// 中国大陆身份证工具
/// </summary>
public class CnIdCardUtils
{
//生成随机年份
private static int GenerateYear()
{
StringBuilder bu = new StringBuilder();
Random rd = new Random();
int year = rd.Next(1960, 2000);
bu.Append(year);
return int.Parse(bu.ToString());
}
/// <summary>
/// 生成随机身份证号
/// </summary>
/// <param name="cityCode"></param>
/// <returns></returns>
public static string Generate(int cityCode)
{
StringBuilder bu = new StringBuilder();
Random rd = new Random();
bu.Append(cityCode);
int year = GenerateYear();
bu.Append(year);
int month = rd.Next(1, 12);
if (month < 10)
{
bu.Append(0);
}
bu.Append(month);
int[] days;
if (Isleapyear(year))
{
days = new int[12] { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
}
else
{
days = new int[12] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
}
int day = rd.Next(1, days[month]);
if (day < 10)
{
bu.Append(0);
}
bu.Append(day);
bu.Append(RandomCode());
int[] c = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 };
char[] r = { '1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2' };
string convert = bu.ToString();
int it = 0;
int res = 0;
while (it < 17)
{
res = res + (convert[it] - '0') * c[it];
it++;
}
int i = res % 11;
bu.Append(r[i]);
return bu.ToString();
}
// 生成3位随机
private static string RandomCode()
{
StringBuilder bu = new StringBuilder();
Random rd = new Random();
int code = rd.Next(1, 999);
if (code < 10)
{
bu.Append(00);
}
else if (code < 100)
{
bu.Append(0);
}
bu.Append(code);
return bu.ToString();
}
private static bool Isleapyear(int year)
{
if (year % 4 == 0)
{
if (year % 100 == 0 && year % 400 != 0)
{
return false;
}
return true;
}
return false;
}
}
}
<?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>{99134386-43E5-4F7E-A760-328634700FDA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CommonUtil</RootNamespace>
<AssemblyName>CommonUtil</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</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="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<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" />
</ItemGroup>
<ItemGroup>
<Compile Include="ChineseNameUtils.cs" />
<Compile Include="CnIdCardUtils.cs" />
<Compile Include="DateTimeUtils.cs" />
<Compile Include="HttpResult.cs" />
<Compile Include="HttpUtils.cs" />
<Compile Include="IUILog.cs" />
<Compile Include="JsonUtils.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StringUtils.cs" />
<Compile Include="UILogUtils.cs" />
<Compile Include="UrlUtils.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonUtil
{
public class DateTimeUtils
{
/// <summary>
/// 获取当前秒时间戳
/// </summary>
/// <returns></returns>
public static long GetTimeStampOfSecond()
{
TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
return Convert.ToInt64(ts.TotalSeconds);
}
/// <summary>
/// 获取当前毫秒时间戳
/// </summary>
/// <returns></returns>
public static long GetTimeStampOfMilliseconds()
{
TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
return Convert.ToInt64(ts.TotalMilliseconds);
}
/// <summary>
/// 将Unix时间戳转为C#时间格式
/// </summary>
/// <param name="timeSpan"></param>
/// <returns></returns>
public static DateTime GetDateTimeFromUnix(long timeSpan)
{
DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
long lTime = long.Parse(timeSpan + "0000");
TimeSpan toNow = new TimeSpan(lTime);
return dtStart.Add(toNow);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace CommonUtil
{
public class HttpResult
{
/// <summary>
/// Body
/// </summary>
public string Body { get; set; }
/// <summary>
/// Headers
/// </summary>
public WebHeaderCollection Headers { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace CommonUtil
{
public class HttpUtils
{
/// <summary>
/// GET
/// </summary>
/// <param name="url">url</param>
/// <param name="timeout">请求超时前等待的毫秒数。</param>
/// <returns>response</returns>
public static string DoGet(string url, Dictionary<string, string> headers, int timeout = 10000)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
request.Timeout = timeout;
if (headers != null)
{
foreach (var header in headers)
{
if (header.Key.Equals("User-Agent"))
{
request.UserAgent = header.Value;
continue;
}
request.Headers.Add(header.Key, header.Value);
}
}
Stream responseStream = null;
StreamReader streamReader = null;
try
{
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
responseStream = response.GetResponseStream();
streamReader = new StreamReader(responseStream, Encoding.UTF8);
string result = streamReader.ReadToEnd();
return result;
}
finally
{
streamReader?.Close();
responseStream?.Close();
}
}
/// <summary>
/// GET
/// </summary>
/// <param name="url">url</param>
/// <param name="timeout">请求超时前等待的毫秒数。</param>
/// <returns>response</returns>
public static HttpResult DoGetResult(string url, Dictionary<string, string> headers, int timeout = 10000)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
request.Timeout = timeout;
if (headers != null)
{
foreach (var header in headers)
{
if (header.Key.Equals("User-Agent"))
{
request.UserAgent = header.Value;
continue;
}
request.Headers.Add(header.Key, header.Value);
}
}
Stream responseStream = null;
StreamReader streamReader = null;
try
{
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
responseStream = response.GetResponseStream();
streamReader = new StreamReader(responseStream, Encoding.UTF8);
string result = streamReader.ReadToEnd();
HttpResult httpResult = new HttpResult()
{
Body = result,
Headers = response.Headers
};
return httpResult;
}
finally
{
streamReader?.Close();
responseStream?.Close();
}
}
/// <summary>
/// GET
/// </summary>
/// <param name="url">url</param>
/// <param name="timeout">请求超时前等待的毫秒数。</param>
/// <returns>response</returns>
public static string DoGet(CookieContainer cookieContainer, string url, Dictionary<string, string> headers, int timeout = 10000)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
request.Timeout = timeout;
request.CookieContainer = cookieContainer;
if (headers != null)
{
foreach (var header in headers)
{
if (header.Key.Equals("User-Agent"))
{
request.UserAgent = header.Value;
continue;
}
request.Headers.Add(header.Key, header.Value);
}
}
Stream responseStream = null;
StreamReader streamReader = null;
try
{
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
responseStream = response.GetResponseStream();
streamReader = new StreamReader(responseStream, Encoding.UTF8);
string result = streamReader.ReadToEnd();
return result;
}
finally
{
streamReader?.Close();
responseStream?.Close();
}
}
public static string DoPost(string url, string data, Dictionary<string, string> headers, int timeout = 10000)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST";
request.ContentType = JsonUtils.IsJsonData(data) ? "application/json" : "application/x-www-form-urlencoded";
if (headers != null)
{
foreach (var header in headers)
{
if (header.Key.Equals("User-Agent"))
{
request.UserAgent = header.Value;
continue;
}
request.Headers.Add(header.Key, header.Value);
}
}
if (!string.IsNullOrEmpty(data))
{
Stream requestStream = request.GetRequestStream();
byte[] bytes = Encoding.UTF8.GetBytes(data);
requestStream.Write(bytes, 0, bytes.Length);
requestStream.Close();
}
Stream responseStream = null;
StreamReader streamReader = null;
try
{
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
responseStream = response.GetResponseStream();
streamReader = new StreamReader(responseStream, Encoding.UTF8);
string result = streamReader.ReadToEnd();
return result;
}
finally
{
streamReader?.Close();
responseStream?.Close();
}
}
public static HttpResult DoPostResult(string url, string data, Dictionary<string, string> headers, int timeout = 10000)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST";
request.ContentType = JsonUtils.IsJsonData(data) ? "application/json" : "application/x-www-form-urlencoded";
if (headers != null)
{
foreach (var header in headers)
{
if (header.Key.Equals("User-Agent"))
{
request.UserAgent = header.Value;
continue;
}
request.Headers.Add(header.Key, header.Value);
}
}
if (!string.IsNullOrEmpty(data))
{
Stream requestStream = request.GetRequestStream();
byte[] bytes = Encoding.UTF8.GetBytes(data);
requestStream.Write(bytes, 0, bytes.Length);
requestStream.Close();
}
Stream responseStream = null;
StreamReader streamReader = null;
try
{
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
responseStream = response.GetResponseStream();
streamReader = new StreamReader(responseStream, Encoding.UTF8);
string result = streamReader.ReadToEnd();
HttpResult httpResult = new HttpResult()
{
Body = result,
Headers = response.Headers
};
return httpResult;
}
finally
{
streamReader?.Close();
responseStream?.Close();
}
}
public static string DoPost(CookieContainer cookieContainer, string url, string data, Dictionary<string, string> headers, int timeout = 10000)
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST";
request.ContentType = JsonUtils.IsJsonData(data) ? "application/json" : "application/x-www-form-urlencoded";
request.CookieContainer = cookieContainer;
if (headers != null)
{
foreach (var header in headers)
{
if (header.Key.Equals("User-Agent"))
{
request.UserAgent = header.Value;
continue;
}
request.Headers.Add(header.Key, header.Value);
}
}
if (!string.IsNullOrEmpty(data))
{
Stream requestStream = request.GetRequestStream();
byte[] bytes = Encoding.UTF8.GetBytes(data);
requestStream.Write(bytes, 0, bytes.Length);
requestStream.Close();
}
Stream responseStream = null;
StreamReader streamReader = null;
try
{
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
responseStream = response.GetResponseStream();
streamReader = new StreamReader(responseStream, Encoding.UTF8);
string result = streamReader.ReadToEnd();
return result;
}
finally
{
streamReader?.Close();
responseStream?.Close();
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonUtil
{
public interface IUILog
{
void Info(String message);
void Debug(String message);
void Error(String message);
void Error(Exception exception);
void Error(String message,Exception exception);
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonUtil
{
public class JsonUtils
{
/// <summary>
/// 是否json数据
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
public static bool IsJsonData(string data)
{
if (string.IsNullOrWhiteSpace(data))
{
return false;
}
return (data.StartsWith("[") && data.EndsWith("]"))
|| (data.StartsWith("{") && data.EndsWith("}"));
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("CommonUtil")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CommonUtil")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("99134386-43e5-4f7e-a760-328634700fda")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonUtil
{
public class StringUtils
{
private static Random Random = new Random();
public static bool IsDigital(string str)
{
if (string.IsNullOrWhiteSpace(str))
{
return false;
}
foreach(char c in str)
{
if (c < 48 || c > 57)
return false;
}
return true;
}
/// <summary>
/// 获取随机手机号
/// </summary>
/// <returns></returns>
public static string GenerateRandomPhone()
{
String[] Top3 = {"133", "149", "153", "173", "177",
"180", "181", "189", "199", "130", "131", "132",
"145", "155", "156", "166", "171", "175", "176", "185", "186", "166", "134", "135",
"136", "137", "138", "139", "147", "150", "151", "152", "157", "158", "159", "172",
"178", "182", "183", "184", "187", "188", "198", "170", "171"};
int index = Random.Next(0, Top3.Length);
//随机出真实号段 使用数组的length属性,获得数组长度,
//通过Math.random()*数组长度获得数组下标,从而随机出前三位的号段
String firstNum = Top3[index];
//随机出剩下的8位数
String lastNum = "";
int last = 8;
for (int i = 0; i < last; i++)
{
//每次循环都从0~9挑选一个随机数
lastNum += Random.Next(0, 10);
}
//最终将号段和尾数连接起来
return firstNum + lastNum;
}
/// <summary>
/// 生成随机IP
/// </summary>
/// <returns></returns>
public static string GenerateRandomIp()
{ /*
int[][]
这个叫交错数组,白话文就是数组的数组.
初始化的方法:
int[][] numbers = new int[][] { new int[] {2,3,4}, new int[] {5,6,7,8,9} };
当然也可以使用{}初始化器初始化
int[][] numbers = { new int[] {2,3,4},
new int[] {5,6,7,8,9}
};
*/
int[][] range = {new int[]{607649792,608174079},//36.56.0.0-36.63.255.255
new int[]{1038614528,1039007743},//61.232.0.0-61.237.255.255
new int[]{1783627776,1784676351},//106.80.0.0-106.95.255.255
new int[]{2035023872,2035154943},//121.76.0.0-121.77.255.255
new int[]{2078801920,2079064063},//123.232.0.0-123.235.255.255
new int[]{-1950089216,-1948778497},//139.196.0.0-139.215.255.255
new int[]{-1425539072,-1425014785},//171.8.0.0-171.15.255.255
new int[]{-1236271104,-1235419137},//182.80.0.0-182.92.255.255
new int[]{-770113536,-768606209},//210.25.0.0-210.47.255.255
new int[]{-569376768,-564133889}, //222.16.0.0-222.95.255.255
};
int index = Random.Next(10);
string ip = num2ip(range[index][0] + Random.Next(range[index][1] - range[index][0]));
return ip;
}
/*
* 将十进制转换成ip地址
*/
private static string num2ip(int ip)
{
int[] b = new int[4];
string x = "";
//位移然后与255 做高低位转换
b[0] = (int)((ip >> 24) & 0xff);
b[1] = (int)((ip >> 16) & 0xff);
b[2] = (int)((ip >> 8) & 0xff);
b[3] = (int)(ip & 0xff);
x = (b[0]).ToString() + "." + (b[1]).ToString() + "." + (b[2]).ToString() + "." + (b[3]).ToString();
return x;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CommonUtil
{
public class UILogUtils
{
private static readonly List<IUILog> UI_LOGS = new List<IUILog>();
public static void Add(IUILog uILog)
{
UI_LOGS.Add(uILog);
}
public static void Debug(String message)
{
foreach (IUILog log in UI_LOGS)
{
log.Debug(message);
}
}
public static void Info(String message)
{
foreach (IUILog log in UI_LOGS)
{
log.Info(message);
}
}
public static void Error(String message)
{
foreach (IUILog log in UI_LOGS)
{
log.Error(message);
}
}
public static void Error(Exception exception)
{
foreach (IUILog log in UI_LOGS)
{
log.Error(exception);
}
}
public static void Error(String message, Exception exception)
{
foreach (IUILog log in UI_LOGS)
{
log.Error(message, exception);
}
}
}
}
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
namespace CommonUtil
{
public class UrlUtils
{
public static string BuildQueryStringUrl(object obj)
{
var objJson = JsonConvert.SerializeObject(obj);
var keyValuePairs = JsonConvert.DeserializeObject<Dictionary<string, Object>>(objJson);
return BuildQueryStringUrl(keyValuePairs);
}
public static string BuildQueryStringUrl(Dictionary<string, Object> keyValuePairs)
{
if (keyValuePairs == null || keyValuePairs.Count <= 0)
{
return null;
}
StringBuilder stringBuilder = new StringBuilder();
foreach (KeyValuePair<string, Object> keyValue in keyValuePairs)
{
if (keyValue.Value != null)
{
if (keyValue.Value is bool)
{
stringBuilder.Append($"{keyValue.Key}=" + (((bool)(keyValue.Value)) ? "true" : "false") + "&");
}
else
{
stringBuilder.Append($"{keyValue.Key}={HttpUtility.UrlEncode(keyValue.Value.ToString())}&");
}
}
else
{
stringBuilder.Append($"{keyValue.Key}=&");
}
}
return stringBuilder.ToString();
}
/// <summary>
/// 解析url参数
/// </summary>
/// <param name="url"></param>
/// <returns></returns>
public static Dictionary<String, String> ParseUrlParams(String url)
{
Dictionary<String, String> result = new Dictionary<string, string>();
if (string.IsNullOrWhiteSpace(url))
{
return result;
}
int index = url.IndexOf('?');
if (index < 0)
{
return result;
}
String paramString = url.Substring(index + 1);
var paramList = paramString.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries).ToList();
if (paramList.Count <= 0)
{
return result;
}
foreach (String param in paramList)
{
var paramItemArray = param.Split(new char[] { '=' }, StringSplitOptions.RemoveEmptyEntries);
if (paramItemArray.Length <= 0)
{
continue;
}
result.Add(paramItemArray[0], paramItemArray.Length > 1 ? paramItemArray[1] : null);
}
return result;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net45" />
</packages>
\ No newline at end of file
using CommonUtil;
using DingDingSdk.Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DingDingSdk
{
public class DingDingClient
{
/// <summary>
/// 异步发送文本信息
/// </summary>
/// <param name="webHookUrl">webhook的url地址</param>
/// <param name="message">文本内容</param>
/// <param name="AtMobiles">@的手机号列表</param>
/// <param name="isAtAll">是否@所有人</param>
/// <returns></returns>
public static SendResult SendMessage(string webHookUrl, string message, List<string> AtMobiles = null, bool isAtAll = false)
{
if (string.IsNullOrWhiteSpace(message) || string.IsNullOrEmpty(webHookUrl))
{
return new SendResult
{
ErrMsg = "参数不正确",
ErrCode = -1
};
}
var msg = new TextMessage
{
Text = new Text()
{
Content = message
},
at = new AtSetting()
};
if (AtMobiles != null)
{
msg.at.AtMobiles = AtMobiles;
msg.at.IsAtAll = false;
}
else
{
if (isAtAll) msg.at.IsAtAll = true;
}
var json = msg.ToJson();
return Send(webHookUrl, json);
}
/// <summary>
/// 异步发送其他类型的信息
/// </summary>
/// <param name="webHookUrl">webhook的url地址</param>
/// <param name="message">信息model</param>
/// <returns></returns>
public static SendResult SendMessage(string webHookUrl, IDingDingMessage message)
{
if (message == null || string.IsNullOrEmpty(webHookUrl))
{
return new SendResult
{
ErrMsg = "参数不正确",
ErrCode = -1
};
}
var json = message.ToJson();
return Send(webHookUrl, json);
}
/// <summary>
/// 发送
/// </summary>
/// <param name="webHookUrl"></param>
/// <param name="data"></param>
/// <returns></returns>
private static SendResult Send(string webHookUrl, string data)
{
try
{
var responseStr = HttpUtils.DoPost(webHookUrl, data, null);
return JsonConvert.DeserializeObject<SendResult>(responseStr);
}
catch (Exception ex)
{
return new SendResult { ErrMsg = ex.Message, ErrCode = -1 };
}
}
}
}
<?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>{3C638CAF-09F5-4105-88E5-5469BC5798BA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DingDingSdk</RootNamespace>
<AssemblyName>DingDingSdk</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</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="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<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" />
</ItemGroup>
<ItemGroup>
<Compile Include="DingDingClient.cs" />
<Compile Include="Model\DingDingMessage.cs" />
<Compile Include="Model\IDingDingMessage.cs" />
<Compile Include="Model\TextMessage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SendResult.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommonUtil\CommonUtil.csproj">
<Project>{99134386-43e5-4f7e-a760-328634700fda}</Project>
<Name>CommonUtil</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DingDingSdk.Model
{
public abstract class DingDingMessage : IDingDingMessage
{
public string ToJson()
{
return JsonConvert.SerializeObject(this);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DingDingSdk.Model
{
public interface IDingDingMessage
{
string ToJson();
}
}
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DingDingSdk.Model
{
public class TextMessage : DingDingMessage
{
[JsonProperty("msgtype")]
public string MessageType { get; set; } = "text";
/// <summary>
/// 消息内容
/// </summary>
[JsonProperty("text")]
public Text Text { get; set; }
/// <summary>
/// 被@的信息
/// </summary>
[JsonProperty("at")]
public AtSetting at { get; set; }
}
public class Text
{
/// <summary>
/// 消息内容
/// </summary>
[JsonProperty("content")]
public string Content { get; set; }
}
/// <summary>
/// @ 配置
/// </summary>
public class AtSetting
{
public AtSetting()
{
AtMobiles = new List<string>();
}
/// <summary>
/// 被@人的手机号
/// </summary>
[JsonProperty("atMobiles")]
public List<string> AtMobiles { get; set; }
/// <summary>
/// @所有人时:true,否则为:false
/// </summary>
[JsonProperty("isAtAll")]
public bool IsAtAll { get; set; }
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("DingDingSdk")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DingDingSdk")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("3c638caf-09f5-4105-88e5-5469bc5798ba")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DingDingSdk
{
public class SendResult
{
[JsonProperty("errmsg")]
public string ErrMsg { get; set; }
[JsonProperty("errcode")]
public int ErrCode { get; set; }
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net45" />
</packages>
\ No newline at end of file
......@@ -5,6 +5,10 @@ VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iqiyiWin", "iqiyiWin\iqiyiWin.csproj", "{8865CEE3-3A28-4333-A8C8-023E1ED89212}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DingDingSdk", "DingDingSdk\DingDingSdk.csproj", "{3C638CAF-09F5-4105-88E5-5469BC5798BA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonUtil", "CommonUtil\CommonUtil.csproj", "{99134386-43E5-4F7E-A760-328634700FDA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -15,6 +19,14 @@ Global
{8865CEE3-3A28-4333-A8C8-023E1ED89212}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8865CEE3-3A28-4333-A8C8-023E1ED89212}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8865CEE3-3A28-4333-A8C8-023E1ED89212}.Release|Any CPU.Build.0 = Release|Any CPU
{3C638CAF-09F5-4105-88E5-5469BC5798BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C638CAF-09F5-4105-88E5-5469BC5798BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C638CAF-09F5-4105-88E5-5469BC5798BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C638CAF-09F5-4105-88E5-5469BC5798BA}.Release|Any CPU.Build.0 = Release|Any CPU
{99134386-43E5-4F7E-A760-328634700FDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{99134386-43E5-4F7E-A760-328634700FDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{99134386-43E5-4F7E-A760-328634700FDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{99134386-43E5-4F7E-A760-328634700FDA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -63,16 +63,16 @@ namespace iqiyiWin.Api
if (response != null && response.Code == "A00000")
{
UILogUtils.Info($"爱奇艺商务 【获取观影豆】成功: {iqiyiAccount.MobileNo} [当前观影豆:{response.Data.BalanceCount}]");
// UILogUtils.Info($"爱奇艺票务 【获取观影豆】成功: {iqiyiAccount.MobileNo} [当前观影豆:{response.Data.BalanceCount}]");
return response.Data.BalanceCount.ToString();
}
else
{
UILogUtils.Error($"爱奇艺商务 【获取观影豆】失败: {iqiyiAccount.MobileNo} {(response == null ? responseStr : response.Msg)}");
// UILogUtils.Error($"爱奇艺票务 【获取观影豆】失败: {iqiyiAccount.MobileNo} {(response == null ? responseStr : response.Msg)}");
return "-1";
}
}
public static string GetCouponList(IqiyiAccount iqiyiAccount)
public static IList<Valid> GetCouponList(IqiyiAccount iqiyiAccount)
{
var headers = new SortedDictionary<string, string>();
......@@ -120,13 +120,13 @@ namespace iqiyiWin.Api
{
couponTextList.Add($" {item.DisplayName}-{item.DisCountStr}-{item.AvailableTips}");
};
UILogUtils.Info($"爱奇艺商务 【获取优惠券数量】成功: {iqiyiAccount.MobileNo} [当前优惠券数量:{response.Data.Valid.Count}]\n{ string.Join("\n", couponTextList.ToArray())}");
return response.Data.Valid.Count.ToString();
// UILogUtils.Info($"爱奇艺票务 【获取优惠券数量】成功: {iqiyiAccount.MobileNo} [当前优惠券数量:{response.Data.Valid.Count}]\n{ string.Join("\n", couponTextList.ToArray())}");
return response.Data.Valid;
}
else
{
UILogUtils.Error($"爱奇艺商务 【获取优惠券数量】失败: {iqiyiAccount.MobileNo} {(response == null ? responseStr : response.Msg)}");
return "-1";
// UILogUtils.Error($"爱奇艺票务 【获取优惠券数量】失败: {iqiyiAccount.MobileNo} {(response == null ? responseStr : response.Msg)}");
return new List<Valid>();
}
}
public static Boolean UserDoSign(IqiyiAccount iqiyiAccount)
......@@ -155,13 +155,12 @@ namespace iqiyiWin.Api
if (response != null && (response.Code == "A00000" || response.Code == "A00001"))
{
UILogUtils.Info($"爱奇艺商务 【签到】成功: {iqiyiAccount.MobileNo}");
// UILogUtils.Info($"爱奇艺票务 【签到】成功: {iqiyiAccount.MobileNo}");
return true;
}
else
{
UILogUtils.Error($"爱奇艺商务 【签到】失败: {iqiyiAccount.MobileNo} {(response == null ? responseStr : response.Msg)}");
// UILogUtils.Error($"爱奇艺票务 【签到】失败: {iqiyiAccount.MobileNo} {(response == null ? responseStr : response.Msg)}");
return false;
}
}
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace iqiyiWin.Constant
{
public class DingDingConstant
{
/// <summary>
/// 钉钉异常报警机器人地址
/// </summary>
public static readonly string WEB_HOOK_URL = "https://oapi.dingtalk.com/robot/send?access_token=20b0e03e6e40a8a1366fa0e0aa60a4acd807fb735a2c25c47348c2b3cfdf89bc";
}
}
......@@ -43,10 +43,12 @@
this.查询观影豆ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.查询优惠券ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.复制账号ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.删除ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.导入账号ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.导出账号ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.清空账号ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.复制账号ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.txtLog = new System.Windows.Forms.RichTextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
......@@ -70,8 +72,9 @@
this.tssl_error_num = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabel5 = new System.Windows.Forms.ToolStripStatusLabel();
this.tssl_wait_num = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.删除ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.btn_set_interval = new System.Windows.Forms.Button();
this.tssl_timer_status = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabel7 = new System.Windows.Forms.ToolStripStatusLabel();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgv_user)).BeginInit();
......@@ -227,6 +230,26 @@
this.toolStripMenuItem2.Size = new System.Drawing.Size(186, 22);
this.toolStripMenuItem2.Text = "----------------------";
//
// 复制账号ToolStripMenuItem
//
this.复制账号ToolStripMenuItem.Name = "复制账号ToolStripMenuItem";
this.复制账号ToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.复制账号ToolStripMenuItem.Text = "复制选中账号";
this.复制账号ToolStripMenuItem.Click += new System.EventHandler(this.复制账号ToolStripMenuItem_Click);
//
// 删除ToolStripMenuItem
//
this.删除ToolStripMenuItem.Name = "删除ToolStripMenuItem";
this.删除ToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.删除ToolStripMenuItem.Text = "删除选中账号";
this.删除ToolStripMenuItem.Click += new System.EventHandler(this.删除ToolStripMenuItem_Click);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(186, 22);
this.toolStripMenuItem3.Text = "----------------------";
//
// 导入账号ToolStripMenuItem
//
this.导入账号ToolStripMenuItem.Name = "导入账号ToolStripMenuItem";
......@@ -248,13 +271,6 @@
this.清空账号ToolStripMenuItem.Text = "清空账号";
this.清空账号ToolStripMenuItem.Click += new System.EventHandler(this.清空账号ToolStripMenuItem_Click);
//
// 复制账号ToolStripMenuItem
//
this.复制账号ToolStripMenuItem.Name = "复制账号ToolStripMenuItem";
this.复制账号ToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.复制账号ToolStripMenuItem.Text = "复制选中账号";
this.复制账号ToolStripMenuItem.Click += new System.EventHandler(this.复制账号ToolStripMenuItem_Click);
//
// groupBox2
//
this.groupBox2.Controls.Add(this.txtLog);
......@@ -362,6 +378,7 @@
this.tableLayoutPanel2.Controls.Add(this.btn_start, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.button1, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.button2, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.btn_set_interval, 1, 1);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 17);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
......@@ -390,7 +407,7 @@
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(108, 34);
this.button1.TabIndex = 1;
this.button1.Text = "暂停";
this.button1.Text = "停止";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
......@@ -408,6 +425,8 @@
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tssl_timer_status,
this.toolStripStatusLabel7,
this.toolStripStatusLabel1,
this.tssl_select_num,
this.toolStripStatusLabel2,
......@@ -484,18 +503,30 @@
this.tssl_wait_num.Size = new System.Drawing.Size(15, 17);
this.tssl_wait_num.Text = "0";
//
// toolStripMenuItem3
// btn_set_interval
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(186, 22);
this.toolStripMenuItem3.Text = "----------------------";
this.btn_set_interval.Dock = System.Windows.Forms.DockStyle.Fill;
this.btn_set_interval.Location = new System.Drawing.Point(117, 43);
this.btn_set_interval.Name = "btn_set_interval";
this.btn_set_interval.Size = new System.Drawing.Size(108, 34);
this.btn_set_interval.TabIndex = 3;
this.btn_set_interval.Text = "设置定时任务";
this.btn_set_interval.UseVisualStyleBackColor = true;
this.btn_set_interval.Click += new System.EventHandler(this.Btn_set_interval_Click);
//
// 删除ToolStripMenuItem
// tssl_timer_status
//
this.删除ToolStripMenuItem.Name = "删除ToolStripMenuItem";
this.删除ToolStripMenuItem.Size = new System.Drawing.Size(186, 22);
this.删除ToolStripMenuItem.Text = "删除选中账号";
this.删除ToolStripMenuItem.Click += new System.EventHandler(this.删除ToolStripMenuItem_Click);
this.tssl_timer_status.BackColor = System.Drawing.Color.LightCoral;
this.tssl_timer_status.ForeColor = System.Drawing.Color.Black;
this.tssl_timer_status.Name = "tssl_timer_status";
this.tssl_timer_status.Size = new System.Drawing.Size(80, 17);
this.tssl_timer_status.Text = "定时任务状态";
//
// toolStripStatusLabel7
//
this.toolStripStatusLabel7.Name = "toolStripStatusLabel7";
this.toolStripStatusLabel7.Size = new System.Drawing.Size(11, 17);
this.toolStripStatusLabel7.Text = "|";
//
// Main
//
......@@ -569,6 +600,9 @@
private System.Windows.Forms.ToolStripMenuItem 复制账号ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 删除ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.Button btn_set_interval;
private System.Windows.Forms.ToolStripStatusLabel tssl_timer_status;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel7;
}
}
......@@ -15,16 +15,25 @@ using iqiyiWin.Constant;
using System.Threading;
using System.Collections;
using System.IO;
using DingDingSdk;
namespace iqiyiWin
{
public partial class Main : Form, IUILog
{
/// <summary>
/// 当前窗体
/// </summary>
public static Main _this = null;
/// <summary>
/// 是否调试
/// </summary>
public static Boolean isDebuger = false;
/// <summary>
/// 线程idset
/// </summary>
private HashSet<int> _threadIdSet = new HashSet<int>();
/// <summary>
/// 爱奇艺账号列表
/// </summary>
public List<IqiyiAccount> IqiyiAccounts = new List<IqiyiAccount>();
......@@ -64,19 +73,37 @@ namespace iqiyiWin
/// 程序执行任务的完成时间
/// </summary>
public long EndTime = 0;
/// <summary>
/// 设置准时的定时任务
/// </summary>
private System.Windows.Forms.Timer TimerSetOnTime = new System.Windows.Forms.Timer();
/// <summary>
/// 定时任务的倒计时
/// </summary>
private System.Windows.Forms.Timer TimerTiming = new System.Windows.Forms.Timer();
/// <summary>
/// 默认定时任务的时间
/// </summary>
public int IntervalTime = 12 * 60 * 60 ;
public Main()
{
InitializeComponent();
this.init();
_this = this;
}
public void init()
{
UILogUtils.Add(this);
dgv_user.AutoGenerateColumns = false;
}
private void Form1_Load(object sender, EventArgs e)
{
}
......@@ -185,9 +212,15 @@ namespace iqiyiWin
var hour = Convert.ToInt32((EndTime - StartTime) / (1000 * 60 * 60));
var mominute = Convert.ToInt32(((EndTime - StartTime) % (1000 * 60 * 60)) / (1000 * 60));
var msecond = ((EndTime - StartTime) % (1000 * 60) / 1000);
UILogUtils.Info($"本次共计执行{SelectNum}个账号,所用时长{hour}小时{mominute}分钟{msecond}秒钟");
var logText = $"本次共计执行{SelectNum}个账号,成功{SuccessNum}个账号,失败{ErrorNum}个账号,所用时长{hour}小时{mominute}分钟{msecond}秒钟。";
UILogUtils.Info(logText);
if (TimerTiming.Enabled)
{
SendDingdingMessagesAsync($"爱奇艺票务 每日任务执行完毕,{logText}", "18057708086");
}
}
}
#endregion
#region 界面日志
......@@ -298,6 +331,10 @@ namespace iqiyiWin
{
try
{
if (IsLoading)
{
return;
}
if (dgv_user.SelectedRows == null || dgv_user.SelectedRows.Count <= 0)
{
UILogUtils.Error("请选择要签到的账号。");
......@@ -312,6 +349,8 @@ namespace iqiyiWin
iqiyiAccounts.Add(iqiyiAccount);
}
IsLoading = true;
AccountSignIn(iqiyiAccounts);
}
......@@ -322,12 +361,6 @@ namespace iqiyiWin
}
public void AccountSignIn(List<IqiyiAccount> iqiyiAccounts)
{
if (IsLoading)
{
return;
}
IsLoading = true;
StartTime = DateUtils.GetTimeStampOfMilliseconds();
SelectNum = iqiyiAccounts.Count;
......@@ -349,8 +382,15 @@ namespace iqiyiWin
{
Task.Factory.StartNew(() =>
{
int threadId = Thread.CurrentThread.ManagedThreadId;
if (!_threadIdSet.Contains(threadId))
{
_threadIdSet.Add(threadId);
UILogUtils.Info($"线程[{threadId}]运行中...总线程数[{_threadIdSet.Count}]");
}
string filePath = "";
string fileText = $"{iqiyiAccount.MobileNo}----{iqiyiAccount.Password}----{iqiyiAccount.Cookie}";
string fileText = $"{iqiyiAccount.MobileNo}----{iqiyiAccount.Password}----{iqiyiAccount.Cookie}\n";
if (User.UserDoSign(iqiyiAccount))
{
iqiyiAccount.SignStatus = 1;
......@@ -385,6 +425,11 @@ namespace iqiyiWin
{
try
{
if (IsLoading)
{
return;
}
if (dgv_user.SelectedRows == null || dgv_user.SelectedRows.Count <= 0)
{
UILogUtils.Error("请选择要查询的账号。");
......@@ -398,6 +443,8 @@ namespace iqiyiWin
iqiyiAccounts.Add(iqiyiAccount);
}
IsLoading = true;
queryMovieBean(iqiyiAccounts);
}
catch (Exception ex)
......@@ -407,12 +454,6 @@ namespace iqiyiWin
}
public void queryMovieBean(List<IqiyiAccount> iqiyiAccounts)
{
if (IsLoading)
{
return;
}
IsLoading = true;
StartTime = DateUtils.GetTimeStampOfMilliseconds();
SelectNum = iqiyiAccounts.Count;
......@@ -434,10 +475,17 @@ namespace iqiyiWin
{
Task.Factory.StartNew(() =>
{
int threadId = Thread.CurrentThread.ManagedThreadId;
if (!_threadIdSet.Contains(threadId))
{
_threadIdSet.Add(threadId);
UILogUtils.Info($"线程[{threadId}]运行中...总线程数[{_threadIdSet.Count}]");
}
string filePath = "";
string fileText = $"{iqiyiAccount.MobileNo}----{iqiyiAccount.Password}----{iqiyiAccount.Cookie}";
var iqiyiAccountMovieBean = User.GetMovieBean(iqiyiAccount);
iqiyiAccount.MovieBean = Convert.ToInt32(iqiyiAccountMovieBean);
if (iqiyiAccountMovieBean == "-1")
......@@ -459,6 +507,8 @@ namespace iqiyiWin
setStatusStripNum();
string fileText = $"{iqiyiAccount.MobileNo}----{iqiyiAccount.Password}----{iqiyiAccount.Cookie}|{iqiyiAccount.MovieBean}\n";
FileUtils.AppendAllText(filePath, fileText, Encoding.UTF8);
}, cancellationToken);
......@@ -470,6 +520,10 @@ namespace iqiyiWin
{
try
{
if (IsLoading)
{
return;
}
if (dgv_user.SelectedRows == null || dgv_user.SelectedRows.Count <= 0)
{
UILogUtils.Error("请选择要查询的账号。");
......@@ -482,6 +536,9 @@ namespace iqiyiWin
IqiyiAccount iqiyiAccount = row.DataBoundItem as IqiyiAccount;
iqiyiAccounts.Add(iqiyiAccount);
}
IsLoading = true;
queryCouponNum(iqiyiAccounts);
}
catch (Exception ex)
......@@ -492,12 +549,6 @@ namespace iqiyiWin
public void queryCouponNum(List<IqiyiAccount> iqiyiAccounts)
{
if (IsLoading)
{
return;
}
IsLoading = true;
StartTime = DateUtils.GetTimeStampOfMilliseconds();
SelectNum = iqiyiAccounts.Count;
......@@ -519,13 +570,21 @@ namespace iqiyiWin
{
Task.Factory.StartNew(() =>
{
int threadId = Thread.CurrentThread.ManagedThreadId;
if (!_threadIdSet.Contains(threadId))
{
_threadIdSet.Add(threadId);
UILogUtils.Info($"线程[{threadId}]运行中...总线程数[{_threadIdSet.Count}]");
}
string filePath = "";
string fileText = $"{iqiyiAccount.MobileNo}----{iqiyiAccount.Password}----{iqiyiAccount.Cookie}";
var iqiyiAccountCouponNum = User.GetCouponList(iqiyiAccount);
iqiyiAccount.CouponNum = Convert.ToInt32(iqiyiAccountCouponNum);
var iqiyiAccountCouponList = User.GetCouponList(iqiyiAccount);
iqiyiAccount.CouponNum = Convert.ToInt32(iqiyiAccountCouponList.Count);
if (iqiyiAccountCouponNum == "-1")
string fileText = $"{iqiyiAccount.MobileNo}----{iqiyiAccount.Password}----{iqiyiAccount.Cookie}";
if (iqiyiAccountCouponList.Count == 0)
{
Interlocked.Increment(ref ErrorNum);
Interlocked.Increment(ref ImplementNum);
......@@ -539,13 +598,23 @@ namespace iqiyiWin
Interlocked.Increment(ref ImplementNum);
Interlocked.Decrement(ref WaitNum);
var couponListText = "";
foreach(var item in iqiyiAccountCouponList)
{
couponListText += $"[{item.DisplaySubType}|{item.DisplaySubName}~减{item.DisCountStr}|{item.AvailableTips}]";
}
fileText = $"{fileText}|{couponListText}\n";
filePath = Path.Combine(fileDirectory, fileNamePrefixSuccess);
}
setStatusStripNum();
FileUtils.AppendAllText(filePath, fileText, Encoding.UTF8);
});
}, cancellationToken);
}
}
......@@ -557,6 +626,13 @@ namespace iqiyiWin
return;
}
if (IsLoading)
{
return;
}
IsLoading = true;
// 执行签到
if (rb_signIn.Checked)
{
......@@ -576,6 +652,7 @@ namespace iqiyiWin
private void Button1_Click(object sender, EventArgs e)
{
IsLoading = false;
try
{
_cancellationTokenSource?.Cancel();
......@@ -584,7 +661,6 @@ namespace iqiyiWin
{
UILogUtils.Error(ex.ToString());
}
IsLoading = false;
}
private void 复制账号ToolStripMenuItem_Click(object sender, EventArgs e)
......@@ -706,5 +782,98 @@ namespace iqiyiWin
UILogUtils.Error(ex.ToString());
}
}
private void Btn_set_interval_Click(object sender, EventArgs e)
{
var setInterval = new SetInterval();
setInterval.ShowDialog(this);
}
/// <summary>
/// 设置定时任务的回调任务
/// </summary>
/// <param name="type">操作类型</param>0 -> 启动; 1 -> 关闭
/// <param name="timeNum"></param>
public void SetIntervalBack(int type ,int timeNum)
{
TimerSetOnTime.Stop();
TimerSetOnTime.Dispose();
TimerTiming.Stop();
TimerTiming.Dispose();
if (type == 0)
{
tssl_timer_status.BackColor = Color.ForestGreen;
tssl_timer_status.ForeColor = Color.White;
IntervalTime = timeNum;
setTimer();
}
else if( type == 1)
{
tssl_timer_status.BackColor = Color.LightCoral;
tssl_timer_status.ForeColor = Color.Black;
}
}
public void setTimer()
{
var intervalTime = IntervalTime;
var currentHour = DateTime.Now.Hour;
var currentMinute = DateTime.Now.Minute;
var currentSecond = DateTime.Now.Second;
var currentTime = currentHour * 60 * 60 + currentMinute * 60 + currentSecond;
if(currentTime > intervalTime)
{
intervalTime += 24 * 60 * 60 - currentTime;
}
var timeDifference = intervalTime - currentTime;
var logText = $"任务将在{Convert.ToInt32(timeDifference / (60 * 60))}小时{Convert.ToInt32((timeDifference % (60 * 60)) / 60)}分钟{timeDifference % 60}秒钟后开始执行";
UILogUtils.Info(logText);
TimerSetOnTime.Interval = 1000 * (timeDifference);
TimerSetOnTime.Tick += new EventHandler((s, e) =>
{
UILogUtils.Info("准备开始设置每天定时任务");
TimerSetOnTime.Stop();
TimerSetOnTime.Dispose();
setTiming();
});
TimerSetOnTime.Start();
}
public void setTiming()
{
SendDingdingMessagesAsync("爱奇艺票务 开始执行每日任务", "18057708086");
Btn_start_Click(new object(), new EventArgs());
TimerTiming.Interval = 1000 * 60 * 60 * 24;
TimerTiming.Tick += new EventHandler((s, e) =>
{
SendDingdingMessagesAsync("爱奇艺票务 开始执行每日任务","18057708086");
Btn_start_Click(new object(), new EventArgs());
});
TimerTiming.Start();
}
private static void SendDingdingMessagesAsync(string message, string mobile)
{
if (message != null)
{
message = "[千猪]" + message;
}
Task.Factory.StartNew(() =>
{
var atMobiles = new List<string>();
atMobiles.Add(mobile);
DingDingClient.SendMessage(DingDingConstant.WEB_HOOK_URL, message, atMobiles);
});
}
}
}
namespace iqiyiWin
{
partial class SetInterval
{
/// <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.tb_set_interval = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.label1 = new System.Windows.Forms.Label();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.btn_submit = new System.Windows.Forms.Button();
this.btn_stop = new System.Windows.Forms.Button();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// tb_set_interval
//
this.tb_set_interval.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tb_set_interval.Location = new System.Drawing.Point(123, 23);
this.tb_set_interval.MaxLength = 8;
this.tb_set_interval.Name = "tb_set_interval";
this.tb_set_interval.Size = new System.Drawing.Size(176, 21);
this.tb_set_interval.TabIndex = 1;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 5;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.tb_set_interval, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.btn_submit, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.btn_stop, 3, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(502, 70);
this.tableLayoutPanel1.TabIndex = 2;
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Location = new System.Drawing.Point(3, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(114, 26);
this.label1.TabIndex = 2;
this.label1.Text = "任务开始时间:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btn_submit
//
this.btn_submit.Dock = System.Windows.Forms.DockStyle.Fill;
this.btn_submit.Location = new System.Drawing.Point(305, 23);
this.btn_submit.Name = "btn_submit";
this.btn_submit.Size = new System.Drawing.Size(74, 20);
this.btn_submit.TabIndex = 3;
this.btn_submit.Text = "启动";
this.btn_submit.UseVisualStyleBackColor = true;
this.btn_submit.Click += new System.EventHandler(this.Button1_Click);
//
// btn_stop
//
this.btn_stop.Location = new System.Drawing.Point(385, 23);
this.btn_stop.Name = "btn_stop";
this.btn_stop.Size = new System.Drawing.Size(74, 20);
this.btn_stop.TabIndex = 4;
this.btn_stop.Text = "停止";
this.btn_stop.UseVisualStyleBackColor = true;
this.btn_stop.Click += new System.EventHandler(this.Btn_stop_Click);
//
// SetInterval
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(502, 70);
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "SetInterval";
this.Text = "SetInterval";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TextBox tb_set_interval;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btn_submit;
private System.ComponentModel.BackgroundWorker backgroundWorker1;
private System.Windows.Forms.Button btn_stop;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace iqiyiWin
{
public partial class SetInterval : Form
{
public SetInterval()
{
InitializeComponent();
init();
}
public void init()
{
var intervalTime = Main._this.IntervalTime;
var hour = Convert.ToInt32(intervalTime / (60*60));
var minute = Convert.ToInt32((intervalTime % (60 * 60))/60);
var second = Convert.ToInt32(intervalTime % 60);
tb_set_interval.Text = $"{repairZero(hour)}:{repairZero(minute)}:{repairZero(second)}";
}
public string repairZero(int num)
{
return num < 10 ? ("0" + num) : num.ToString();
}
private void Button1_Click(object sender, EventArgs e)
{
var time = tb_set_interval.Text;
var timeList = time.Split(new char[] { ':' });
if (timeList.Length != 3 || time.Length != 8)
{
MessageBox.Show($"请输入正确的时间格式");
return;
}
var hour = Convert.ToInt32(timeList[0]);
var minute = Convert.ToInt32(timeList[1]);
var second = Convert.ToInt32(timeList[2]);
var timeDifference = hour * 60 * 60 + minute * 60 + second;
Main._this.SetIntervalBack(0,timeDifference);
this.Close();
}
private void Btn_stop_Click(object sender, EventArgs e)
{
Main._this.SetIntervalBack(1,0);
this.Close();
}
}
}
<?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="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
......@@ -53,6 +53,7 @@
<Compile Include="Api\Domain.cs" />
<Compile Include="Api\User.cs" />
<Compile Include="Constant\ApiConstant.cs" />
<Compile Include="Constant\DingDingConstant.cs" />
<Compile Include="Constant\IqiyiVersion.cs" />
<Compile Include="Main.cs">
<SubType>Form</SubType>
......@@ -66,6 +67,12 @@
<Compile Include="Response\User\CouponList\CouponListResponse.cs" />
<Compile Include="Response\User\MovieBean\MovieBeanResponse.cs" />
<Compile Include="Response\User\SignIn\SignInResponse.cs" />
<Compile Include="SetInterval.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SetInterval.Designer.cs">
<DependentUpon>SetInterval.cs</DependentUpon>
</Compile>
<Compile Include="Util\DateUtils.cs" />
<Compile Include="Util\FileUtils.cs" />
<Compile Include="Util\HttpResult.cs" />
......@@ -88,6 +95,9 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<EmbeddedResource Include="SetInterval.resx">
<DependentUpon>SetInterval.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
......@@ -102,6 +112,11 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="..\DingDingSdk\DingDingSdk.csproj">
<Project>{3C638CAF-09F5-4105-88E5-5469BC5798BA}</Project>
<Name>DingDingSdk</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment