From 484de131314a90144cceac6ea721e345ad014f08 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期四, 04 十二月 2025 09:20:56 +0800
Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/LifePaymentApi

---
 LifePayment/LifePayment.Host/appsettings.json                                                |    4 
 LifePayment/LifePayment.HttpApi/LifePay/LifePayRateController.cs                             |   95 ++++
 LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs                             |   41 +
 LifePayment/LifePayment.Application.Contracts/LifePay/LifePayAnnouncementInput.cs            |   63 +++
 LifePayment/LifePayment.Application/LifePay/LifePayRateService.cs                            |  159 +++++++
 LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml                   |  123 +++++
 LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs                           |    2 
 LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayRateService.cs                 |   52 ++
 LifePayment/LifePayment.Application/User/AccountService.cs                                   |    1 
 LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs                  |    4 
 LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs                        |    7 
 LifePayment/LifePayment.Application/LifePaymentServicesApplicationModuleAutoMapperProfile.cs |    6 
 LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs                       |    2 
 LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayRateChannel.cs                     |   64 +++
 LifePayment/LifePayment.Domain/LifePay/LifePayAnnouncement.cs                                |   37 +
 LifePayment/LifePayment.Application.Contracts/LifePay/LifePayRateInput.cs                    |   69 +++
 LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayAnnouncementService.cs         |   40 +
 LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayAnnouncement.cs                    |   44 ++
 LifePayment/LifePayment.Domain/LifePay/LifePayRateChannel.cs                                 |   48 ++
 LifePayment/LifePayment.HttpApi/LifePay/LifePayAnnouncementController.cs                     |   84 ++++
 LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml                                  |   63 +++
 LifePayment/LifePayment.Application/LifePay/LifePayAnnouncementService.cs                    |  151 +++++++
 LifePayment/LifePayment.Application/LifePay/LifePayService.cs                                |   65 ++
 23 files changed, 1,198 insertions(+), 26 deletions(-)

diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayAnnouncementService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayAnnouncementService.cs
new file mode 100644
index 0000000..a22b78a
--- /dev/null
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayAnnouncementService.cs
@@ -0,0 +1,40 @@
+锘縰sing LifePayment.Application.Contracts.LifePay;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+using ZeroD.Util;
+
+namespace LifePayment.Application.Contracts;
+
+public interface ILifePayAnnouncementService : IApplicationService
+{
+    /// <summary>
+    /// 鑾峰彇鍏憡鍒嗛〉
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    Task<PageOutput<CreateEditLifePayAnnouncementOutput>> GetLifePayAnnouncementPage(GetLifePayAnnouncementPageInput input);
+
+    /// <summary>
+    /// 鏂板缂栬緫鍏憡
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    Task<int> CreateOrEditLifePayAnnouncement(CreateEditLifePayAnnouncementInput input);
+
+    /// <summary>
+    /// 鍒犻櫎鍏憡
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    Task<int> DeleteLifePayAnnouncement(Guid id);
+
+    /// <summary>
+    /// 鑾峰彇褰撳墠灞曠ず涓殑鍏憡
+    /// </summary>
+    /// <returns></returns>
+    Task<CreateEditLifePayAnnouncementOutput> GetShowingLifePayAnnouncement(GetShowingLifePayAnnouncementInput input);
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayRateService.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayRateService.cs
new file mode 100644
index 0000000..79331fa
--- /dev/null
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/ILifePayRateService.cs
@@ -0,0 +1,52 @@
+锘縰sing Alipay.EasySDK.Payment.Common.Models;
+using LifePayment.Application.Contracts.LifePay;
+using LifePayment.Domain.Shared;
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.Application.Services;
+using ZeroD.Util;
+
+namespace LifePayment.Application.Contracts;
+
+public interface ILifePayRateService : IApplicationService
+{
+    /// <summary>
+    /// 鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒嗛〉
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    Task<PageOutput<CreateEditRateChannelOutput>> GetLifePayRateChannelPage(PageInput input);
+
+    /// <summary>
+    /// 鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒楄〃
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    Task<List<CreateEditRateChannelOutput>> GetLifePayRateChannelAllList(QueryRateChannelInput input);
+
+    /// <summary>
+    /// 鏂板缂栬緫鎶樻墸閫氶亾閰嶇疆
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    Task<int> CreateOrEditLifePayRateChannel(CreateEditRateChannelInput input);
+
+    /// <summary>
+    /// 璁剧疆鎶樻墸閫氶亾鐘舵��
+    /// </summary>
+    /// <param name="id"></param>
+    /// <param name="status"></param>
+    /// <returns></returns>
+    Task<int> SetRateChannelStatus(Guid id, LifePayRateChannelStatus status);
+
+    /// <summary>
+    /// 鍒犻櫎鎶樻墸閫氶亾
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    Task<int> DeleteRateChannel(Guid id);
+
+    Task<CreateEditRateChannelOutput> GetRateChannelByCode(string code);
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayAnnouncementInput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayAnnouncementInput.cs
new file mode 100644
index 0000000..3f33199
--- /dev/null
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayAnnouncementInput.cs
@@ -0,0 +1,63 @@
+锘縰sing LifePayment.Domain.Shared;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using ZeroD.Util;
+
+namespace LifePayment.Application.Contracts;
+
+public class CreateEditLifePayAnnouncementInput
+{
+    public Guid? Id { get; set; }
+
+    /// <summary>
+    /// 鍏憡绫诲瀷
+    /// </summary>
+    [Required(ErrorMessage = "鍏憡绫诲瀷鏄繀濉」銆�")]
+    public AnnouncementTypeEnum AnnouncementType { get; set; }
+
+    /// <summary>
+    /// 鐢熸晥鏃ユ湡
+    /// </summary>
+    [Required(ErrorMessage = "鐢熸晥鏃ユ湡鏄繀濉」銆�")]
+    public DateTime StartTime { get; set; }
+
+    /// <summary>
+    /// 鎴鏃ユ湡
+    /// </summary>
+    [Required(ErrorMessage = "鎴鏃ユ湡鏄繀濉」銆�")]
+    public DateTime EndTime { get; set; }
+
+    /// <summary>
+    /// 鍏憡鍐呭
+    /// </summary>
+    [Required(ErrorMessage = "鍏憡鍐呭鏄繀濉」銆�")]
+    public string AnnouncementContent { get; set; }
+}
+
+public class CreateEditLifePayAnnouncementOutput: CreateEditLifePayAnnouncementInput
+{
+    public DateTime CreationTime { get; set; }
+
+    public AnnouncementStatusEnum Status { get; set; }
+}
+
+public class GetLifePayAnnouncementPageInput : PageInput
+{
+    public DateTime? CreationTimeBegin { get; set; }
+    public DateTime? CreationTimeEnd { get; set; }
+
+    public DateTime? StartTime { get; set; }
+
+    public DateTime? EndTime { get; set; }
+
+    public AnnouncementStatusEnum? Status { get; set; }
+}
+
+public class GetShowingLifePayAnnouncementInput
+{
+    public AnnouncementTypeEnum? AnnouncementType { get; set; }
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs
index dcc6ce2..4672d2e 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayInput.cs
@@ -887,4 +887,11 @@
 public class QueryLifePayChannlesInput
 {
     public LifePayChannelsStatsEnum? Status { get; set; }
+}
+
+public class GetLifePayRateOutput
+{
+    public decimal SupplierRate { get; set; }
+
+    public decimal Rate { get; set; }
 }
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
index 8a1c7d7..b3400d8 100644
--- a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayOutput.cs
@@ -1429,6 +1429,8 @@
     /// </summary>
     public bool IsBackClientUser { get; set; }
 
+    public string[] Roles { get; set; }
+
     public bool IsSystem { get; set; }
 
     /// <summary>
diff --git a/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayRateInput.cs b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayRateInput.cs
new file mode 100644
index 0000000..03bcd67
--- /dev/null
+++ b/LifePayment/LifePayment.Application.Contracts/LifePay/LifePayRateInput.cs
@@ -0,0 +1,69 @@
+锘縰sing LifePayment.Domain.Shared;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+
+namespace LifePayment.Application.Contracts.LifePay;
+
+public class CreateEditRateChannelInput
+{
+    public Guid? Id { get; set; }
+
+    /// <summary>
+    /// 鍏呭�肩被鍨�
+    /// </summary>
+    [Required(ErrorMessage = "鍏呭�肩被鍨嬫槸蹇呭~椤广��")]
+    public LifePayOrderTypeEnum LifePayOrderType { get; set; }
+
+    /// <summary>
+    /// 閫氶亾
+    /// </summary>
+    [Required(ErrorMessage = "閫氶亾鏄繀濉」銆�")]
+    public string RateChannelName { get; set; }
+
+    /// <summary>
+    /// ID
+    /// </summary>
+    [Required(ErrorMessage = "ID鏄繀濉」銆�")]
+    public string Code { get; set; }
+
+    /// <summary>
+    /// 渚涘簲鍟嗘姌鎵�
+    /// </summary>
+    [Required(ErrorMessage = "渚涘簲鍟嗘姌鎵f槸蹇呭~椤广��")]
+    public decimal SupplierRate { get; set; }
+
+    /// <summary>
+    /// 骞冲彴鎶樻墸
+    /// </summary>
+    [Required(ErrorMessage = "骞冲彴鎶樻墸鏄繀濉」銆�")]
+    public decimal PlatformRate { get; set; }
+
+    /// <summary>
+    /// 閫氶亾鐘舵��
+    /// </summary>
+    [Required(ErrorMessage = "閫氶亾鐘舵�佹槸蹇呭~椤广��")]
+    public LifePayRateChannelStatus Status { get; set; }
+
+    /// <summary>
+    /// 閫氱煡鍐呭
+    /// </summary>
+    [Required(ErrorMessage = "閫氱煡鍐呭鏄繀濉」銆�")]
+    public string Remark { get; set; }
+}
+
+public class CreateEditRateChannelOutput: CreateEditRateChannelInput
+{
+    public DateTime CreationTime { get; set; }
+}
+
+public class QueryRateChannelInput
+{
+    public LifePayRateChannelStatus? Status { get; set; }
+
+    /// <summary>
+    /// 鍏呭�肩被鍨�
+    /// </summary>
+    public LifePayOrderTypeEnum? LifePayOrderType { get; set; }
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayAnnouncementService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayAnnouncementService.cs
new file mode 100644
index 0000000..968f89e
--- /dev/null
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayAnnouncementService.cs
@@ -0,0 +1,151 @@
+锘縰sing AutoMapper.QueryableExtensions;
+using LifePayment.Application.Contracts;
+using LifePayment.Application.Contracts.LifePay;
+using LifePayment.Domain;
+using LifePayment.Domain.LifePay;
+using LifePayment.Domain.Models;
+using LifePayment.Domain.Shared;
+using Microsoft.EntityFrameworkCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.ObjectMapping;
+using ZeroD.Util;
+using ZeroD.Util.Fadd;
+
+namespace LifePayment.Application.LifePay;
+
+
+public class LifePayAnnouncementService : ApplicationService, ILifePayAnnouncementService
+{
+    private readonly IRepository<LifePayAnnouncement, Guid> _lifePayAnnouncementRepository;
+
+    public LifePayAnnouncementService(IRepository<LifePayAnnouncement, Guid> lifePayAnnouncementRepository)
+    {
+        _lifePayAnnouncementRepository = lifePayAnnouncementRepository;
+    }
+
+    /// <summary>
+    /// 鑾峰彇鍏憡鍒嗛〉
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    public async Task<PageOutput<CreateEditLifePayAnnouncementOutput>> GetLifePayAnnouncementPage(GetLifePayAnnouncementPageInput input)
+    {
+        var currentTime = DateTime.Now;
+        var query = _lifePayAnnouncementRepository
+            .WhereIf(input.CreationTimeBegin.HasValue, x => x.CreationTime >= input.CreationTimeBegin)
+            .WhereIf(input.CreationTimeEnd.HasValue, x => x.CreationTime <= input.CreationTimeEnd)
+            .WhereIf(input.StartTime.HasValue, x => x.StartTime >= input.StartTime)
+            .WhereIf(input.EndTime.HasValue, x => x.EndTime <= input.EndTime)
+            .WhereIf(input.Status.HasValue, x => input.Status.Value == AnnouncementStatusEnum.Wait
+                ? currentTime < x.StartTime
+                    : input.Status.Value == AnnouncementStatusEnum.Showing
+                        ? currentTime >= x.StartTime && currentTime <= x.EndTime
+                        : input.Status.Value == AnnouncementStatusEnum.Stop
+                            ? currentTime > x.EndTime
+                            : false)
+            .Select(x =>
+                    new CreateEditLifePayAnnouncementOutput()
+                    {
+                        Id = x.Id,
+                        AnnouncementType = x.AnnouncementType,
+                        StartTime = x.StartTime,
+                        EndTime = x.EndTime,
+                        AnnouncementContent = x.AnnouncementContent,
+                        CreationTime = x.CreationTime,
+                        Status = GetLifePayAnnouncementStatus(x.StartTime, x.EndTime)
+                    });
+
+        var result = await query.GetPageResult(input.PageModel);
+
+        return result;
+    }
+
+    /// <summary>
+    /// 鏂板缂栬緫鍏憡
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    public async Task<int> CreateOrEditLifePayAnnouncement(CreateEditLifePayAnnouncementInput input)
+    {
+        CheckExtensions.IfTrueThrowUserFriendlyException(input.EndTime <= input.StartTime, "鎴鏃ユ湡涓嶈兘浣庝簬鐢熸晥鏃ユ湡");
+
+        bool isExist = await _lifePayAnnouncementRepository.AnyAsync(r => (!input.Id.HasValue||r.Id != input.Id.Value)&&input.AnnouncementType==r.AnnouncementType&&!(input.EndTime < r.StartTime || input.StartTime > r.EndTime));
+        CheckExtensions.IfTrueThrowUserFriendlyException(isExist, "鍚屼竴鏃堕棿娈靛彧鑳藉瓨鍦ㄤ竴鏉″叕鍛�");
+
+
+        if (input.Id.HasValue)
+        {
+            
+            var dto = await _lifePayAnnouncementRepository.FirstOrDefaultAsync(r => r.Id == input.Id.Value);
+            CheckExtensions.IfTrueThrowUserFriendlyException(dto == null, "鏈幏鍙栧埌鍏憡鏁版嵁");
+
+            dto.AnnouncementType = input.AnnouncementType;
+            dto.StartTime = input.StartTime;
+            dto.EndTime = input.EndTime;
+            dto.AnnouncementContent = input.AnnouncementContent;
+        }
+        else
+        {
+            input.Id = Guid.NewGuid();
+            var entity = ObjectMapper.Map<CreateEditLifePayAnnouncementInput, LifePayAnnouncement>(input);
+            await _lifePayAnnouncementRepository.InsertAsync(entity);
+        }
+
+        return Constant.SUCCESS;
+    }
+
+    /// <summary>
+    /// 鍒犻櫎鍏憡
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    public async Task<int> DeleteLifePayAnnouncement(Guid id)
+    {
+        await _lifePayAnnouncementRepository.DeleteAsync(s => s.Id == id);
+
+        return Constant.SUCCESS;
+    }
+
+    /// <summary>
+    /// 鑾峰彇褰撳墠灞曠ず涓殑鍏憡
+    /// </summary>
+    /// <returns></returns>
+    public async Task<CreateEditLifePayAnnouncementOutput> GetShowingLifePayAnnouncement(GetShowingLifePayAnnouncementInput input)
+    {
+        DateTime now = DateTime.Now;
+        var announcement = await _lifePayAnnouncementRepository
+            .WhereIf(input.AnnouncementType.HasValue,x=>x.AnnouncementType==input.AnnouncementType)
+            .Where(x => now >= x.StartTime && now <= x.EndTime).OrderBy(r => r.StartTime).FirstOrDefaultAsync();
+        if (announcement == null)
+        {
+            return null;
+        }
+
+        var model = ObjectMapper.Map<LifePayAnnouncement, CreateEditLifePayAnnouncementOutput>(announcement);
+        model.Status = GetLifePayAnnouncementStatus(announcement.StartTime, announcement.EndTime);
+        return model;
+    }
+
+    private static AnnouncementStatusEnum GetLifePayAnnouncementStatus(DateTime startTime, DateTime endTime)
+    {
+        DateTime now = DateTime.Now;
+        if (now < startTime)
+        {
+            return AnnouncementStatusEnum.Wait;
+        }
+        else if (now >= startTime && now <= endTime)
+        {
+            return AnnouncementStatusEnum.Showing;
+        }
+        else
+        {
+            return AnnouncementStatusEnum.Stop;
+        }
+    }
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
index b93f77b..d93481e 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayOrderService.cs
@@ -323,7 +323,7 @@
                             var query = await _wxPayApi.WxPayDomesticRefundsQuery(input.OutRefundNo);
                             if (query.Status == WxPayRefundStatus.閫�娆炬垚鍔�)
                             {
-                                data.OrderNo = input.OutRefundNo;
+                                data.OrderNo = input.OrderNo;
                                 data.ExtraProperties = JsonConvert.SerializeObject(query);
                                 data.FinishTime = Convert.ToDateTime(query.SuccessTime);
                                 data.Amount = Convert.ToDecimal(query.Amount.Total) / 100;
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayRateService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayRateService.cs
new file mode 100644
index 0000000..c567f61
--- /dev/null
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayRateService.cs
@@ -0,0 +1,159 @@
+锘縰sing LifePayment.Application.Contracts;
+using LifePayment.Application.Contracts.LifePay;
+using LifePayment.Domain;
+using LifePayment.Domain.LifePay;
+using LifePayment.Domain.Models;
+using LifePayment.Domain.Shared;
+using Microsoft.EntityFrameworkCore;
+using Nest;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Dynamic.Core;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.ObjectMapping;
+using Z.EntityFramework.Plus;
+using ZeroD.Util;
+using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
+
+namespace LifePayment.Application.LifePay;
+
+public class LifePayRateService : ApplicationService, ILifePayRateService
+{
+    private readonly IRepository<LifePayRateChannel, Guid> _lifePayRateChannelRepository;
+    public LifePayRateService(IRepository<LifePayRateChannel, Guid> lifePayRateChannelRepository)
+    {
+        _lifePayRateChannelRepository = lifePayRateChannelRepository;
+    }
+
+    /// <summary>
+    /// 鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒嗛〉
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    public async Task<PageOutput<CreateEditRateChannelOutput>> GetLifePayRateChannelPage(PageInput input)
+    {
+        return await GetLifePayRateChannelListFilter().GetPageResult(input.PageModel);
+    }
+
+    /// <summary>
+    /// 鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒楄〃
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    public async Task<List<CreateEditRateChannelOutput>> GetLifePayRateChannelAllList(QueryRateChannelInput input)
+    {
+        return await GetLifePayRateChannelListFilter()
+            .WhereIf(input.LifePayOrderType.HasValue, x => x.LifePayOrderType == input.LifePayOrderType)
+            .WhereIf(input.Status.HasValue, x => x.Status == input.Status)
+            .OrderBy(r => r.CreationTime).ToListAsync();
+    }
+
+    /// <summary>
+    /// 鏂板缂栬緫鎶樻墸閫氶亾閰嶇疆
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    public async Task<int> CreateOrEditLifePayRateChannel(CreateEditRateChannelInput input)
+    {
+        CheckExtensions.IfTrueThrowUserFriendlyException(input.SupplierRate < 0.01m, "渚涘簲鍟嗘姌鎵h缃敊璇�");
+        CheckExtensions.IfTrueThrowUserFriendlyException(input.PlatformRate < 0.01m, "骞冲彴鎶樻墸璁剧疆閿欒");
+        CheckExtensions.IfTrueThrowUserFriendlyException(input.PlatformRate < input.SupplierRate, "骞冲彴鎶樻墸鏃犳硶浣庝簬渚涘簲鍟嗘姌鎵�");
+        bool isExist = await _lifePayRateChannelRepository.AnyAsync(r => (!input.Id.HasValue || r.Id != input.Id.Value) && r.Code == input.Code);
+        CheckExtensions.IfTrueThrowUserFriendlyException(isExist, "ID宸插瓨鍦�");
+        if (input.Id.HasValue)
+        {
+            var dto = await _lifePayRateChannelRepository.FirstOrDefaultAsync(r => r.Id == input.Id.Value);
+            CheckExtensions.IfTrueThrowUserFriendlyException(dto == null, "鏈幏鍙栧埌鎶樻墸閫氶亾鏁版嵁");
+
+            dto.LifePayOrderType = input.LifePayOrderType;
+            dto.RateChannelName = input.RateChannelName;
+            dto.Code = input.Code;
+            dto.SupplierRate = input.SupplierRate;
+            dto.PlatformRate = input.PlatformRate;
+            dto.Status = input.Status;
+            dto.Remark = input.Remark;
+        }
+        else
+        {
+            input.Id = Guid.NewGuid();
+            var entity = ObjectMapper.Map<CreateEditRateChannelInput, LifePayRateChannel>(input);
+            await _lifePayRateChannelRepository.InsertAsync(entity);
+        }
+
+        return Constant.SUCCESS;
+    }
+
+    /// <summary>
+    /// 璁剧疆鎶樻墸閫氶亾鐘舵��
+    /// </summary>
+    /// <param name="id"></param>
+    /// <param name="status"></param>
+    /// <returns></returns>
+    public async Task<int> SetRateChannelStatus(Guid id, LifePayRateChannelStatus status)
+    {
+        await _lifePayRateChannelRepository.Where(r => r.Id == id).UpdateAsync(r => new LifePayRateChannel
+        {
+            Status = status,
+        });
+
+        return Constant.SUCCESS;
+    }
+
+    /// <summary>
+    /// 鍒犻櫎鎶樻墸閫氶亾
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    public async Task<int> DeleteRateChannel(Guid id)
+    {
+        await _lifePayRateChannelRepository.DeleteAsync(s => s.Id == id);
+
+        return Constant.SUCCESS;
+    }
+
+    public async Task<CreateEditRateChannelOutput> GetRateChannelByCode(string code)
+    {
+        var dto = await _lifePayRateChannelRepository.FirstOrDefaultAsync(x => x.Code == code);
+        if (dto == null)
+        {
+            return new CreateEditRateChannelOutput();
+        }
+        else
+        {
+            return new CreateEditRateChannelOutput
+            {
+                Id = dto.Id,
+                LifePayOrderType = dto.LifePayOrderType,
+                RateChannelName = dto.RateChannelName,
+                Code = dto.Code,
+                SupplierRate = dto.SupplierRate,
+                PlatformRate = dto.PlatformRate,
+                Status = dto.Status,
+                Remark = dto.Remark,
+                CreationTime = dto.CreationTime,
+            };
+        }
+    }
+
+    private IQueryable<CreateEditRateChannelOutput> GetLifePayRateChannelListFilter()
+    {
+        var query = from x in _lifePayRateChannelRepository
+               select new CreateEditRateChannelOutput
+               {
+                   Id = x.Id,
+                   LifePayOrderType = x.LifePayOrderType,
+                   RateChannelName = x.RateChannelName,
+                   Code = x.Code,
+                   SupplierRate = x.SupplierRate,
+                   PlatformRate = x.PlatformRate,
+                   Status = x.Status,
+                   Remark = x.Remark,
+                   CreationTime = x.CreationTime,
+               };
+        return query;
+    }
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
index dfa50f8..14da46e 100644
--- a/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
+++ b/LifePayment/LifePayment.Application/LifePay/LifePayService.cs
@@ -1,5 +1,6 @@
 锘縰sing Alipay.EasySDK.Payment.Common.Models;
 using LifePayment.Application.Contracts;
+using LifePayment.Application.LifePay;
 using LifePayment.Domain;
 using LifePayment.Domain.LifePay;
 using LifePayment.Domain.Models;
@@ -50,6 +51,7 @@
     private readonly IAliPayApi _aliPayApi;
     private readonly IAlipayInterfaceManager _alipayInterfaceManager;
     private readonly IWxPayApi _wxPayApi;
+    private readonly ILifePayRateService _lifePayRateService;
     private readonly WxPayOption _wxPayOptions;
     private readonly InitSetting _initSettingOptions;
 
@@ -77,6 +79,7 @@
                           IRepository<LifePayAccount, Guid> lifePayAccount,
                           IDataFilter dataFilter,
                           IChannelFilter channelFilter,
+                          ILifePayRateService lifePayRateService,
                           IAbpDistributedLock distributedLock)
     {
         _logger = logger;
@@ -101,6 +104,7 @@
         _channelFilter = channelFilter;
         this.distributedLock = distributedLock;
         _operateHistory = operateHistory;
+        _lifePayRateService = lifePayRateService;
     }
 
     #region 鏌ヨ
@@ -512,7 +516,7 @@
     public async Task<LifePayRefundOrderOutput> GetLifePayRefundOrderDetail(string orderNo)
     {
         var order = await _lifePayOrderRepository.Where(x => x.OrderNo == orderNo).FirstOrDefaultAsync();
-        var platformRate = await _lifePayRateRepository.FirstOrDefaultAsync(r => r.RateType == LifePayRateTypeEnum.渚涘簲鍟嗘姌鎵d环);
+        //var platformRate = await _lifePayRateRepository.FirstOrDefaultAsync(r => r.RateType == LifePayRateTypeEnum.渚涘簲鍟嗘姌鎵d环);
         var channle = await _lifePayChannlesRep.FirstOrDefaultAsync(r => r.ChannlesNum == order.ChannelId);
         var premium = await _lifePayPremiumRepository.Where(x => x.PremiumType == order.LifePayType).FirstOrDefaultAsync();
         CheckExtensions.IfTrueThrowUserFriendlyException(order == null, "璁㈠崟涓嶅瓨鍦�");
@@ -1086,11 +1090,14 @@
         && x.OrderParamDetailJsonStr.Contains(input.ProductData.Phone)).AnyAsync();
         CheckExtensions.IfTrueThrowUserFriendlyException(repeatOrder, "鎮ㄦ湁鍚屾埛鍙疯鍗曟鍦ㄥ厖鍊间腑锛岃鍕块噸澶嶅厖鍊�");
 
-        var rate = await GetLifePayRate(channle, LifePayRateTypeEnum.榛樿璇濊垂鎶樻墸);
+        var rateChannel = await GetLifePayRate(channle,input.ProductData.IspCode);
+        //骞冲彴鎶樻墸
+        var rate = rateChannel.Rate;
 
         var amount = CalculateAmount(input.ProductData.ParValue, rate);
 
-        var platformRate = await _lifePayRateRepository.FirstOrDefaultAsync(r => r.RateType == LifePayRateTypeEnum.渚涘簲鍟嗘姌鎵d环);
+        //渚涘簲鍟嗘姌鎵d环
+        var platformRate = rateChannel.SupplierRate;
 
         var orderInput = new CreateLifePayOrderInput
         {
@@ -1106,8 +1113,8 @@
             DiscountAmount = amount.DiscountAmount,
             RechargeAmount = amount.RechargeAmount,
             ChannelId = channle.ChannlesNum,
-            PlatformRate = platformRate.Rate,
-            PlatformDeductionAmount = amount.RechargeAmount * platformRate.Rate / 100,
+            PlatformRate = platformRate,
+            PlatformDeductionAmount = amount.RechargeAmount * platformRate / 100,
             ChannleRate = rate,
             ChannlesRakeRate = channle.ChannlesRakeRate,
         };
@@ -1140,10 +1147,13 @@
          && x.OrderParamDetailJsonStr.Contains(input.ProductData.ElectricAccount)).AnyAsync();
         CheckExtensions.IfTrueThrowUserFriendlyException(repeatOrder, "鎮ㄦ湁鍚屾埛鍙疯鍗曟鍦ㄥ厖鍊间腑锛岃鍕块噸澶嶅厖鍊�");
 
+        var rateChannel = await GetLifePayRate(channle, input.ProductData.ElectricType);
+        //骞冲彴鎶樻墸
+        var rate = rateChannel.Rate;
 
-        var rate = await GetLifePayRate(channle, LifePayRateTypeEnum.榛樿鐢佃垂鎶樻墸);
         var amount = CalculateAmount(input.ProductData.ParValue, rate);
-        var platformRate = await _lifePayRateRepository.FirstOrDefaultAsync(r => r.RateType == LifePayRateTypeEnum.渚涘簲鍟嗘姌鎵d环);
+        //渚涘簲鍟嗘姌鎵d环
+        var platformRate = rateChannel.SupplierRate;
 
         var orderInput = new CreateLifePayOrderInput
         {
@@ -1158,8 +1168,8 @@
             DiscountAmount = amount.DiscountAmount,
             RechargeAmount = amount.RechargeAmount,
             ChannelId = channle.ChannlesNum,
-            PlatformRate = platformRate.Rate,
-            PlatformDeductionAmount = amount.RechargeAmount * platformRate.Rate / 100,
+            PlatformRate = platformRate,
+            PlatformDeductionAmount = amount.RechargeAmount * platformRate / 100,
             ChannleRate = rate,
             ChannlesRakeRate = channle.ChannlesRakeRate,
         };
@@ -1192,12 +1202,14 @@
         && x.OrderParamDetailJsonStr.Contains(input.ProductData.GasAccount)).AnyAsync();
         CheckExtensions.IfTrueThrowUserFriendlyException(repeatOrder, "鎮ㄦ湁鍚屾埛鍙疯鍗曟鍦ㄥ厖鍊间腑锛岃鍕块噸澶嶅厖鍊�");
 
-
-        var rate = await GetLifePayRate(channle, LifePayRateTypeEnum.榛樿鐕冩皵鎶樻墸);
+        var rateChannel = await GetLifePayRate(channle, input.ProductData.GasOrgType);
+        //骞冲彴鎶樻墸
+        var rate = rateChannel.Rate;
 
         var amount = CalculateAmount(input.ProductData.ParValue, rate);
 
-        var platformRate = await _lifePayRateRepository.FirstOrDefaultAsync(r => r.RateType == LifePayRateTypeEnum.渚涘簲鍟嗘姌鎵d环);
+        //渚涘簲鍟嗘姌鎵d环
+        var platformRate = rateChannel.SupplierRate;
 
         var orderInput = new CreateLifePayOrderInput
         {
@@ -1213,8 +1225,8 @@
             DiscountAmount = amount.DiscountAmount,
             RechargeAmount = amount.RechargeAmount,
             ChannelId = channle.ChannlesNum,
-            PlatformRate = platformRate.Rate,
-            PlatformDeductionAmount = amount.RechargeAmount * platformRate.Rate / 100,
+            PlatformRate = platformRate,
+            PlatformDeductionAmount = amount.RechargeAmount * platformRate / 100,
             ChannleRate = rate,
             ChannlesRakeRate = channle.ChannlesRakeRate,
         };
@@ -1548,6 +1560,12 @@
             if (order.LifePayOrderStatus == status && order.ACOOLYStatus == acoolyStatus)
             {
                 _logger.LogInformation($"璁㈠崟锛坽orderNo}锛夊凡澶勭悊璇ョ姸鎬�");
+                return;
+            }
+
+            if (order.LifePayOrderStatus == LifePayOrderStatusEnum.宸查��娆�)
+            {
+                _logger.LogInformation($"璁㈠崟宸查��娆�,涓嶅湪澶勭悊");
                 return;
             }
 
@@ -1917,6 +1935,7 @@
                 dto.PromoterId = promoter.Id;
             }
 
+            //TODO 鍚庣画闇�瑕佷慨鏀� 鐜板湪鐨勪緵搴斿晢鎶樻墸浠锋牴鎹繍钀ュ晢涓嶅悓 閰嶇疆涓嶅悓 涓嶆槸缁熶竴閰嶇疆浜�
             var rate = await _lifePayRateRepository.FirstOrDefaultAsync(it => it.RateType == LifePayRateTypeEnum.渚涘簲鍟嗘姌鎵d环);
             CheckExtensions.IfTrueThrowUserFriendlyException(rate != null && input.ChannlesRate < rate.Rate, "娓犻亾鎶樻墸鏃犳硶浣庝簬渚涘簲鍟嗘姌鎵�");
 
@@ -2449,18 +2468,24 @@
         };
     }
 
-    public async Task<decimal> GetLifePayRate(CreateEditPayChannelsInput channel, LifePayRateTypeEnum lifePayRateType)
+    public async Task<GetLifePayRateOutput> GetLifePayRate(CreateEditPayChannelsInput channel, string code)
     {
+        var rateChannel = await _lifePayRateService.GetRateChannelByCode(code);
+            CheckExtensions.IfTrueThrowUserFriendlyException(rateChannel.Id.IsEmpty(), "鏈厤缃姌鎵�");
         if (channel == null)
         {
-            var rate = await GetRate();
-            CheckExtensions.IfTrueThrowUserFriendlyException(rate.IsNullOrEmpty(), "鏈厤缃姌鎵�");
-            var result = rate.FirstOrDefault(x => x.RateType == lifePayRateType).Rate;
-            return result;
+            return new GetLifePayRateOutput
+            {
+                Rate = rateChannel.PlatformRate,
+                SupplierRate = rateChannel.SupplierRate
+            };
         }
         else
         {
-            return channel.ChannlesRate;
+            return new GetLifePayRateOutput {
+                Rate= channel.ChannlesRate,
+                SupplierRate = rateChannel.SupplierRate
+            };
         }
     }
 
diff --git a/LifePayment/LifePayment.Application/LifePaymentServicesApplicationModuleAutoMapperProfile.cs b/LifePayment/LifePayment.Application/LifePaymentServicesApplicationModuleAutoMapperProfile.cs
index 12a9b84..5054020 100644
--- a/LifePayment/LifePayment.Application/LifePaymentServicesApplicationModuleAutoMapperProfile.cs
+++ b/LifePayment/LifePayment.Application/LifePaymentServicesApplicationModuleAutoMapperProfile.cs
@@ -1,5 +1,6 @@
 using AutoMapper;
 using LifePayment.Application.Contracts;
+using LifePayment.Application.Contracts.LifePay;
 using LifePayment.Application.Contracts.Sync;
 using LifePayment.Domain;
 using LifePayment.Domain.LifePay;
@@ -40,6 +41,11 @@
             CreateMap<CreateChannelConsultationFollowupInput, LifePayChannelConsultationFollowup>(MemberList.None);
 
             CreateMap<LogFrontInput, LogFrontRecord>(MemberList.None);
+
+            CreateMap<CreateEditRateChannelInput, LifePayRateChannel>(MemberList.None);
+
+            CreateMap<CreateEditLifePayAnnouncementInput, LifePayAnnouncement>(MemberList.None);
+            CreateMap<LifePayAnnouncement, CreateEditLifePayAnnouncementOutput>(MemberList.None);
         }
     }
 }
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs
index 740211b..4faeebd 100644
--- a/LifePayment/LifePayment.Application/User/AccountService.cs
+++ b/LifePayment/LifePayment.Application/User/AccountService.cs
@@ -114,6 +114,7 @@
             {
                 IsBackClientUser = CurrentUser.ClientId == Constant.ClientType.Back,
                 IsSystem = CurrentUser.IsSystem,
+                Roles = CurrentUser.Roles,
                 ChannleList = channleList
             };
             return result;
