123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using EasyNetQ;
- using Microsoft.AspNetCore.Authorization;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.Mvc.RazorPages;
- using System.Collections.Generic;
- using System.Threading.Tasks;
- using XYY.Authentication.Standard;
- using XYY.Common.Standard;
- using XYY.Core.Standard.Mvc;
- using XYY.Model.Standard.First.dto;
- using XYY.Model.Standard.First;
- using XYY.Service.Standard.First.ESB;
- namespace XYY.Api.First.Controllers
- {
- [Route("api/[controller]/[action]")]
- [ApiController]
- public class ESBController : ControllerBase
- {
- IESBService eSBSendService;
- public ESBController(IESBService eSBSendService)
- {
- this.eSBSendService = eSBSendService;
- }
- public class Req
- {
- public List<TrackingDto> dtos { get; set; }
- }
-
- [HttpPost]
- public async Task<ApiJsonModel> Update(Req req)
- {
- var u = User.GetUserContent();
- await eSBSendService.Update(req.dtos, u.CustomerId);
- return ApiJsonModel.OK();
- }
- [AllowAnonymous]
- [HttpPost]
- public async Task<ApiJsonModel<PageResult<ZZESBTrackingApiInfo>>> QueryPager(QueryModel queueMode)
- {
- var pagers = await eSBSendService.GetPageResult(queueMode);
- return ApiJsonModel<PageResult<ZZESBTrackingApiInfo>>.OK(pagers);
- }
- [AllowAnonymous]
- [HttpPost]
- public async Task<ApiJsonModel> Retry(ESBKeyList list)
- {
- await eSBSendService.Retry(list.Keys);
- return ApiJsonModel.OK();
- }
- [AllowAnonymous]
- [HttpPost]
- public async Task<IEnumerable<TrackMonitor>> GetTrackPageResult(TrackMonitorQueryParam qm)
- {
- var pagers = await eSBSendService.GetTrackPageResult(qm);
- return pagers;
- }
- /// <summary>
- /// 每天10点调用,推送esb轨迹监控文件
- /// </summary>
- /// <returns></returns>
- [AllowAnonymous]
- [HttpGet]
- public async Task ESBTrackMonitor()
- {
- await eSBSendService.PushESBTrackMonitor();
- }
- }
- }
|