76 lines
2.5 KiB
C#
76 lines
2.5 KiB
C#
using MyCode.Project.Domain.Message.Act.MemberRecharge;
|
||
using MyCode.Project.Domain.Message.Request.User;
|
||
using MyCode.Project.Domain.Message.Response.MemberRecharge;
|
||
using MyCode.Project.Domain.Message.Response.Shop;
|
||
using MyCode.Project.Domain.Message.Response.User;
|
||
using MyCode.Project.Services;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Web;
|
||
using System.Web.Http;
|
||
|
||
namespace MyCode.Project.WebApi.Areas.Wechat.Controllers
|
||
{
|
||
/// <summary>
|
||
/// 会员充值余额 相关
|
||
/// </summary>
|
||
public class MemberRechargeController : BaseWechatController
|
||
{
|
||
private IMemberRechargeService _memberRechargeService;
|
||
|
||
/// <summary>
|
||
///
|
||
/// </summary>
|
||
/// <param name="memberRechargeService"></param>
|
||
public MemberRechargeController(IMemberRechargeService memberRechargeService)
|
||
{
|
||
_memberRechargeService = memberRechargeService;
|
||
|
||
}
|
||
|
||
#region Save(各种支付方式的会员充值保存接口)
|
||
/// <summary>
|
||
/// 各种支付方式的会员充值保存接口 【余宇波】
|
||
/// </summary>
|
||
/// <param name="act"></param>
|
||
[HttpPost]
|
||
public RechargePayResultResp Save(MemberRechargeAct act)
|
||
{
|
||
string ip = HttpContext.Current.Request.UserHostAddress;
|
||
return _memberRechargeService.Save(act, this.CurrentLogin,ip);
|
||
}
|
||
#endregion
|
||
|
||
|
||
#region GetRechargeDiscount(根据充值金额,获得赠送金额(已废))(已废) 2022-10-20
|
||
/// <summary>
|
||
/// 根据充值金额,获得赠送金额(已废) 2022-10-20
|
||
/// </summary>
|
||
/// <param name="act"></param>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
public decimal GetRechargePresentAmount(RechargePresentAmountAct act )
|
||
{
|
||
return 0;
|
||
decimal result = _memberRechargeService.GetRechargePresentAmount(act, this.CurrentLogin.MerchantId);
|
||
return result;
|
||
}
|
||
#endregion
|
||
|
||
|
||
#region IfSuccess(充值是否成功的查询回调)
|
||
/// <summary>
|
||
/// 充值是否成功的查询回调 (100=支付成功)
|
||
/// </summary>
|
||
/// <param name="id"></param>
|
||
/// <returns>100 =支付成功,97 =失败,其他数字= 未支付</returns>
|
||
[HttpGet]
|
||
[AllowAnonymous]
|
||
public int IfSuccess(Guid id)
|
||
{
|
||
return _memberRechargeService.IfSuccess(id);
|
||
}
|
||
#endregion
|
||
}
|
||
}
|