using System;
using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.Description;
using ESCom = EShang.Common;
using HZQR.Common;
namespace YFBusinessApi.Controllers
{
///
/// 移动支付相关接口
///
public class MobilePayController : BaseController
{
#region 方法 -> 获取银行到账列表
///
/// 获取银行到账列表
///
/// 商家会员内码
/// 开始时间,格式如2021/10/01
/// 结束时间,格式如2021/10/07
///
[AcceptVerbs("GET", "POST")]
[Route("MobilePay/GetRevenueByDay")]
[ResponseType(typeof(Models.JsonMsg>))]
public IHttpActionResult GetRevenueByDay(int membershipId, string beginDate, string endDate)
{
try
{
List BankAccountList = Helper.MobilePayHelper.GetRevenueByDay(
transaction, membershipId, beginDate, endDate);
Models.JsonList jsonList = Models.JsonList.Success(BankAccountList);
return Ok(Models.JsonMsg>.Success(jsonList, 100, "查询成功"));
}
catch (Exception ex)
{
SuperMap.RealEstate.Utility.ErrorLogHelper.Write(ex, "接口【MobilePay/GetRevenueByDay】", "");
transaction.Rollback();
string msg = "查询失败" + ex.Message;
return Ok(Helper.Common.ReturnJson(999, msg));
}
}
#endregion
#region 方法 -> 获取日结营收的差异流水
///
/// 获取日结营收的差异流水
///
/// 省份编码
/// 服务区编码
/// 门店编码
/// 机器编码
/// 开始时间,格式如2021-10-01 00:00:00
/// 结束时间,格式如2021-10-01 23:59:59
///
[AcceptVerbs("GET", "POST")]
[Route("MobilePay/GetMobilePayContrast")]
[ResponseType(typeof(Models.JsonMsg>))]
public IHttpActionResult GetMobilePayContrast(string ProvinceCode, string ServerPart_Code,
string ServerPartShop_Code, string MachineCode, string beginDate, string endDate)
{
try
{
List MobilePayList = Helper.MobilePayHelper.GetMobilePayContrast(
transaction, ProvinceCode, ServerPart_Code, ServerPartShop_Code, MachineCode, beginDate, endDate);
Models.JsonList jsonList = Models.JsonList.Success(MobilePayList);
return Ok(Models.JsonMsg>.Success(jsonList, 100, "查询成功"));
}
catch (Exception ex)
{
SuperMap.RealEstate.Utility.ErrorLogHelper.Write(ex, "接口【MobilePay/GetMobilePayContrast】", "");
transaction.Rollback();
string msg = "查询失败" + ex.Message;
return Ok(Helper.Common.ReturnJson(999, msg));
}
}
#endregion
#region 方法 -> 获取实时移动支付流水
///
/// 获取实时移动支付流水
///
/// 商家会员内码
/// 服务区门店编码集合
/// 开始时间,格式如2021-10-01 00:00:00
/// 结束时间,格式如2021-10-01 00:00:00
/// 显示行数
/// 订单编号
///
[AcceptVerbs("GET", "POST")]
[Route("MobilePay/GetCurTrade")]
[ResponseType(typeof(Models.JsonMsg>))]
public IHttpActionResult GetCurTrade(string membershipId, string serverpartShopCode,
string beginDate, string endDate, int showCount, string orderno = "")
{
try
{
List MobilePayDataList = Helper.MobilePayHelper.GetCurTrade(
transaction, membershipId, serverpartShopCode, beginDate, endDate, showCount, orderno);
Models.JsonList jsonList = Models.JsonList.Success(
MobilePayDataList, showCount, 1, showCount);
return Ok(Models.JsonMsg>.Success(jsonList, 100, "查询成功"));
}
catch (Exception ex)
{
SuperMap.RealEstate.Utility.ErrorLogHelper.Write(ex, "接口【MobilePay/GetCurTrade】", "");
transaction.Rollback();
string msg = "查询失败" + ex.Message;
return Ok(Helper.Common.ReturnJson(999, msg));
}
}
#endregion
}
}