Commit fb6a3c8a authored by 黄奎's avatar 黄奎

新增页面

parent 44ade3ea
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mall.Common.Plugin;
using Mall.Model.Entity.User;
......@@ -268,6 +269,28 @@ namespace Mall.Module.User
return storesRepository.GetStoresListRepository(query,isFirst:isFirst);
}
/// <summary>
/// 获取门店
/// </summary>
/// <param name="query"></param>
/// <param name="isFirst"></param>
/// <returns></returns>
public object GetStoresInfoModule(RB_Stores_Extend query)
{
var storeModel = GetStoresListModule(query, isFirst: true)?.FirstOrDefault();
object result = new
{
storeId = storeModel?.Id,
storeName = storeModel?.Name,
storeAddress = storeModel?.Address,
storeTel = storeModel?.Tel,
distance = storeModel?.KM,
storeCoverImg = storeModel?.CoverImg,
storeNavImg = storeModel?.NavImg
};
return result;
}
/// <summary>
/// 新增修改门店
/// </summary>
......
......@@ -404,11 +404,17 @@ where {where} group by g.Id order by {orderBy}";
public List<RB_Goods_Extend> GetList(RB_Goods_Extend dmodel)
{
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 ";
if (dmodel.GoodsClassify == 1)//查询非司导
{
where += $" and g.GoodsClassify <> 1";
}
else {
else if (dmodel.GoodsClassify == 3)
{
where += $" and g.GoodsClassify=3 ";
}
else
{
where += $" and g.GoodsClassify=0";
}
if (dmodel.TenantId > 0)
......
......@@ -4,8 +4,10 @@ using Mall.AOP;
using Mall.Common.API;
using Mall.Common.Plugin;
using Mall.Model.Entity.User;
using Mall.Module.Product;
using Mall.Module.User;
using Mall.WebApi.Filter;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
......@@ -27,11 +29,19 @@ namespace Mall.WebApi.Controllers.Reserve
/// </summary>
private readonly ContentModule contentModule = AOPHelper.CreateAOPObject<ContentModule>();
/// <summary>
/// 线下服务商品处理类对象
/// </summary>
private readonly OfflineGoodsModule offlineGoodsModule = AOPHelper.CreateAOPObject<OfflineGoodsModule>();
/// <summary>
/// 线下服务首页获取当前距离最近门店
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpGet]
[HttpPost]
[AllowAnonymous]
public virtual ApiResult GetCurrentStore(object requestMsg)
{
var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
......@@ -61,6 +71,8 @@ namespace Mall.WebApi.Controllers.Reserve
storeNavImg = storeModel?.NavImg
},
};
return ApiResult.Success(data: result);
}
......@@ -70,6 +82,9 @@ namespace Mall.WebApi.Controllers.Reserve
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[HttpGet]
[HttpPost]
[AllowAnonymous]
public virtual ApiResult GetStorePage(object requestMsg)
{
var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
......@@ -93,6 +108,9 @@ namespace Mall.WebApi.Controllers.Reserve
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[HttpGet]
[HttpPost]
[AllowAnonymous]
public virtual ApiResult GetStoreInfo(object requestMsg)
{
var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment