mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-16 22:46:37 +08:00
短信发送
This commit is contained in:
@@ -7,8 +7,10 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common;
|
||||
using Yi.Framework.Common.Const;
|
||||
using Yi.Framework.Common.Helper;
|
||||
using Yi.Framework.Common.Models;
|
||||
using Yi.Framework.Common.QueueModel;
|
||||
using Yi.Framework.Core;
|
||||
using Yi.Framework.DTOModel;
|
||||
using Yi.Framework.Interface;
|
||||
@@ -25,11 +27,13 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
|
||||
private IUserService _userService;
|
||||
private IMenuService _menuService;
|
||||
public AccountController(ILogger<UserController> logger, IUserService userService, IMenuService menuService)
|
||||
private RabbitMQInvoker _rabbitMQInvoker;
|
||||
public AccountController(ILogger<UserController> logger, IUserService userService, IMenuService menuService,RabbitMQInvoker rabbitMQInvoker)
|
||||
{
|
||||
_logger = logger;
|
||||
_userService = userService;
|
||||
_menuService = menuService;
|
||||
_rabbitMQInvoker = rabbitMQInvoker;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +87,14 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
return Result.Error();
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public Result SendSMS(SMSQueueModel test)
|
||||
{
|
||||
_rabbitMQInvoker.Send(new Common.IOCOptions.RabbitMQConsumerModel() { ExchangeName=RabbitConst.SMS_Exchange,QueueName=RabbitConst.SMS_Queue_Send} );
|
||||
return Result.Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 传入邮箱,需要先到数据库判断该邮箱是否被人注册过,到userservice写mail_exist方法,还有接口别忘了。这个接口不需要洞,只需要完成userservice写mail_exist与接口即可
|
||||
/// </summary>
|
||||
|
||||
@@ -28,6 +28,10 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
_quartzInvoker = quartzInvoker;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<Result> startJob()
|
||||
{
|
||||
@@ -44,18 +48,30 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
return Result.Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<Result> getRunJobList()
|
||||
{
|
||||
return Result.Success().SetData(await _quartzInvoker.getRunJobList());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public Result getJobClass()
|
||||
{
|
||||
return Result.Success().SetData(_quartzInvoker.getJobClassList());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public async Task<Result> stopJob()
|
||||
{
|
||||
@@ -63,6 +79,10 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
return Result.Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete]
|
||||
public async Task<Result> DeleteJob()
|
||||
{
|
||||
@@ -70,6 +90,10 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
return Result.Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
public async Task<Result> ResumeJob()
|
||||
{
|
||||
|
||||
@@ -76,6 +76,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SetRoleByUser
|
||||
/// 给多个用户设置多个角色,ids有用户id与 角色列表ids,多对多,ids1用户,ids2为角色
|
||||
/// 用户设置给用户设置角色
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user