47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using YLErp.Modules.SwapModule;
|
|
|
|
namespace YLErp.Web.Controllers
|
|
{
|
|
public class SwapEventEmailController : BaseController
|
|
{
|
|
[MyAuthorize("结算管理-资金提示邮件")]
|
|
public ActionResult Index()
|
|
{
|
|
var swapSettlementConfgValue = AppManager.GetAppConfigValue(ConsGlobal.SwapSettlementConfigGroup,ConsGlobal.SwapSettlementConfigEmail);
|
|
ViewBag.SettlementEmail = swapSettlementConfgValue;
|
|
return View();
|
|
}
|
|
/// <summary>
|
|
/// 推送列表查询json
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public JsonResult SearchList(SwapEventEmailRequest req)
|
|
{
|
|
var eventEmailService = new SwapEventEmailService(CurUser);
|
|
var sList = eventEmailService.SearchList(req);
|
|
return Json(sList);
|
|
}
|
|
/// <summary>
|
|
/// 结算岗邮件保存
|
|
/// </summary>
|
|
/// <param name="req"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public JsonResult SaveSettlementEmail(SaveSettlementEmailRequest req)
|
|
{
|
|
AppManager.SetAppConfigValue(ConsGlobal.SwapSettlementConfigGroup, ConsGlobal.SwapSettlementConfigEmail, req.Email, "资金提示结算岗邮件地址管理");
|
|
return JsonSuccess("保存成功");
|
|
}
|
|
|
|
[HttpPost]
|
|
public JsonResult SendEmail(SendSwapEventEmailRequest request)
|
|
{
|
|
new SwapEventEmailService(CurUser).SendEmail(request);
|
|
return JsonSuccess("发送邮件成功");
|
|
}
|
|
}
|
|
}
|