104 lines
3.4 KiB
C#
104 lines
3.4 KiB
C#
using MyCode.Project.Domain.Message.Act.Report2301;
|
|
using MyCode.Project.Domain.Message.Act.SalesSheetPay;
|
|
using MyCode.Project.Domain.Message.Request.Goods;
|
|
using MyCode.Project.Domain.Message.Response.Goods;
|
|
using MyCode.Project.Domain.Message.Response.Report40;
|
|
using MyCode.Project.Domain.Message.Response.User;
|
|
using MyCode.Project.Infrastructure.Common;
|
|
using MyCode.Project.Infrastructure.Constant;
|
|
using MyCode.Project.Infrastructure.Extensions;
|
|
using MyCode.Project.Services;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web.Http;
|
|
|
|
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
|
|
{
|
|
/// <summary>
|
|
/// POS机调用的相关接口,仅供系统内部调用
|
|
/// </summary>
|
|
public class LxmShopApiController : BaseAdminController
|
|
{
|
|
|
|
private ISalesSheetService _salesSheetService;
|
|
private ISalesSheetPayService _salesSheetPayService;
|
|
private IReport40Service _report40Service;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="salesSheetService"></param>
|
|
/// <param name="salesSheetPayService"></param>
|
|
public LxmShopApiController(ISalesSheetService salesSheetService
|
|
, ISalesSheetPayService salesSheetPayService,
|
|
IReport40Service report40Service)
|
|
{
|
|
|
|
_salesSheetService = salesSheetService;
|
|
_salesSheetPayService = salesSheetPayService;
|
|
_report40Service = report40Service;
|
|
}
|
|
|
|
#region GetDetailListByCode(根据抖音码获取对应的商品列表)
|
|
/// <summary>
|
|
/// 根据抖音码获取对应的商品列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[AllowAnonymous]
|
|
|
|
public List<TuanGouGoodsPageListResp> GetDetailListByCode(BfyApiKeyAct request)
|
|
{
|
|
if (request.LxmZHMDReportKey.ToLower() == Const.LxmSysTemReportKey.ToLower())
|
|
{
|
|
var act = JsonHelper.ToObject<DouYinUrlAct>(request.Json);
|
|
return _salesSheetService.GetDetailListByCode(act.Code,act.ShopId);
|
|
}
|
|
return
|
|
null;
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region TuanGouConfirmPayOnline( 确认结账(用于对接了抖音的店铺团购核销码支付))
|
|
/// <summary>
|
|
/// 确认结账(用于对接了抖音的店铺团购核销码支付)
|
|
/// </summary>
|
|
/// <param name="request"> </param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[AllowAnonymous]
|
|
public Guid? TuanGouConfirmPayOnline(BfyApiKeyAct request)
|
|
{
|
|
if (request.LxmZHMDReportKey.ToLower() == Const.LxmSysTemReportKey.ToLower())
|
|
{
|
|
var req = JsonHelper.ToObject<TuanGouConfirmPayOnlineAct>(request.Json);
|
|
LoginInfo loginInfo = req.CurrentLoginInfo;
|
|
req.Act.ShopId = loginInfo.ShopId.SafeValue();
|
|
return _salesSheetPayService.TuanGouConfirmPayOnline(req.Act, loginInfo);
|
|
}
|
|
return
|
|
null;
|
|
}
|
|
#endregion
|
|
|
|
///// <summary>
|
|
///// 获取店铺与带教师的数据
|
|
///// </summary>
|
|
///// <returns></returns>
|
|
//[HttpGet]
|
|
//public List<ShopDaiJiaoShi> GetShopDaiJiaoShiList()
|
|
//{
|
|
// return _report40Service.GetShopDaiJiaoShiList();
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|