You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
877 B

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天前)"; }
}
}
}
}