diff --git a/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayAnnouncement.cs b/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayAnnouncement.cs
new file mode 100644
index 0000000..7284281
--- /dev/null
+++ b/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayAnnouncement.cs
@@ -0,0 +1,44 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LifePayment.Domain.Shared;
+
+public enum AnnouncementTypeEnum
+{
+    /// <summary>
+    /// 鏅�氬叕鍛�
+    /// </summary>
+    [Description("鏅�氬叕鍛�")]
+    Normal = 10,
+
+    /// <summary>
+    /// 寮圭獥鍏憡
+    /// </summary>
+    [Description("寮圭獥鍏憡")]
+    Dialog = 20,
+}
+
+public enum AnnouncementStatusEnum
+{
+    /// <summary>
+    /// 灞曠ず涓�
+    /// </summary>
+    [Description("灞曠ず涓�")]
+    Showing = 10,
+
+    /// <summary>
+    /// 寰呭睍绀�
+    /// </summary>
+    [Description("寰呭睍绀�")]
+    Wait = 20,
+
+    /// <summary>
+    /// 宸插仠姝�
+    /// </summary>
+    [Description("宸插仠姝�")]
+    Stop = 30,
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayRateChannel.cs b/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayRateChannel.cs
new file mode 100644
index 0000000..9d7b27d
--- /dev/null
+++ b/LifePayment/LifePayment.Domain.Shared/Enum/LifePay/LifePayRateChannel.cs
@@ -0,0 +1,64 @@
+锘縰sing System.ComponentModel;
+
+namespace LifePayment.Domain.Shared;
+
+public enum LifePayRateChannelStatus
+{
+    /// <summary>
+    /// 鍚敤
+    /// </summary>
+    [Description("鍚敤")]
+    Disabled = -10,
+
+    /// <summary>
+    /// 绂佺敤
+    /// </summary>
+    [Description("绂佺敤")]
+    Enabled = 10,
+
+}
+
+//public enum LifePayRateChannelCodeEnum 
+//{
+//    /// <summary>
+//    /// 涓浗绉诲姩
+//    /// </summary>
+//    [Description("liantong")]
+//    涓浗绉诲姩 = 10,
+
+//    /// <summary>
+//    /// 涓浗鑱旈��
+//    /// </summary>
+//    [Description("涓浗鑱旈��")]
+//    涓浗鑱旈�� = 20,
+
+//    /// <summary>
+//    /// 涓浗鐢典俊
+//    /// </summary>
+//    [Description("涓浗鐢典俊")]
+//    涓浗鐢典俊 = 30,
+
+//    /// <summary>
+//    /// 鍥藉鐢电綉
+//    /// </summary>
+//    [Description("鍥藉鐢电綉")]
+//    鍥藉鐢电綉 = 40,
+
+//    /// <summary>
+//    /// 鍗楁柟鐢电綉
+//    /// </summary>
+//    [Description("鍗楁柟鐢电綉")]
+//    鍗楁柟鐢电綉 = 50,
+//}
+
+public static class LifePayRateChannelCode
+{
+    public const string 涓浗绉诲姩 = "yidong"; 
+    public const string 涓浗鑱旈�� = "liantong"; 
+    public const string 涓浗鐢典俊 = "dianxin"; 
+    public const string 鍥藉鐢电綉 = "guowang"; 
+    public const string 鍗楁柟鐢电綉 = "nanwang"; 
+    public const string 涓噧鐕冩皵 = "zhong_ran"; 
+    public const string 鏂板ゥ鐕冩皵 = "xin_ao"; 
+    public const string 鍖椾含鐕冩皵 = "bei_jing"; 
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayAnnouncement.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayAnnouncement.cs
new file mode 100644
index 0000000..92b4d80
--- /dev/null
+++ b/LifePayment/LifePayment.Domain/LifePay/LifePayAnnouncement.cs
@@ -0,0 +1,37 @@
+锘縰sing LifePayment.Domain.Shared;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace LifePayment.Domain.LifePay;
+
+public partial class LifePayAnnouncement : FullAuditedEntity<Guid>, IDataUserFilter
+{
+    public LifePayAnnouncement()
+    {
+    }
+
+    /// <summary>
+    /// 鍏憡绫诲瀷
+    /// </summary>
+    public AnnouncementTypeEnum AnnouncementType { get; set; }
+
+    /// <summary>
+    /// 鐢熸晥鏃ユ湡
+    /// </summary>
+    public DateTime StartTime { get; set; }
+
+    /// <summary>
+    /// 鎴鏃ユ湡
+    /// </summary>
+    public DateTime EndTime { get; set; }
+
+    /// <summary>
+    /// 鍏憡鍐呭
+    /// </summary>
+    public string AnnouncementContent { get; set; }
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.Domain/LifePay/LifePayRateChannel.cs b/LifePayment/LifePayment.Domain/LifePay/LifePayRateChannel.cs
new file mode 100644
index 0000000..9dc2f27
--- /dev/null
+++ b/LifePayment/LifePayment.Domain/LifePay/LifePayRateChannel.cs
@@ -0,0 +1,48 @@
+锘縰sing LifePayment.Domain.Shared;
+using System;
+using Volo.Abp;
+using Volo.Abp.Domain.Entities.Auditing;
+
+namespace LifePayment.Domain;
+
+public partial class LifePayRateChannel : FullAuditedEntity<Guid>, IDataUserFilter
+{
+    public LifePayRateChannel()
+    {
+    }
+
+    /// <summary>
+    /// 鍏呭�肩被鍨�
+    /// </summary>
+    public LifePayOrderTypeEnum LifePayOrderType { get; set; }
+
+    /// <summary>
+    /// 閫氶亾
+    /// </summary>
+    public string RateChannelName { get; set; }
+
+    /// <summary>
+    /// ID
+    /// </summary>
+    public string Code { get; set; }
+
+    /// <summary>
+    /// 渚涘簲鍟嗘姌鎵�
+    /// </summary>
+    public decimal SupplierRate { get; set; }
+
+    /// <summary>
+    /// 骞冲彴鎶樻墸
+    /// </summary>
+    public decimal PlatformRate { get; set; }
+
+    /// <summary>
+    /// 閫氶亾鐘舵��
+    /// </summary>
+    public LifePayRateChannelStatus Status { get; set; }
+
+    /// <summary>
+    /// 閫氱煡鍐呭
+    /// </summary>
+    public string Remark { get; set; }
+}
\ No newline at end of file
diff --git a/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs b/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs
index b8a7052..895d6dd 100644
--- a/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs
+++ b/LifePayment/LifePayment.EntityFrameworkCore/LifePaymentServicesDbContext.cs
@@ -63,6 +63,10 @@
 
         public virtual DbSet<DallyStatistics> DallyStatistics { get; set; }
 
+        public virtual DbSet<LifePayRateChannel> LifePayRateChannel { get; set; }
+
+        public virtual DbSet<LifePayAnnouncement> LifePayAnnouncement { get; set; }
+
         [UnitOfWork]
         protected override void OnModelCreating(ModelBuilder builder)
         {
diff --git a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
index 59af98a..f22aa14 100644
--- a/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
+++ b/LifePayment/LifePayment.Host/LifePaymentService.HttpApi.xml
@@ -63,6 +63,33 @@
             </summary>
             <returns></returns>
         </member>
+        <member name="M:LifePayment.HttpApi.LifePayAnnouncementController.GetLifePayAnnouncementPage(LifePayment.Application.Contracts.GetLifePayAnnouncementPageInput)">
+            <summary>
+            鑾峰彇鍏憡鍒嗛〉
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.HttpApi.LifePayAnnouncementController.CreateOrEditLifePayAnnouncement(LifePayment.Application.Contracts.CreateEditLifePayAnnouncementInput)">
+            <summary>
+            鏂板缂栬緫鍏憡
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.HttpApi.LifePayAnnouncementController.DeleteLifePayAnnouncement(System.Guid)">
+            <summary>
+            鍒犻櫎鍏憡
+            </summary>
+            <param name="id"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.HttpApi.LifePayAnnouncementController.GetShowingLifePayAnnouncement(LifePayment.Application.Contracts.GetShowingLifePayAnnouncementInput)">
+            <summary>
+            鑾峰彇褰撳墠灞曠ず涓殑鍏憡
+            </summary>
+            <returns></returns>
+        </member>
         <member name="M:LifePayment.HttpApi.LifePayController.GetTopStatistics(LifePayment.Application.Contracts.TopStatisticsInput)">
             <summary>
             鑾峰彇椤堕儴缁熻鏁版嵁
@@ -513,6 +540,42 @@
             <param name="input"></param>
             <returns></returns>
         </member>
+        <member name="M:LifePayment.HttpApi.LifePayRateController.GetLifePayRateChannelPage(ZeroD.Util.PageInput)">
+            <summary>
+            鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒嗛〉
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.HttpApi.LifePayRateController.GetLifePayRateChannelAllList(LifePayment.Application.Contracts.LifePay.QueryRateChannelInput)">
+            <summary>
+            鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒楄〃
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.HttpApi.LifePayRateController.CreateOrEditLifePayRateChannel(LifePayment.Application.Contracts.LifePay.CreateEditRateChannelInput)">
+            <summary>
+            鏂板缂栬緫鎶樻墸閫氶亾閰嶇疆
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.HttpApi.LifePayRateController.SetRateChannelStatus(System.Guid,LifePayment.Domain.Shared.LifePayRateChannelStatus)">
+            <summary>
+            璁剧疆鎶樻墸閫氶亾鐘舵��
+            </summary>
+            <param name="id"></param>
+            <param name="status"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.HttpApi.LifePayRateController.DeleteRateChannel(System.Guid)">
+            <summary>
+            鍒犻櫎鎶樻墸閫氶亾
+            </summary>
+            <param name="id"></param>
+            <returns></returns>
+        </member>
         <member name="M:LifePayment.HttpApi.LogController.LogFront(LifePayment.Domain.Shared.LogFrontInput)">
             <summary>
             璁板綍鍓嶇鏃ュ織
diff --git a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
index ae83b50..5c5cfe1 100644
--- a/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
+++ b/LifePayment/LifePayment.Host/LifePaymentServices.Application.Contracts.xml
@@ -4,6 +4,69 @@
         <name>LifePayment.Application.Contracts</name>
     </assembly>
     <members>
+        <member name="M:LifePayment.Application.Contracts.ILifePayAnnouncementService.GetLifePayAnnouncementPage(LifePayment.Application.Contracts.GetLifePayAnnouncementPageInput)">
+            <summary>
+            鑾峰彇鍏憡鍒嗛〉
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.Application.Contracts.ILifePayAnnouncementService.CreateOrEditLifePayAnnouncement(LifePayment.Application.Contracts.CreateEditLifePayAnnouncementInput)">
+            <summary>
+            鏂板缂栬緫鍏憡
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.Application.Contracts.ILifePayAnnouncementService.DeleteLifePayAnnouncement(System.Guid)">
+            <summary>
+            鍒犻櫎鍏憡
+            </summary>
+            <param name="id"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.Application.Contracts.ILifePayAnnouncementService.GetShowingLifePayAnnouncement(LifePayment.Application.Contracts.GetShowingLifePayAnnouncementInput)">
+            <summary>
+            鑾峰彇褰撳墠灞曠ず涓殑鍏憡
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.Application.Contracts.ILifePayRateService.GetLifePayRateChannelPage(ZeroD.Util.PageInput)">
+            <summary>
+            鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒嗛〉
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.Application.Contracts.ILifePayRateService.GetLifePayRateChannelAllList(LifePayment.Application.Contracts.LifePay.QueryRateChannelInput)">
+            <summary>
+            鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒楄〃
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.Application.Contracts.ILifePayRateService.CreateOrEditLifePayRateChannel(LifePayment.Application.Contracts.LifePay.CreateEditRateChannelInput)">
+            <summary>
+            鏂板缂栬緫鎶樻墸閫氶亾閰嶇疆
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.Application.Contracts.ILifePayRateService.SetRateChannelStatus(System.Guid,LifePayment.Domain.Shared.LifePayRateChannelStatus)">
+            <summary>
+            璁剧疆鎶樻墸閫氶亾鐘舵��
+            </summary>
+            <param name="id"></param>
+            <param name="status"></param>
+            <returns></returns>
+        </member>
+        <member name="M:LifePayment.Application.Contracts.ILifePayRateService.DeleteRateChannel(System.Guid)">
+            <summary>
+            鍒犻櫎鎶樻墸閫氶亾
+            </summary>
+            <param name="id"></param>
+            <returns></returns>
+        </member>
         <member name="M:LifePayment.Application.Contracts.ILifePayService.GetElectricParValue">
             <summary>
             鑾峰彇鐢佃垂闈㈠��
@@ -303,6 +366,26 @@
             <param name="amount"></param>
             <returns></returns>
             <exception cref="T:Volo.Abp.UserFriendlyException"></exception>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.CreateEditLifePayAnnouncementInput.AnnouncementType">
+            <summary>
+            鍏憡绫诲瀷
+            </summary>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.CreateEditLifePayAnnouncementInput.StartTime">
+            <summary>
+            鐢熸晥鏃ユ湡
+            </summary>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.CreateEditLifePayAnnouncementInput.EndTime">
+            <summary>
+            鎴鏃ユ湡
+            </summary>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.CreateEditLifePayAnnouncementInput.AnnouncementContent">
+            <summary>
+            鍏憡鍐呭
+            </summary>
         </member>
         <member name="P:LifePayment.Application.Contracts.CreateLifePayOrderInput`1.ChannelId">
             <summary>
@@ -2239,6 +2322,46 @@
             缁撶畻鏃堕棿
             </summary>
         </member>
+        <member name="P:LifePayment.Application.Contracts.LifePay.CreateEditRateChannelInput.LifePayOrderType">
+            <summary>
+            鍏呭�肩被鍨�
+            </summary>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.LifePay.CreateEditRateChannelInput.RateChannelName">
+            <summary>
+            閫氶亾
+            </summary>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.LifePay.CreateEditRateChannelInput.Code">
+            <summary>
+            ID
+            </summary>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.LifePay.CreateEditRateChannelInput.SupplierRate">
+            <summary>
+            渚涘簲鍟嗘姌鎵�
+            </summary>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.LifePay.CreateEditRateChannelInput.PlatformRate">
+            <summary>
+            骞冲彴鎶樻墸
+            </summary>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.LifePay.CreateEditRateChannelInput.Status">
+            <summary>
+            閫氶亾鐘舵��
+            </summary>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.LifePay.CreateEditRateChannelInput.Remark">
+            <summary>
+            閫氱煡鍐呭
+            </summary>
+        </member>
+        <member name="P:LifePayment.Application.Contracts.LifePay.QueryRateChannelInput.LifePayOrderType">
+            <summary>
+            鍏呭�肩被鍨�
+            </summary>
+        </member>
         <member name="M:LifePayment.Application.Contracts.ILogService.LogFront(LifePayment.Domain.Shared.LogFrontInput)">
             <summary>
             璁板綍鍓嶇鏃ュ織
diff --git a/LifePayment/LifePayment.Host/appsettings.json b/LifePayment/LifePayment.Host/appsettings.json
index bcbf82b..4bd99ba 100644
--- a/LifePayment/LifePayment.Host/appsettings.json
+++ b/LifePayment/LifePayment.Host/appsettings.json
@@ -21,8 +21,8 @@
   "ConnectionStrings": {
     "AbpIdentity": "Server=120.26.58.240; Database=Dev_LifePaymentIdentity; User=bole;Password=Bole1472589",
     "LifePaymentServices": "Server=120.26.58.240; Database=Dev_LifePayment; User=bole;Password=Bole1472589",
-    //"LifePaymentServices": "Server=rm-bp1mt744021h1s6dg4o.sqlserver.rds.aliyuncs.com,2333;Database=Dev_LifePayment;Uid=bole;Pwd=Blcs20@%27;",
-    //"AbpIdentity": "Server=rm-bp1mt744021h1s6dg4o.sqlserver.rds.aliyuncs.com,2333;Database=Dev_LifePaymentIdentity;Uid=bole;Pwd=Blcs20@%27;",
+    //"LifePaymentServices": "Server=rm-bp1mt744021h1s6dg4o.sqlserver.rds.aliyuncs.com,2333;Database=Pro_LifePayment;Uid=bole;Pwd=Blcs20@%27;",
+    //"AbpIdentity": "Server=rm-bp1mt744021h1s6dg4o.sqlserver.rds.aliyuncs.com,2333;Database=Pro_LifePaymentIdentity;Uid=bole;Pwd=Blcs20@%27;",
 
     "SyncAbpIdentity": "Server=120.26.58.240; Database=Dev_LifePaymentIdentity; User=bole;Password=Bole1472589",
     "SyncLifePaymentServices": "Server=120.26.58.240; Database=Dev_LifePayment; User=bole;Password=Bole1472589"
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayAnnouncementController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayAnnouncementController.cs
new file mode 100644
index 0000000..1bc3e2f
--- /dev/null
+++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayAnnouncementController.cs
@@ -0,0 +1,84 @@
+锘縰sing Alipay.AopSdk.F2FPay.Model;
+using LifePayment.Application;
+using LifePayment.Application.Contracts;
+using LifePayment.Application.Contracts.LifePay;
+using LifePayment.Application.LifePay;
+using LifePayment.Domain;
+using LifePayment.Domain.Common;
+using LifePayment.Domain.Shared;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.WebClientInfo;
+using ZeroD.Util;
+using ZeroD.Util.Fadd;
+
+namespace LifePayment.HttpApi
+{
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    [Authorize]
+    public class LifePayAnnouncementController : AbpController
+    {
+
+        private readonly ILifePayAnnouncementService _lifePayAnnouncementService;
+
+        public LifePayAnnouncementController(
+              ILifePayAnnouncementService lifePayAnnouncementService
+              )
+        {
+            _lifePayAnnouncementService = lifePayAnnouncementService;
+        }
+
+        /// <summary>
+        /// 鑾峰彇鍏憡鍒嗛〉
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<PageOutput<CreateEditLifePayAnnouncementOutput>> GetLifePayAnnouncementPage(GetLifePayAnnouncementPageInput input)
+        {
+            return await _lifePayAnnouncementService.GetLifePayAnnouncementPage(input);
+        }
+
+        /// <summary>
+        /// 鏂板缂栬緫鍏憡
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<int> CreateOrEditLifePayAnnouncement(CreateEditLifePayAnnouncementInput input)
+        {
+            return await _lifePayAnnouncementService.CreateOrEditLifePayAnnouncement(input);
+        }
+
+        /// <summary>
+        /// 鍒犻櫎鍏憡
+        /// </summary>
+        /// <param name="id"></param>
+        /// <returns></returns>
+        [HttpGet]
+        public async Task<int> DeleteLifePayAnnouncement(Guid id)
+        {
+            return await _lifePayAnnouncementService.DeleteLifePayAnnouncement(id);
+        }
+
+        /// <summary>
+        /// 鑾峰彇褰撳墠灞曠ず涓殑鍏憡
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [AllowAnonymous]
+        public async Task<CreateEditLifePayAnnouncementOutput> GetShowingLifePayAnnouncement(GetShowingLifePayAnnouncementInput input)
+        {
+            return await _lifePayAnnouncementService.GetShowingLifePayAnnouncement(input);
+        }
+    }
+}
+
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LifePayRateController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LifePayRateController.cs
new file mode 100644
index 0000000..c653287
--- /dev/null
+++ b/LifePayment/LifePayment.HttpApi/LifePay/LifePayRateController.cs
@@ -0,0 +1,95 @@
+锘縰sing Alipay.AopSdk.F2FPay.Model;
+using LifePayment.Application;
+using LifePayment.Application.Contracts;
+using LifePayment.Application.Contracts.LifePay;
+using LifePayment.Application.LifePay;
+using LifePayment.Domain;
+using LifePayment.Domain.Common;
+using LifePayment.Domain.Shared;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Volo.Abp;
+using Volo.Abp.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.WebClientInfo;
+using ZeroD.Util;
+using ZeroD.Util.Fadd;
+
+namespace LifePayment.HttpApi
+{
+    [Route("api/[controller]/[action]")]
+    [ApiController]
+    [Authorize]
+    public class LifePayRateController : AbpController
+    {
+        private readonly ILifePayRateService _lifePayRateService;
+
+        public LifePayRateController(
+              ILifePayRateService lifePayRateService
+              )
+        {
+            _lifePayRateService = lifePayRateService;
+        }
+
+        /// <summary>
+        /// 鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒嗛〉
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<PageOutput<CreateEditRateChannelOutput>> GetLifePayRateChannelPage(PageInput input)
+        {
+            return await _lifePayRateService.GetLifePayRateChannelPage(input);
+        }
+
+        /// <summary>
+        /// 鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒楄〃
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [AllowAnonymous]
+        public async Task<List<CreateEditRateChannelOutput>> GetLifePayRateChannelAllList(QueryRateChannelInput input)
+        {
+            return await _lifePayRateService.GetLifePayRateChannelAllList(input);
+        }
+
+        /// <summary>
+        /// 鏂板缂栬緫鎶樻墸閫氶亾閰嶇疆
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<int> CreateOrEditLifePayRateChannel(CreateEditRateChannelInput input)
+        {
+            return await _lifePayRateService.CreateOrEditLifePayRateChannel(input);
+        }
+
+        /// <summary>
+        /// 璁剧疆鎶樻墸閫氶亾鐘舵��
+        /// </summary>
+        /// <param name="id"></param>
+        /// <param name="status"></param>
+        /// <returns></returns>
+        [HttpGet]
+        public async Task<int> SetRateChannelStatus(Guid id, LifePayRateChannelStatus status)
+        {
+            return await _lifePayRateService.SetRateChannelStatus(id, status);
+        }
+
+        /// <summary>
+        /// 鍒犻櫎鎶樻墸閫氶亾
+        /// </summary>
+        /// <param name="id"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public async Task<int> DeleteRateChannel(Guid id)
+        {
+            return await _lifePayRateService.DeleteRateChannel(id);
+        }
+    }
+}
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs b/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs
index 8d1ae98..cf0adc1 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/WxPayNotifyController.cs
@@ -1,4 +1,5 @@
-锘縰sing LifePayment.Application.Contracts;
+锘縰sing Alipay.AopSdk.Core.Domain;
+using LifePayment.Application.Contracts;
 using LifePayment.Domain;
 using LifePayment.Domain.Shared;
 using Medallion.Threading;
@@ -141,7 +142,8 @@
         {
             try
             {
-                _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡锛氳繘鍏ュ井淇″洖璋�");
+                var req = input.ToJson();
+                _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡锛氳繘鍏ュ井淇″洖璋冿細" + req);
                 var data = _wxPayApi.AesGcmDecrypt(input.Resource.AssociatedData, input.Resource.Nonce, input.Resource.Ciphertext);
                 _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡data锛�" + data);
                 var wxPayNotice = JsonConvert.DeserializeObject<WxPayDomesticRefundsNotice>(data);
@@ -175,7 +177,7 @@
             }
             catch (Exception ex)
             {
-
+                _logger.LogError($"寰俊閫�娆惧洖璋冮�氱煡閿欒锛�" + ex.Message);
                 return new WxRechargeNotifyResult
                 {
                     Code = "FAIL",
@@ -188,5 +190,38 @@
                 Code = "SUCCESS",
             };
         }
+
+        [HttpPost]
+        [UnitOfWork]
+        public async Task WxPayDomesticRefundsNotifyImp(WxPayDomesticRefundsNotice input)
+        {
+            var wxPayNotice = input;
+            if (wxPayNotice.OutTradeNo.Contains("JF"))
+            {
+
+                switch (wxPayNotice.RefundStatus)
+                {
+                    case LifePaymentConstant.WxPayRefundStatus.閫�娆炬垚鍔�:
+                        await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.宸查��娆�);
+                        // 鎻掑叆鏀舵敮娴佹按
+                        await _lifePayOrderService.AddLifePayExpensesReceipts(new AddLifePayExpensesReceiptsInput()
+                        {
+                            OrderNo = wxPayNotice.OutTradeNo,
+                            OutRefundNo = wxPayNotice.OutRefundNo,
+                            OutOrderNo = wxPayNotice.TransactionId,
+                            LifePayType = LifePayTypeEnum.WxPay,
+                            ExpensesReceiptsType = ExpensesReceiptsTypeEnum.Receipts,
+                            Amount = wxPayNotice.Amount.Total
+                        });
+                        break;
+                    case LifePaymentConstant.WxPayRefundStatus.閫�娆惧叧闂�:
+                    case LifePaymentConstant.WxPayRefundStatus.閫�娆惧鐞嗕腑:
+                    case LifePaymentConstant.WxPayRefundStatus.閫�娆惧紓甯�:
+                        await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑);
+                        break;
+                    default: await _lifePayService.LifePayRefundsHandler(wxPayNotice.OutTradeNo, LifePayRefundStatusEnum.閫�娆句腑); break;
+                }
+            }
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1