77 lines
2.8 KiB
C#
Raw Normal View History

2025-04-24 18:31:27 +08:00
using MyCode.Project.Domain.Message.Act.Common;
using MyCode.Project.Domain.Message.Act.Report2301;
using MyCode.Project.Domain.Message.Common;
using MyCode.Project.Domain.Message.Request.Goods;
using MyCode.Project.Domain.Message.Request.OnlineGoods;
using MyCode.Project.Domain.Message.Response.Activity;
using MyCode.Project.Domain.Message.Response.Goods;
using MyCode.Project.Domain.Message.Response.OnlineGoods;
using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Infrastructure.Constant;
using MyCode.Project.Services;
using System.Collections.Generic;
using System.Web.Http;
namespace MyCode.Project.WebApi.Areas.Wechat.Controllers
{
/// <summary>
/// 收银台商品相关的接口
/// </summary>
public class OnlineGoodsForLxmController : BaseWechatController
{
private IOnlineGoodsService _OnlineGoodsService;
private IRpShopUseAppletDataService _rpShopUseAppletDataService;
/// <summary>
/// 初始化一个<see cref="GoodsController"/>类型的实例
/// </summary>
public OnlineGoodsForLxmController(IOnlineGoodsService onlineGoodsService
, IRpShopUseAppletDataService rpShopUseAppletDataService)
{
_OnlineGoodsService = onlineGoodsService;
_rpShopUseAppletDataService = rpShopUseAppletDataService;
}
#region GetSellsPageList()
/// <summary>
/// 销售商品列表
/// </summary>
/// <param name="request">查询条件</param>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
public PageResult<OnlineGoodsStockPageListResp> GetSellsPageList(BfyApiKeyAct request)
{
if (request.LxmZHMDReportKey.ToLower() == Const.LxmSysTemReportKey.ToLower())
{
PagedSearch<OnlineGoodsStockPageListQuery> search = new PagedSearch<OnlineGoodsStockPageListQuery>();
search = JsonHelper.ToObject<PagedSearch<OnlineGoodsStockPageListQuery>>(request.Json);
return this._OnlineGoodsService.GetSellsPageList(search);
}
else
return null;
}
#endregion
#region GetLxmOnlineDeptTreeList()
/// <summary>
/// 获取商品分类列表
/// </summary>
/// <returns></returns>
[HttpPost]
[AllowAnonymous]
public List<OnlineDeptTreeListResp> GetOnlineDeptTreeList(BfyApiKeyAct request)
{
if (request.LxmZHMDReportKey.ToLower() == Const.LxmSysTemReportKey.ToLower())
{
return this._OnlineGoodsService.GetOnlineDeptTreeList();
}
else
return null;
}
#endregion
}
}