2025-03-28 09:49:56 +08:00

117 lines
5.5 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
{
/// <summary>
/// 移动支付相关接口
/// </summary>
public class MobilePayController : BaseController
{
#region ->
/// <summary>
/// 获取银行到账列表
/// </summary>
/// <param name="membershipId">商家会员内码</param>
/// <param name="beginDate">开始时间格式如2021/10/01</param>
/// <param name="endDate">结束时间格式如2021/10/07</param>
/// <returns></returns>
[AcceptVerbs("GET", "POST")]
[Route("MobilePay/GetRevenueByDay")]
[ResponseType(typeof(Models.JsonMsg<Models.JsonList<Models.BankAccountModel>>))]
public IHttpActionResult GetRevenueByDay(int membershipId, string beginDate, string endDate)
{
try
{
List<Models.BankAccountModel> BankAccountList = Helper.MobilePayHelper.GetRevenueByDay(
transaction, membershipId, beginDate, endDate);
Models.JsonList<Models.BankAccountModel> jsonList = Models.JsonList<Models.BankAccountModel>.Success(BankAccountList);
return Ok(Models.JsonMsg<Models.JsonList<Models.BankAccountModel>>.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 ->
/// <summary>
/// 获取日结营收的差异流水
/// </summary>
/// <param name="ProvinceCode">省份编码</param>
/// <param name="ServerPart_Code">服务区编码</param>
/// <param name="ServerPartShop_Code">门店编码</param>
/// <param name="MachineCode">机器编码</param>
/// <param name="beginDate">开始时间格式如2021-10-01 00:00:00</param>
/// <param name="endDate">结束时间格式如2021-10-01 23:59:59</param>
/// <returns></returns>
[AcceptVerbs("GET", "POST")]
[Route("MobilePay/GetMobilePayContrast")]
[ResponseType(typeof(Models.JsonMsg<Models.JsonList<Models.MobilePayModel>>))]
public IHttpActionResult GetMobilePayContrast(string ProvinceCode, string ServerPart_Code,
string ServerPartShop_Code, string MachineCode, string beginDate, string endDate)
{
try
{
List<Models.MobilePayModel> MobilePayList = Helper.MobilePayHelper.GetMobilePayContrast(
transaction, ProvinceCode, ServerPart_Code, ServerPartShop_Code, MachineCode, beginDate, endDate);
Models.JsonList<Models.MobilePayModel> jsonList = Models.JsonList<Models.MobilePayModel>.Success(MobilePayList);
return Ok(Models.JsonMsg<Models.JsonList<Models.MobilePayModel>>.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 ->
/// <summary>
/// 获取实时移动支付流水
/// </summary>
/// <param name="membershipId">商家会员内码</param>
/// <param name="serverpartShopCode">服务区门店编码集合</param>
/// <param name="beginDate">开始时间格式如2021-10-01 00:00:00</param>
/// <param name="endDate">结束时间格式如2021-10-01 00:00:00</param>
/// <param name="showCount">显示行数</param>
/// <param name="orderno">订单编号</param>
/// <returns></returns>
[AcceptVerbs("GET", "POST")]
[Route("MobilePay/GetCurTrade")]
[ResponseType(typeof(Models.JsonMsg<Models.JsonList<ESCom.Model.MobilePayData>>))]
public IHttpActionResult GetCurTrade(string membershipId, string serverpartShopCode,
string beginDate, string endDate, int showCount, string orderno = "")
{
try
{
List<ESCom.Model.MobilePayData> MobilePayDataList = Helper.MobilePayHelper.GetCurTrade(
transaction, membershipId, serverpartShopCode, beginDate, endDate, showCount, orderno);
Models.JsonList<ESCom.Model.MobilePayData> jsonList = Models.JsonList<ESCom.Model.MobilePayData>.Success(
MobilePayDataList, showCount, 1, showCount);
return Ok(Models.JsonMsg<Models.JsonList<ESCom.Model.MobilePayData>>.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
}
}