Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
329f7235
Commit
329f7235
authored
Aug 25, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9cfaffa4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
29 deletions
+27
-29
QuarzHelper.cs
Edu.EducationCore/Helper/QuarzHelper.cs
+22
-22
QYWeChatModule.cs
Edu.Module.QYWeChat/QYWeChatModule.cs
+3
-5
RB_WeChat_MediumRepository.cs
Edu.Repository/WeChat/RB_WeChat_MediumRepository.cs
+2
-2
No files found.
Edu.EducationCore/Helper/QuarzHelper.cs
View file @
329f7235
...
...
@@ -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
.
WriteLin
e
(
"开始执行企业微信素材上传...."
);
LogHelper
.
Writ
e
(
"开始执行企业微信素材上传...."
);
QYWeChatModule
weChatModule
=
new
QYWeChatModule
();
weChatModule
.
MediumUpload
(
100000
);
Console
.
WriteLin
e
(
"素材上传结束"
);
LogHelper
.
Writ
e
(
"素材上传结束"
);
}
catch
(
Exception
ex
)
{
...
...
@@ -493,10 +493,10 @@ namespace Edu.Education.Helper
{
try
{
Console
.
WriteLin
e
(
"开始执行企业微信渠道活码...."
);
LogHelper
.
Writ
e
(
"开始执行企业微信渠道活码...."
);
QYWeChatModule
weChatModule
=
new
QYWeChatModule
();
weChatModule
.
UpdateWeChatChannelForTimer
(
100000
);
Console
.
WriteLin
e
(
"渠道活码更新结束"
);
LogHelper
.
Writ
e
(
"渠道活码更新结束"
);
}
catch
(
Exception
ex
)
{
...
...
Edu.Module.QYWeChat/QYWeChatModule.cs
View file @
329f7235
...
...
@@ -914,7 +914,7 @@ namespace Edu.Module.QYWeChat
{
if
(!
string
.
IsNullOrEmpty
(
item
.
Content
))
{
Console
.
WriteLin
e
(
"Id:"
+
item
.
Id
);
LogHelper
.
Writ
e
(
"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
.
WriteLin
e
(
"channelId:"
+
item
.
Id
);
LogHelper
.
Writ
e
(
"channelId:"
+
item
.
Id
);
var
Rmsg
=
UpdateContactWayForQYWeiXin
(
item
,
configmodel
,
true
);
if
(
Rmsg
.
errcode
!=
Senparc
.
Weixin
.
ReturnCode_Work
.
请求成功
)
{
LogHelper
.
Write
(
"("
+
item
.
Id
+
")更新渠道码失败,"
+
Rmsg
.
errmsg
);
}
Console
.
WriteLin
e
(
"channelId:"
+
item
.
Id
+
",已结束"
);
LogHelper
.
Writ
e
(
"channelId:"
+
item
.
Id
+
",已结束"
);
}
catch
(
Exception
ex
)
{
...
...
Edu.Repository/WeChat/RB_WeChat_MediumRepository.cs
View file @
329f7235
...
...
@@ -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
=
$@"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment