com.huiyou.Bll/MsgService.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 MsgService
{
public static void CreateMsg(int userId, int userType, string memo, bool autoPush = false)
{
CreateMsg(new Tb_Msg()
{
CreateTime = DateTime.Now,
CurStatus = 0,
Memo = memo,
MsgType = 1,
UserId = userId,
UserType = userType,
Tiped = autoPush ? 1 : 0
});
if (autoPush)
{
string jg_userid = userType + "_" + userId;
JPushHelper.User.PushToUser(memo, new string[] { jg_userid });
}
}
public static Tb_Msg GetById(int id)
{
string sql = "select * from Tb_Msg where id=" + id;
List<Tb_Msg> rst = TableFactory.GetList<Tb_Msg>(sql);
if (rst.Count == 0) return null;
return rst[0];
}
public static bool CreateMsg(Tb_Msg msg)
{
bool result = false;
try
{
TableFactory.Add<Tb_Msg>(msg);
result = true;
}
catch
{
result = false;
}
return result;
}
后面还有 29 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
