com.huiyou.Bll/SignRecordService.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.huiyou.Dal;
using com.huiyou.Model;
using com.huiyou.Model.Tables;
using com.huiyou.Common;
using System.Data;
namespace com.huiyou.Bll
{
public class SignRecordService
{
public static bool CheckSignRecord(string sign)
{
var recordList = GetList("SignString='" + Util.SafeSQL(sign) + "'");
if (recordList.Count > 0)
return false;
CreateSignRecord(new Tb_SignRecord()
{
CreateTime = DateTime.Now,
CurStatus = 0,
SignString = sign
});
DBHelper.Execute("delete from tb_SignRecord where CreateTime<'" + DateTime.Now.AddDays(-3).ToString("yyyy-MM-dd HH:mm:ss") + "'");
return true;
}
public static List<Tb_SignRecord> GetList(string where)
{
string sql = "select * from Tb_SignRecord where 1=1 " + Environment.NewLine;
if (!string.IsNullOrEmpty(where))
{
sql += "and " + where;
}
List<Tb_SignRecord> rst = TableFactory.GetList<Tb_SignRecord>(sql);
return rst;
}
public static Tb_SignRecord GetById(int id)
{
string sql = "select * from Tb_SignRecord where id=" + id;
List<Tb_SignRecord> rst = TableFactory.GetList<Tb_SignRecord>(sql);
if (rst.Count == 0) return null;
return rst[0];
}
public static bool CreateSignRecord(Tb_SignRecord oSignRecord)
{
bool result = false;
try
{
TableFactory.Add<Tb_SignRecord>(oSignRecord);
result = true;
}
catch
{
后面还有 21 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
