using 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]
|
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);
|
}
|
}
|
}
|