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; using System.Collections.Generic; using System.Web.Http; namespace MyCode.Project.WebApi.Areas.Wechat.Controllers { /// /// 收银台商品相关的接口 /// public class OnlineGoodsController : BaseWechatController { private IOnlineGoodsService _OnlineGoodsService; private IRpShopUseAppletDataService _rpShopUseAppletDataService; private ISalesSheetService _salesSheetService; /// /// 初始化一个类型的实例 /// public OnlineGoodsController(IOnlineGoodsService onlineGoodsService , IRpShopUseAppletDataService rpShopUseAppletDataService ,ISalesSheetService salesSheetService) { _OnlineGoodsService = onlineGoodsService; _rpShopUseAppletDataService = rpShopUseAppletDataService; _salesSheetService = salesSheetService; } #region GetSellsPageList(销售商品列表) /// /// 销售商品列表 /// /// 查询条件 /// [HttpPost] public PageResult GetSellsPageList(PagedSearch search) { return this._OnlineGoodsService.GetSellsPageList(search, this.CurrentLogin.MerchantId); } #endregion #region GetOnlineDeptTreeList(获取商品分类列表) /// /// 获取商品分类列表 /// /// [HttpGet] public List GetOnlineDeptTreeList() { return this._OnlineGoodsService.GetOnlineDeptTreeList(); } #endregion #region GetOnlineGoodsDetail(获取商品电商资料详情) /// /// 获取商品电商资料详情 /// /// /// [HttpPost] public OnlineGoodsDetailResp GetOnlineGoodsDetail(OnlineGoodsItem req) { try { _rpShopUseAppletDataService.SetData(30, req.ShopId, this.CurrentLogin); } catch { } return this._OnlineGoodsService.GetOnlineGoodsDetail(req); } #endregion #region GetGoodsSharePic(门店端获取商品详情拼接海报的多个图片) /// /// 门店端获取商品详情拼接海报的多个图片 /// /// /// [HttpPost] public CustomerSharePicResp GetGoodsSharePic(ShopOnlineGoodsItem req) { return this._OnlineGoodsService.GetGoodsSharePic(req,this.CurrentLogin,true); } #endregion #region GetOnlineDeptTreeList(获取商品分类列表) /// /// 获取商品分类列表 /// /// [HttpPost] [AllowAnonymous] public List GetLxmOnlineDeptTreeList(BfyApiKeyAct request) { if (request.LxmZHMDReportKey.ToLower() == Const.LxmSysTemReportKey.ToLower()) { return this._OnlineGoodsService.GetOnlineDeptTreeList(); } else return null; } #endregion #region GetDetailListByCode(根据抖音码获取对应的商品列表) /// /// 根据抖音码获取对应的商品列表 /// /// /// [HttpPost] public List GetDetailListByCode(DouYinUrlAct act) { return _salesSheetService.GetDetailListByCode(act.Code, act.ShopId); } #endregion } }