From 1b62e001474c3887934d514d7f32dedb55b01cf8 Mon Sep 17 00:00:00 2001
From: lingling <kety1122@163.com>
Date: 星期五, 14 三月 2025 16:13:15 +0800
Subject: [PATCH] 添加单独项目代码
---
LifePayment/LifePayment.Application.Contracts/User/IAccountService.cs | 25 ++
LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs | 27 ++
LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml | 14 +
LifePayment/LifePayment.HttpApi/LifePay/ChannelFilterAttribute.cs | 59 ++++
LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs | 283 ++++++++++++++++++++++-
LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs | 57 ++++
LifePayment/LifePayment.Application/User/AccountService.cs | 88 +++++++
LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml | 152 ++++++++++++
8 files changed, 681 insertions(+), 24 deletions(-)
diff --git a/LifePayment/LifePayment.Application.Contracts/User/IAccountService.cs b/LifePayment/LifePayment.Application.Contracts/User/IAccountService.cs
new file mode 100644
index 0000000..08a57ee
--- /dev/null
+++ b/LifePayment/LifePayment.Application.Contracts/User/IAccountService.cs
@@ -0,0 +1,25 @@
+锘縰sing System;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.Application.Services;
+
+namespace LifePayment.Application.Contracts
+{
+ public interface IAccountService : IApplicationService
+ {
+
+
+ #region life pay
+
+ /// <summary>
+ /// 鎵嬫満楠岃瘉鐮佺櫥褰�
+ /// 鐗堟湰璇存槑锛氫娇鐢ㄩ獙璇佺爜绠$悊鍘绘牎楠屽拰澶辨晥瀵瑰簲涓氬姟鐨勯獙璇佺爜
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ /// <exception cref="UserFriendlyException"></exception>
+ Task<Guid> LifePayPhoneMesssageCodeLogin(LifePayPhoneMesssageCodeLoginInput input);
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs b/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs
new file mode 100644
index 0000000..5503fe7
--- /dev/null
+++ b/LifePayment/LifePayment.Application.Contracts/User/QrCodeLogin.cs
@@ -0,0 +1,27 @@
+锘縰sing LifePayment.Domain.Shared;
+using System.ComponentModel;
+using System.ComponentModel.DataAnnotations;
+
+namespace LifePayment.Application.Contracts
+{
+
+
+ public class LifePayPhoneMesssageCodeLoginInput : ChannelsBaseInput
+ {
+ /// <summary>
+ /// 鎵嬫満鍙�
+ /// </summary>
+ [DisplayName("鎵嬫満鍙�")]
+ [Required(ErrorMessage = "{0}涓嶈兘涓虹┖")]
+ [RegularExpression(LifePaymentConstant.RegularExpression.PhoneNumberRegEx, ErrorMessage = "{0}鏍煎紡閿欒")]
+ public string PhoneNumber { get; set; }
+
+
+ /// <summary>
+ /// 楠岃瘉鐮�
+ /// </summary>
+ //[Required]
+ //public string Code { get; set; }
+ }
+
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs
new file mode 100644
index 0000000..c6c47e0
--- /dev/null
+++ b/LifePayment/LifePayment.Application/User/AccountService.cs
@@ -0,0 +1,88 @@
+锘縰sing LifePayment.Application.Contracts;
+using LifePayment.Domain.Models;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Linq;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Domain.Repositories;
+using ZeroD.Util;
+
+namespace HumanResourcesServices.Application
+{
+ public class AccountService : ApplicationService, IAccountService
+ {
+
+
+ private readonly IRepository<LifePayUser, Guid> _lifePayUserRepository;
+
+
+ public AccountService(
+
+ IRepository<LifePayUser, Guid> lifePayUserRepository
+)
+ {
+
+ _lifePayUserRepository = lifePayUserRepository;
+
+ }
+
+ #region 鏌ヨ
+
+
+
+ #endregion
+
+ #region 鎿嶄綔
+
+
+
+ #region life pay
+
+ /// <summary>
+ /// 鎵嬫満楠岃瘉鐮佺櫥褰�
+ /// 鐗堟湰璇存槑锛氫娇鐢ㄩ獙璇佺爜绠$悊鍘绘牎楠屽拰澶辨晥瀵瑰簲涓氬姟鐨勯獙璇佺爜
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ /// <exception cref="UserFriendlyException"></exception>
+ public async Task<Guid> LifePayPhoneMesssageCodeLogin(LifePayPhoneMesssageCodeLoginInput input)
+ {
+ //var vcodeType = VerificationCodeBusinessTypeEnum.LifePayPhoneMesssageCodeLogin;
+
+ //var checkResult = await _verificationCodeManager.CheckVerificationCodeByBusinessType(vcodeType,
+ // input.PhoneNumber,
+ // input.Code,
+ // true);
+ //CheckExtensions.IfTrueThrowUserFriendlyException(!checkResult,
+ // CustomeErrorMessage.SometingWrongOrSometing, "楠岃瘉鐮�", "宸插け鏁�");
+
+ var lifeUser = await _lifePayUserRepository.Where(x => x.PhoneNumber == input.PhoneNumber).FirstOrDefaultAsync();
+ if (lifeUser == null)
+ {
+ lifeUser = new LifePayUser()
+ {
+ Id = GuidGenerator.Create(),
+ PhoneNumber = input.PhoneNumber,
+ LastLoginTime = DateTime.Now
+ };
+
+ await _lifePayUserRepository.InsertAsync(lifeUser);
+ }
+ else
+ {
+ lifeUser.LastLoginTime = DateTime.Now;
+ await _lifePayUserRepository.UpdateAsync(lifeUser);
+ }
+
+ return lifeUser.Id;
+ }
+
+ #endregion
+
+ #endregion
+
+
+ }
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
index 5e3ecad..2ca2d07 100644
--- a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
+++ b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
@@ -4,21 +4,41 @@
<name>LifePayment.HttpApi</name>
</assembly>
<members>
- <member name="M:LifePayment.HttpApi.LifePayController.GetElectricParValue">
+ <member name="M:LifePayment.HttpApi.AccountController.LifePayPhoneMesssageCodeLogin(LifePayment.Application.Contracts.LifePayPhoneMesssageCodeLoginInput)">
+ <summary>
+ life pay鎵嬫満楠岃瘉鐮佺櫥褰�
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ <exception cref="T:Volo.Abp.UserFriendlyException"></exception>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetElectricParValue(LifePayment.Domain.Shared.ChannelsBaseInput)">
<summary>
鑾峰彇鐢佃垂闈㈠��
</summary>
<returns></returns>
</member>
- <member name="M:LifePayment.HttpApi.LifePayController.GetElectricSupportArea">
+ <member name="M:LifePayment.HttpApi.LifePayController.GetElectricSupportArea(LifePayment.Domain.Shared.ChannelsBaseInput)">
<summary>
鑾峰彇鐢佃垂鍏呭�煎尯鍩�
</summary>
<returns></returns>
</member>
- <member name="M:LifePayment.HttpApi.LifePayController.GetPhoneParValue">
+ <member name="M:LifePayment.HttpApi.LifePayController.GetPhoneParValue(LifePayment.Domain.Shared.ChannelsBaseInput)">
<summary>
鑾峰彇璇濊垂闈㈠��
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetGasParValue(LifePayment.Domain.Shared.ChannelsBaseInput)">
+ <summary>
+ 鑾峰彇鐕冩皵闈㈠��
+ </summary>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetGasOrgType(LifePayment.Domain.Shared.ChannelsBaseInput)">
+ <summary>
+ 鑾峰彇鐕冩皵鏀寔鍟嗘埛
</summary>
<returns></returns>
</member>
@@ -49,11 +69,75 @@
<param name="input"></param>
<returns></returns>
</member>
- <member name="M:LifePayment.HttpApi.LifePayController.GetPayStatusByOrderNo(System.String)">
+ <member name="M:LifePayment.HttpApi.LifePayController.GetUserLifePayOrderDetail(System.String)">
+ <summary>
+ 鑾峰彇鎴戠殑璁㈠崟璇︽儏
+ </summary>
+ <param name="orderNo"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetPayStatusByOrderNo(LifePayment.Application.Contracts.GetPayStatusByOrderNoInput)">
<summary>
鏍规嵁璁㈠崟鍙疯幏鍙栨敮浠樼姸鎬�
</summary>
- <param name="orderNo"></param>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetLifePayChannlesPage(ZeroD.Util.PageInput)">
+ <summary>
+ 鑾峰彇缂磋垂娓犻亾鍒楄〃
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetLifePayChannlesDto(System.Guid)">
+ <summary>
+ 鑾峰彇娓犻亾璇︽儏
+ </summary>
+ <param name="id"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetUserLifePayOrderRefund(System.Guid)">
+ <summary>
+ 鐢ㄦ埛鏌ョ湅鐢熸椿缂磋垂閫�娆惧け璐ヨ鎯�
+ </summary>
+ <param name="id"></param>
+ <returns></returns>
+ <exception cref="T:Volo.Abp.UserFriendlyException"></exception>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetAccountPage(LifePayment.Application.Contracts.QueryUserAccountListInput)">
+ <summary>
+ 鑾峰彇鐢ㄦ埛鎴峰彿鍒嗛〉鏁版嵁
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetUserAccountList(LifePayment.Application.Contracts.QueryUserAccountListInput)">
+ <summary>
+ 鑾峰彇鎴戠殑鎴峰彿鍒楄〃
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetUserAccountAllList(LifePayment.Application.Contracts.QueryUserAccountAllListInput)">
+ <summary>
+ 鑾峰彇鎴戠殑鍏ㄩ儴鎴峰彿鍒楄〃
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetUserAccountDetail(System.Guid)">
+ <summary>
+ 鑾峰彇鎴戠殑鎴峰彿璇︽儏
+ </summary>
+ <param name="id"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.GetLifePayOrderPageExport(LifePayment.Application.Contracts.QueryLifePayOrderListInput)">
+ <summary>
+ 瀵煎嚭璁㈠崟Excel
+ </summary>
+ <param name="input"></param>
<returns></returns>
</member>
<member name="M:LifePayment.HttpApi.LifePayController.CreateLifePayPhoneOrder(LifePayment.Application.Contracts.CreateLifePayOrderInput{LifePayment.Application.Contracts.LifePhoneData})">
@@ -70,6 +154,13 @@
<param name="input"></param>
<returns></returns>
</member>
+ <member name="M:LifePayment.HttpApi.LifePayController.CreateLifePayGasOrder(LifePayment.Application.Contracts.CreateLifePayOrderInput{LifePayment.Application.Contracts.LifeGasData})">
+ <summary>
+ 鍒涘缓鐢熸椿缂磋垂鐕冩皵璁㈠崟
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
<member name="M:LifePayment.HttpApi.LifePayController.RefundLifePayOrder(LifePayment.Application.Contracts.RefundLifePayOrderInput)">
<summary>
閫�娆剧敓娲荤即璐硅鍗�
@@ -78,6 +169,57 @@
<returns></returns>
<exception cref="T:Volo.Abp.UserFriendlyException"></exception>
</member>
+ <member name="M:LifePayment.HttpApi.LifePayController.RefundUserLifePayOrder(LifePayment.Application.Contracts.RefundUserLifePayOrderInput)">
+ <summary>
+ 鐢ㄦ埛鍙戣捣鐢熸椿缂磋垂閫�娆�
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ <exception cref="T:Volo.Abp.UserFriendlyException"></exception>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.AddUpdateUserAccount(LifePayment.Application.Contracts.AddUpdateUserAccountInput)">
+ <summary>
+ 娣诲姞鎴栦慨鏀规垜鐨勬埛鍙�
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.DeleteUserAccount(System.Guid)">
+ <summary>
+ 鍒犻櫎鎴戠殑鎴峰彿
+ </summary>
+ <param name="id"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.RejectRefundLifePayOrder(LifePayment.Application.Contracts.RefundLifePayOrderInput)">
+ <summary>
+ 閫�娆鹃┏鍥�
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.CreateEditPayChannels(LifePayment.Application.Contracts.CreateEditPayChannelsInput)">
+ <summary>
+ 娓犻亾绠$悊
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.SetLifePayChannelsStatus(System.Guid,LifePayment.Domain.Shared.LifePayChannelsStatsEnum)">
+ <summary>
+ 璁剧疆娓犻亾鍚敤鐘舵��
+ </summary>
+ <param name="id"></param>
+ <param name="status"></param>
+ <returns></returns>
+ </member>
+ <member name="M:LifePayment.HttpApi.LifePayController.CreateEditLifePayRate(System.Collections.Generic.List{LifePayment.Application.Contracts.LifePayRateInput})">
+ <summary>
+ 鎶樻墸閰嶇疆
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ </member>
<member name="M:LifePayment.HttpApi.LifePayController.SetLifePayOrderPayType(LifePayment.Domain.Shared.SetLifePayOrderPayTypeInput)">
<summary>
璁剧疆鐢熸椿缂磋垂鏀粯绫诲瀷
diff --git a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
index 96ce053..f5a2814 100644
--- a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
+++ b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
@@ -763,5 +763,19 @@
鐢ㄦ埛id
</summary>
</member>
+ <member name="M:LifePayment.Application.Contracts.IAccountService.LifePayPhoneMesssageCodeLogin(LifePayment.Application.Contracts.LifePayPhoneMesssageCodeLoginInput)">
+ <summary>
+ 鎵嬫満楠岃瘉鐮佺櫥褰�
+ 鐗堟湰璇存槑锛氫娇鐢ㄩ獙璇佺爜绠$悊鍘绘牎楠屽拰澶辨晥瀵瑰簲涓氬姟鐨勯獙璇佺爜
+ </summary>
+ <param name="input"></param>
+ <returns></returns>
+ <exception cref="T:Volo.Abp.UserFriendlyException"></exception>
+ </member>
+ <member name="P:LifePayment.Application.Contracts.LifePayPhoneMesssageCodeLoginInput.PhoneNumber">
+ <summary>
+ 鎵嬫満鍙�
+ </summary>
+ </member>
</members>
</doc>
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs b/LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs
new file mode 100644
index 0000000..9cce5da
--- /dev/null
+++ b/LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs
@@ -0,0 +1,57 @@
+锘縰sing LifePayment.Application.Contracts;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Options;
+using System;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.WebClientInfo;
+
+namespace LifePayment.HttpApi
+{
+ [Route("api/[controller]/[action]")]
+ [ApiController]
+ public class AccountController : AbpController
+ {
+ private readonly IAccountService _accountService;
+
+ private readonly IWebClientInfoProvider _webClientInfoProvider;
+
+
+ public AccountController(
+ IAccountService accountService,
+
+
+ IWebClientInfoProvider webClientInfoProvider
+ )
+ {
+ _accountService = accountService;
+
+ _webClientInfoProvider = webClientInfoProvider;
+
+ }
+
+
+ #region life pay
+
+ /// <summary>
+ /// life pay鎵嬫満楠岃瘉鐮佺櫥褰�
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ /// <exception cref="UserFriendlyException"></exception>
+ [HttpPost]
+ [AllowAnonymous]
+ [ChannelFilter]
+ public async Task<Guid> LifePayPhoneMesssageCodeLogin(LifePayPhoneMesssageCodeLoginInput input)
+ {
+ return await _accountService.LifePayPhoneMesssageCodeLogin(input);
+ }
+
+
+ #endregion
+
+
+ }
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/ChannelFilterAttribute.cs b/LifePayment/LifePayment.HttpApi/LifePay/ChannelFilterAttribute.cs
new file mode 100644
index 0000000..9e37374
--- /dev/null
+++ b/LifePayment/LifePayment.HttpApi/LifePay/ChannelFilterAttribute.cs
@@ -0,0 +1,59 @@
+锘縰sing LifePayment.Application.Contracts;
+using LifePayment.Domain.Shared;
+using Microsoft.AspNetCore.Mvc.Abstractions;
+using Microsoft.AspNetCore.Mvc.Filters;
+using System;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.AspNetCore.Mvc;
+
+namespace LifePayment.HttpApi
+{
+ public class ChannelFilterAttribute : Attribute, IAsyncActionFilter
+ {
+
+ public ChannelFilterAttribute()
+ {
+
+ }
+
+
+ public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
+ {
+ if (!context.ActionDescriptor.IsControllerAction())
+ {
+ await next();
+ return;
+ }
+
+ var checkerService = context.GetRequiredService<ILifePayService>();
+
+ foreach (var argument in context.ActionArguments)
+ {
+ // 妫�鏌ュ弬鏁扮被鍨嬫槸鍚︿负 ChannelsBaseInput
+ if (argument.Value is ChannelsBaseInput model)
+ {
+ // 鑾峰彇 Channel 鍙傛暟鐨勫��
+ string channelValue = model.CheckChannelId;
+ if (!string.IsNullOrEmpty(channelValue))
+ {
+ var result = await checkerService.CheckChannelsStatus(channelValue);
+ if (result)
+ {
+ await next();
+ }
+ else
+ {
+ throw new UserFriendlyException("娌℃湁瀵瑰簲鐨勬笭閬�");
+ }
+
+ }
+ }
+ }
+
+
+ }
+
+
+ }
+}
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
index 41631d2..fde6a23 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayController.cs
@@ -1,9 +1,7 @@
锘縰sing LifePayment.Application.Contracts;
-using LifePayment.Domain;
using LifePayment.Domain.Shared;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
-using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,12 +9,7 @@
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.WebClientInfo;
-using Volo.Abp.EventBus.Distributed;
-using Volo.Abp.Identity;
-using Volo.Abp.Uow;
using ZeroD.Util;
-using ZeroD.Util.Fadd;
-using LifePayment.Application.Contracts;
namespace LifePayment.HttpApi
{
@@ -42,9 +35,10 @@
/// 鑾峰彇鐢佃垂闈㈠��
/// </summary>
/// <returns></returns>
- [HttpGet]
+ [HttpPost]
[AllowAnonymous]
- public async Task<ElectricParValueResponse> GetElectricParValue()
+ [ChannelFilter]
+ public async Task<ElectricParValueResponse> GetElectricParValue(ChannelsBaseInput input)
{
return await _lifePayService.GetElectricParValue();
}
@@ -53,17 +47,18 @@
/// 鑾峰彇鐢佃垂鍏呭�煎尯鍩�
/// </summary>
/// <returns></returns>
- [HttpGet]
+ [HttpPost]
[AllowAnonymous]
- public async Task<ElectricSupportAreaResponse> GetElectricSupportArea()
+ [ChannelFilter]
+ public async Task<ElectricSupportAreaResponse> GetElectricSupportArea(ChannelsBaseInput input)
{
var aresResult = await _lifePayService.GetElectricSupportArea();
var parValues = await _lifePayService.GetElectricParValue();
- foreach(var item in aresResult.ElectricAreaList)
+ foreach (var item in aresResult.ElectricAreaList)
{
- var paritem = parValues.ElectricParValue.Where(r=>r.AreaName == item.CityName).FirstOrDefault();
- if(paritem != null)
+ var paritem = parValues.ElectricParValue.Where(r => r.AreaName == item.CityName).FirstOrDefault();
+ if (paritem != null)
{
item.ElectricType = paritem.ElectricType;
item.ParValue = paritem.ParValue;
@@ -78,11 +73,36 @@
/// 鑾峰彇璇濊垂闈㈠��
/// </summary>
/// <returns></returns>
- [HttpGet]
+ [HttpPost]
[AllowAnonymous]
- public async Task<PhoneParValueResponse> GetPhoneParValue()
+ [ChannelFilter]
+ public async Task<PhoneParValueResponse> GetPhoneParValue(ChannelsBaseInput input)
{
return await _lifePayService.GetPhoneParValue();
+ }
+
+ /// <summary>
+ /// 鑾峰彇鐕冩皵闈㈠��
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost]
+ [AllowAnonymous]
+ [ChannelFilter]
+ public async Task<GasParValueResponse> GetGasParValue(ChannelsBaseInput input)
+ {
+ return await _lifePayService.GetGasParValue();
+ }
+
+ /// <summary>
+ /// 鑾峰彇鐕冩皵鏀寔鍟嗘埛
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost]
+ [AllowAnonymous]
+ [ChannelFilter]
+ public async Task<GasOrgTypeValueResponse> GetGasOrgType(ChannelsBaseInput input)
+ {
+ return await _lifePayService.GetGasOrgType();
}
/// <summary>
@@ -125,21 +145,138 @@
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
+ [ChannelFilter]
public async Task<PageOutput<UserLifePayOrderOutput>> GetUserLifePayOrderPage(QueryLifePayOrderListInput input)
{
return await _lifePayService.GetUserLifePayOrderPage(input);
}
/// <summary>
- /// 鏍规嵁璁㈠崟鍙疯幏鍙栨敮浠樼姸鎬�
+ /// 鑾峰彇鎴戠殑璁㈠崟璇︽儏
/// </summary>
/// <param name="orderNo"></param>
/// <returns></returns>
[HttpGet]
[AllowAnonymous]
- public async Task<LifePayStatusEnum> GetPayStatusByOrderNo(string orderNo)
+ public async Task<UserLifePayOrderOutput> GetUserLifePayOrderDetail(string orderNo)
{
- return await _lifePayService.GetPayStatusByOrderNo(orderNo);
+ return await _lifePayService.GetUserLifePayOrderDetail(orderNo);
+ }
+
+
+ /// <summary>
+ /// 鏍规嵁璁㈠崟鍙疯幏鍙栨敮浠樼姸鎬�
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ [AllowAnonymous]
+ [ChannelFilter]
+ public async Task<LifePayStatusEnum> GetPayStatusByOrderNo(GetPayStatusByOrderNoInput input)
+ {
+ return await _lifePayService.GetPayStatusByOrderNo(input.OrderNo);
+ }
+
+ /// <summary>
+ /// 鑾峰彇缂磋垂娓犻亾鍒楄〃
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ public async Task<PageOutput<CreateEditPayChannelsInput>> GetLifePayChannlesPage(PageInput input)
+ {
+ return await _lifePayService.GetLifePayChannlesPage(input);
+ }
+
+ /// <summary>
+ /// 鑾峰彇娓犻亾璇︽儏
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpGet]
+ public async Task<CreateEditPayChannelsInput> GetLifePayChannlesDto(Guid id)
+ {
+ return await _lifePayService.GetLifePayChannlesDto(id);
+ }
+
+ /// <summary>
+ /// 鐢ㄦ埛鏌ョ湅鐢熸椿缂磋垂閫�娆惧け璐ヨ鎯�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ /// <exception cref="UserFriendlyException"></exception>
+ [HttpGet]
+ [AllowAnonymous]
+ public async Task<UserLifePayOrderRefundOutput> GetUserLifePayOrderRefund(Guid id)
+ {
+ return await _lifePayService.GetUserLifePayOrderRefund(id);
+ }
+
+ /// <summary>
+ /// 鑾峰彇鐢ㄦ埛鎴峰彿鍒嗛〉鏁版嵁
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ public async Task<PageOutput<UserAccountOutput>> GetAccountPage(QueryUserAccountListInput input)
+ {
+ return await _lifePayService.GetAccountPage(input);
+ }
+
+ /// <summary>
+ /// 鑾峰彇鎴戠殑鎴峰彿鍒楄〃
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ [AllowAnonymous]
+ [ChannelFilter]
+ public async Task<PageOutput<UserAccountOutput>> GetUserAccountList(QueryUserAccountListInput input)
+ {
+ return await _lifePayService.GetUserAccountList(input);
+ }
+
+ /// <summary>
+ /// 鑾峰彇鎴戠殑鍏ㄩ儴鎴峰彿鍒楄〃
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ [AllowAnonymous]
+ [ChannelFilter]
+ public async Task<List<UserAccountOutput>> GetUserAccountAllList(QueryUserAccountAllListInput input)
+ {
+ return await _lifePayService.GetUserAccountAllList(input);
+ }
+
+ /// <summary>
+ /// 鑾峰彇鎴戠殑鎴峰彿璇︽儏
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpGet]
+ [AllowAnonymous]
+ public async Task<UserAccountOutput> GetUserAccountDetail(Guid id)
+ {
+ return await _lifePayService.GetUserAccountDetail(id);
+ }
+
+ /// <summary>
+ /// 瀵煎嚭璁㈠崟Excel
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ public async Task<ActionResult> GetLifePayOrderPageExport(QueryLifePayOrderListInput input)
+ {
+ var data = await _lifePayService.GetLifePayOrderPageExport(input);
+ if (data.Any())
+ {
+ var bytes = ExcelHelper.ListToByteForExcel(data, "xlsx");
+ return File(bytes, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "璁㈠崟绠$悊" + ".xlsx");
+ }
+
+ return Json(default);
}
#endregion
@@ -153,6 +290,7 @@
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
+ [ChannelFilter]
public async Task<CreateLifePayOrderOutput> CreateLifePayPhoneOrder(CreateLifePayOrderInput<LifePhoneData> input)
{
return await _lifePayService.CreateLifePayPhoneOrder(input);
@@ -165,9 +303,23 @@
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
+ [ChannelFilter]
public async Task<CreateLifePayOrderOutput> CreateLifePayElectricOrder(CreateLifePayOrderInput<LifeElectricData> input)
{
return await _lifePayService.CreateLifePayElectricOrder(input);
+ }
+
+ /// <summary>
+ /// 鍒涘缓鐢熸椿缂磋垂鐕冩皵璁㈠崟
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ [AllowAnonymous]
+ [ChannelFilter]
+ public async Task<CreateLifePayOrderOutput> CreateLifePayGasOrder(CreateLifePayOrderInput<LifeGasData> input)
+ {
+ return await _lifePayService.CreateLifePayGasOrder(input);
}
/// <summary>
@@ -184,12 +336,104 @@
}
/// <summary>
+ /// 鐢ㄦ埛鍙戣捣鐢熸椿缂磋垂閫�娆�
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ /// <exception cref="UserFriendlyException"></exception>
+ [HttpPost]
+ [AllowAnonymous]
+ [ChannelFilter]
+ public async Task<int> RefundUserLifePayOrder(RefundUserLifePayOrderInput input)
+ {
+ await _lifePayService.RefundUserLifePayOrder(input);
+ return Constant.SUCCESS;
+ }
+
+ /// <summary>
+ /// 娣诲姞鎴栦慨鏀规垜鐨勬埛鍙�
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ [AllowAnonymous]
+ [ChannelFilter]
+ public async Task<int> AddUpdateUserAccount(AddUpdateUserAccountInput input)
+ {
+ await _lifePayService.AddUpdateUserAccount(input);
+ return Constant.SUCCESS;
+ }
+
+ /// <summary>
+ /// 鍒犻櫎鎴戠殑鎴峰彿
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpPost]
+ [AllowAnonymous]
+ public async Task<int> DeleteUserAccount(Guid id)
+ {
+ await _lifePayService.DeleteUserAccount(id);
+ return Constant.SUCCESS;
+ }
+
+ /// <summary>
+ /// 閫�娆鹃┏鍥�
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ public async Task<int> RejectRefundLifePayOrder(RefundLifePayOrderInput input)
+ {
+ await _lifePayService.RejectRefundLifePayOrder(input);
+ return Constant.SUCCESS;
+ }
+
+ /// <summary>
+ /// 娓犻亾绠$悊
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ public async Task<int> CreateEditPayChannels(CreateEditPayChannelsInput input)
+ {
+ await _lifePayService.CreateEditPayChannels(input);
+ return Constant.SUCCESS;
+ }
+
+ /// <summary>
+ /// 璁剧疆娓犻亾鍚敤鐘舵��
+ /// </summary>
+ /// <param name="id"></param>
+ /// <param name="status"></param>
+ /// <returns></returns>
+ [HttpGet]
+ public async Task<int> SetLifePayChannelsStatus(Guid id, LifePayChannelsStatsEnum status)
+ {
+ await _lifePayService.SetLifePayChannelsStatus(id, status);
+ return Constant.SUCCESS;
+ }
+
+ /// <summary>
+ /// 鎶樻墸閰嶇疆
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ [HttpPost]
+ public async Task<int> CreateEditLifePayRate(List<LifePayRateInput> input)
+ {
+ await _lifePayService.CreateEditLifePayRate(input);
+ return Constant.SUCCESS;
+ }
+
+ /// <summary>
/// 璁剧疆鐢熸椿缂磋垂鏀粯绫诲瀷
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
+ [ChannelFilter]
public async Task<string> SetLifePayOrderPayType(SetLifePayOrderPayTypeInput input)
{
@@ -203,6 +447,7 @@
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
+ [ChannelFilter]
public async Task<ModelPaymentMiniPay> GetPayOrderForJsAPI(GetPayOrderForJsAPIInput input)
{
return await _lifePayService.GetPayOrderForJsAPI(input, _webClientInfoProvider.ClientIpAddress);
--
Gitblit v1.9.1