DT_PaymentController.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using Microsoft.AspNetCore.Authorization;
  2. using Microsoft.AspNetCore.Mvc;
  3. using System.Threading.Tasks;
  4. using XYY.Common.Standard;
  5. using XYY.Core.Standard.Mvc;
  6. using XYY.Service.Standard.Finance;
  7. namespace XYY.Api.Finance.Controllers
  8. {
  9. [Route("api/[controller]/[action]")]
  10. [ApiController]
  11. public class DT_PaymentController : ApiControllerBase
  12. {
  13. private readonly IDingTalk_PaymentService _PaymentService;
  14. public DT_PaymentController(IDingTalk_PaymentService PaymentService) {
  15. _PaymentService = PaymentService;
  16. }
  17. [AllowAnonymous]
  18. [HttpGet]
  19. public async Task<IActionResult> TestCreate(string code)
  20. {
  21. await _PaymentService.DingTalkStartProcessEvent(code);
  22. return Ok();
  23. }
  24. [AllowAnonymous]
  25. [HttpPost]
  26. public async Task<IActionResult> QueryPage(QueryModel qm)
  27. {
  28. if (qm.QueryParamer == null)
  29. qm.QueryParamer = new System.Collections.Generic.List<QueryParamer>();
  30. var data = await _PaymentService.QueryPage(qm);
  31. return Ok(data);
  32. }
  33. [AllowAnonymous]
  34. [HttpGet]
  35. public async Task<IActionResult> GetPaymentCascadeChoice()
  36. {
  37. var data = await _PaymentService.GetPaymentCascadeChoice();
  38. return Ok(data);
  39. }
  40. [AllowAnonymous]
  41. [HttpGet]
  42. public async Task<IActionResult> GetPaymentDetails(int PaymentId)
  43. {
  44. var data = await _PaymentService.GetPaymentDetails(PaymentId);
  45. return Ok(data);
  46. }
  47. }
  48. }