|
|
|
@ -0,0 +1,40 @@ |
|
|
|
using BWP.B3WeChat.BO; |
|
|
|
using Forks.EnterpriseServices.DomainObjects2.DQuery; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using TSingSoft.WebPluginFramework; |
|
|
|
using TSingSoft.WebPluginFramework.TimerTasks; |
|
|
|
using TSingSoft.WebPluginFramework; |
|
|
|
namespace BWP.B3WeChat.Tasks |
|
|
|
{ |
|
|
|
public class ClearExpiredApproveMessagesTask |
|
|
|
{ |
|
|
|
public static void Register() |
|
|
|
{ |
|
|
|
TimerConfig.Register("0 3 * * *", new Task1()); |
|
|
|
} |
|
|
|
|
|
|
|
#if DEBUG
|
|
|
|
public |
|
|
|
#endif
|
|
|
|
class Task1 : ITimerTask |
|
|
|
{ |
|
|
|
public void Execute() |
|
|
|
{ |
|
|
|
var del = new DQDeleteDom(typeof(ApproveMessage)); |
|
|
|
del.Where.Conditions.Add(DQCondition.LessThan("CreateTime", BLContext.Today.AddDays(-7))); |
|
|
|
del.EExecute(); |
|
|
|
} |
|
|
|
|
|
|
|
public string Name |
|
|
|
{ |
|
|
|
get { return "清理过期的审批消息(7天前)"; } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |