MerchantWorkBenchModuleController.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. using Attribute;
  2. using Common;
  3. using Dto;
  4. using Vo;
  5. using Enums;
  6. using Filters;
  7. using Infrastructure;
  8. using Infrastructure.Model;
  9. using Mapster;
  10. using Microsoft.AspNetCore.Mvc;
  11. using Middleware;
  12. using Model;
  13. using Services;
  14. using Model.Base;
  15. namespace Controllers
  16. {
  17. /// <summary>
  18. /// MerchantWorkBenchModule)Controller
  19. /// </summary>
  20. // [Route("MerchantWorkBenchModule")]
  21. // [ApiExplorerSettings(GroupName = "MerchantWorkBenchModule")]
  22. public class MerchantWorkBenchModuleController : BaseController
  23. {
  24. /// <summary>
  25. /// api分组接口
  26. /// </summary>
  27. private readonly IMerchantDepositOrdersService _MerchantDepositOrdersService;
  28. public MerchantWorkBenchModuleController(IMerchantDepositOrdersService MerchantDepositOrdersService)
  29. {
  30. _MerchantDepositOrdersService = MerchantDepositOrdersService;
  31. }
  32. /// <summary>
  33. /// 商户板块工作台-已激活商户活动时间
  34. /// </summary>
  35. /// <param name="parm">请求参数</param>
  36. /// <returns>商户板块工作台-已激活商户活动时间</returns>
  37. [HttpGet]
  38. [Route("/v1/lkbmall/MerchantWorkBenchModule/getActedMerchantActivityInfo")]
  39. public IActionResult GetActedMerchantActivityInfo([FromQuery] MerchantWorkBenchModuleGetActedMerchantActivityInfoDto parm)
  40. {
  41. var response = _MerchantDepositOrdersService.GetFirst(x => x.MerchantId == parm.MerchantId).Adapt<MerchantWorkBenchModuleGetActedMerchantActivityInfoVo>();
  42. return SUCCESS(response);
  43. }
  44. /// <summary>
  45. /// 商户板块工作台-已激活商户达标信息
  46. /// </summary>
  47. /// <param name="parm">请求参数</param>
  48. /// <returns>商户板块工作台-已激活商户达标信息</returns>
  49. [HttpGet]
  50. [Route("/v1/lkbmall/MerchantWorkBenchModule/getActedMerchantStandardsInfo")]
  51. public IActionResult GetActedMerchantStandardsInfo([FromQuery] MerchantWorkBenchModuleGetActedMerchantStandardsInfoDto parm)
  52. {
  53. var response = _MerchantDepositOrdersService.GetActedMerchantStandardsInfo(parm);
  54. return SUCCESS(response);
  55. }
  56. /// <summary>
  57. /// 商户板块工作台-商户激活确认订单
  58. /// </summary>
  59. /// <param name="parm">请求参数</param>
  60. /// <returns>商户板块工作台-商户激活确认订单</returns>
  61. [HttpPost]
  62. [Route("/v1/lkbmall/MerchantWorkBenchModule/actMerchantConfirmOrder")]
  63. public IActionResult ActMerchantConfirmOrder([FromBody] MerchantWorkBenchModuleActMerchantConfirmOrderDto parm)
  64. {
  65. var modal = parm.Adapt<MerchantDepositOrders>().ToCreate(HttpContext);
  66. var response = _MerchantDepositOrdersService.Add(modal);
  67. return ToResponse(response);
  68. }
  69. /// <summary>
  70. /// 商户板块工作台-商户激活订单支付
  71. /// </summary>
  72. /// <param name="parm">请求参数</param>
  73. /// <returns>商户板块工作台-商户激活订单支付</returns>
  74. [HttpPost]
  75. [Route("/v1/lkbmall/MerchantWorkBenchModule/actMerchantOrderPay")]
  76. public IActionResult ActMerchantOrderPay([FromBody] MerchantWorkBenchModuleActMerchantOrderPayDto parm)
  77. {
  78. var modal = parm.Adapt<MerchantDepositOrders>().ToCreate(HttpContext);
  79. var response = _MerchantDepositOrdersService.Add(modal);
  80. return ToResponse(response);
  81. }
  82. }
  83. }