zhengyiming
23 小时以前 f7bb0825bc06b8cea32caa44d2326dde51990e77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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]
        [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);
        }
    }
}