Commit b40fe6cc authored by 黄奎's avatar 黄奎

新增测试消息推送

parent cde72d95
using Edu.Cache.User;
using Edu.Common;
using Edu.Common.API;
using Edu.Common.Enum.System;
using Edu.Common.Enum.User;
using Edu.Common.Plugin;
using Edu.Model.CacheModel;
......@@ -515,6 +516,7 @@ namespace Edu.WebApi.Controllers.User
};
UserReidsCache.UserInfoSet(Cache.CacheKey.User_Login_Key + model.Id, obj, Common.Config.JwtExpirTime);
return ApiResult.Success(data: obj);
}
}
......@@ -673,5 +675,32 @@ namespace Edu.WebApi.Controllers.User
{
return ApiResult.Success();
}
[HttpGet]
[HttpPost]
[AllowAnonymous]
public ApiResult TestMsg()
{
Common.Message.MessageHelper messageHelper = new Common.Message.MessageHelper();
List<Common.Message.PushMessageModel> list = new List<Common.Message.PushMessageModel>();
Common.Message.PushMessageModel model = new Common.Message.PushMessageModel()
{
CategoryId = PushMessageCategoryEnum.B2BCustomerStu,
Content = "测试",
CoverImg = "",
CreateByName = "系统",
JumpUrl = "",
WorkMsgType = "markdown",
SendTime = DateTime.Now,
SendType = 0,
Title = "HK",
Platform = 5,
ReceiveId = "HuangKui",
};
list.Add(model);
messageHelper.SendMessage(list);
return ApiResult.Success();
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment