Commit 329f7235 authored by liudong1993's avatar liudong1993

1

parent 9cfaffa4
......@@ -196,17 +196,17 @@ namespace Edu.Education.Helper
IJobDetail job = JobBuilder.Create<CreateWeXinMedium>()
.WithIdentity("job6", "group6")
.Build();
ITrigger trigger = TriggerBuilder.Create()
.WithIdentity("trigger6", "group6")
.StartNow()
.WithSimpleSchedule(x => x
.WithIntervalInHours(1)
.RepeatForever())
.Build();
//ICronTrigger trigger = (ICronTrigger)TriggerBuilder.Create()
//ITrigger trigger = TriggerBuilder.Create()
// .WithIdentity("trigger6", "group6")
// .WithCronSchedule(CronExpression2)
// .StartNow()
// .WithSimpleSchedule(x => x
// .WithIntervalInHours(1)
// .RepeatForever())
// .Build();
ICronTrigger trigger = (ICronTrigger)TriggerBuilder.Create()
.WithIdentity("trigger6", "group6")
.WithCronSchedule(CronExpression2)
.Build();
await scheduler.ScheduleJob(job, trigger);
}
......@@ -229,17 +229,17 @@ namespace Edu.Education.Helper
IJobDetail job = JobBuilder.Create<CreateWeXinChannel>()
.WithIdentity("job7", "group7")
.Build();
ITrigger trigger = TriggerBuilder.Create()
.WithIdentity("trigger7", "group7")
.StartNow()
.WithSimpleSchedule(x => x
.WithIntervalInHours(1)
.RepeatForever())
.Build();
//ICronTrigger trigger = (ICronTrigger)TriggerBuilder.Create()
//ITrigger trigger = TriggerBuilder.Create()
// .WithIdentity("trigger7", "group7")
// .WithCronSchedule(CronExpression2)
// .StartNow()
// .WithSimpleSchedule(x => x
// .WithIntervalInHours(1)
// .RepeatForever())
// .Build();
ICronTrigger trigger = (ICronTrigger)TriggerBuilder.Create()
.WithIdentity("trigger7", "group7")
.WithCronSchedule(CronExpression2)
.Build();
await scheduler.ScheduleJob(job, trigger);
}
......@@ -467,10 +467,10 @@ namespace Edu.Education.Helper
{
try
{
Console.WriteLine("开始执行企业微信素材上传....");
LogHelper.Write("开始执行企业微信素材上传....");
QYWeChatModule weChatModule = new QYWeChatModule();
weChatModule.MediumUpload(100000);
Console.WriteLine("素材上传结束");
LogHelper.Write("素材上传结束");
}
catch (Exception ex)
{
......@@ -493,10 +493,10 @@ namespace Edu.Education.Helper
{
try
{
Console.WriteLine("开始执行企业微信渠道活码....");
LogHelper.Write("开始执行企业微信渠道活码....");
QYWeChatModule weChatModule = new QYWeChatModule();
weChatModule.UpdateWeChatChannelForTimer(100000);
Console.WriteLine("渠道活码更新结束");
LogHelper.Write("渠道活码更新结束");
}
catch (Exception ex)
{
......
......@@ -914,7 +914,7 @@ namespace Edu.Module.QYWeChat
{
if (!string.IsNullOrEmpty(item.Content))
{
Console.WriteLine("Id:" + item.Id);
LogHelper.Write("Id:" + item.Id);
try
{
string FileName = "", Path = "";
......@@ -967,7 +967,6 @@ namespace Edu.Module.QYWeChat
if (!string.IsNullOrEmpty(filePath))
{
string RObj = QYWeiXinHelper.UploadMultimedia(token, filePath, fileType);
Console.WriteLine("Msg:" + RObj);
JObject parms = JObject.Parse(RObj);
int errcode = parms.GetInt("errcode", -1);//获取状态码 0成功
if (errcode == 0)
......@@ -2966,7 +2965,6 @@ namespace Edu.Module.QYWeChat
}
#endregion
Console.WriteLine("开始准备渠道码");
foreach (var item in channelList) {
item.WeekList = weekList.Where(x => x.ChannelId == item.Id && x.Type == 1).ToList();
if (item.SpecialDateEnable == 1)
......@@ -2977,13 +2975,13 @@ namespace Edu.Module.QYWeChat
{
try
{
Console.WriteLine("channelId:" + item.Id);
LogHelper.Write("channelId:" + item.Id);
var Rmsg = UpdateContactWayForQYWeiXin(item, configmodel, true);
if (Rmsg.errcode != Senparc.Weixin.ReturnCode_Work.请求成功)
{
LogHelper.Write("(" + item.Id + ")更新渠道码失败," + Rmsg.errmsg);
}
Console.WriteLine("channelId:" + item.Id + ",已结束");
LogHelper.Write("channelId:" + item.Id + ",已结束");
}
catch (Exception ex)
{
......
......@@ -41,7 +41,7 @@ namespace Edu.Repository.WeChat
if (!string.IsNullOrEmpty(demodel.Content))
{
where += $@" and r.{nameof(RB_WeChat_Medium_ViewModel.Content)} like @Content";
parameters.Add("Name", "%" + demodel.Content + "%");
parameters.Add("Content", "%" + demodel.Content + "%");
}
string sql = $@"
......@@ -75,7 +75,7 @@ ORDER BY r.Id DESC ";
if (!string.IsNullOrEmpty(demodel.Content))
{
where += $@" and r.{nameof(RB_WeChat_Medium_ViewModel.Content)} like @Content";
parameters.Add("Name", "%" + demodel.Content + "%");
parameters.Add("Content", "%" + demodel.Content + "%");
}
string sql = $@"
......
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