36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
using Dapper;
|
|
using NetCore.Model.enums;
|
|
using NetCore.Model.qw;
|
|
using System.Data;
|
|
|
|
namespace NetCore.BLL.qw
|
|
{
|
|
public class bas_pushcmd_bll
|
|
{
|
|
private string comcode;
|
|
public bas_pushcmd_bll(string _comcode)
|
|
{
|
|
comcode = _comcode;
|
|
}
|
|
/// <summary>
|
|
/// 查看当天正常的执行是否执行过
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public bas_pushcmd GetConfig(string title)
|
|
{
|
|
using (IDbConnection con = ConnectionFactory.CreateConnection(ContextType.qwContext, comcode, false))
|
|
{
|
|
return con.QueryFirstOrDefault<bas_pushcmd>("select id,mevent,title,jsontext,ctime,endtime,iscomplete,type from bas_pushcmd where title=@title and type='sys' ", new { title = title });
|
|
}
|
|
}
|
|
|
|
public bool InsertPushCmd(bas_pushcmd model)
|
|
{
|
|
using (IDbConnection con = ConnectionFactory.CreateConnection(ContextType.qwContext, comcode, false))
|
|
{
|
|
return con.Execute(" insert into bas_pushcmd(mevent,title,ctime,endtime,iscomplete,type)values(@mevent,@title,@ctime,@endtime,@iscomplete,@type)", model) > 0;
|
|
}
|
|
}
|
|
}
|
|
}
|