Commit f098eb63 authored by 吴春's avatar 吴春

Merge branch 'HK' of http://gitlab.oytour.com/Kui2/mall.oytour.com into sdzq

parents a10f780a c4664bc2
......@@ -568,5 +568,10 @@ namespace Mall.Model.Entity.Product
/// 门店编号
/// </summary>
public string StoresIds { get; set; }
/// <summary>
/// 服务时长
/// </summary>
public decimal ServiceTime { get; set; }
}
}
......@@ -55,6 +55,7 @@ namespace Mall.Model.Extend.Product
/// 版面类型
/// </summary>
public string CategoryPageTypeStr { get; set; }
}
/// <summary>
......
This diff is collapsed.
......@@ -747,6 +747,7 @@ namespace Mall.Module.Product
{ nameof(RB_Goods.IsChooseServicePerson),demodel.IsChooseServicePerson },
{ nameof(RB_Goods.StoresIds),demodel.StoresIds },
{ nameof(RB_Goods.Remark),demodel.Remark },
{ nameof(RB_Goods.ServiceTime),demodel.ServiceTime },
};
List<WhereHelper> wheres = new List<WhereHelper>()
{
......
......@@ -137,5 +137,26 @@ namespace Mall.Repository.Product
}
return Execute(sql) > 0;
}
/// <summary>
/// 获取当前分类和当前分类的所有下级分类
/// </summary>
/// <param name="categoryIds"></param>
/// <returns></returns>
public List<RB_Product_Category_Extend> GetCurrentAndChildCategoryListRepository(string categoryIds)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Product_Category WHERE Status=0 and Enabled=1 and IsShow=1 AND ParentId IN({0})
UNION ALL
SELECT *
FROM RB_Product_Category WHERE Status=0 and Enabled=1 and IsShow=1 AND ParentId IN( SELECT Id FROM RB_Product_Category WHERE Status=0 and Enabled=1 and IsShow=1 AND ParentId IN({0}))
UNION ALL
SELECT *
FROM RB_Product_Category WHERE Status=0 and Enabled=1 and IsShow=1 AND Id IN({0})
", categoryIds);
return Get<RB_Product_Category_Extend>(builder.ToString()).ToList();
}
}
}
......@@ -16,6 +16,7 @@ using Newtonsoft.Json.Linq;
using Mall.Common;
using Mall.Module.Product;
using Mall.Model.Extend.User;
using Google.Protobuf.WellKnownTypes;
namespace Mall.WebApi.Controllers.MallBase
{
......@@ -421,13 +422,55 @@ namespace Mall.WebApi.Controllers.MallBase
JObject prams = JObject.Parse(req.msg.ToString());
int GoodsId = prams.GetInt("GoodsId", 0);
int StoreId = prams.GetInt("StoreId", 0);
if (GoodsId <= 0|| StoreId<=0)
if (StoreId<=0 || GoodsId<=0)
{
return ApiResult.ParamIsNull();
return ApiResult.ParamIsNull(message:"请选择门店");
}
int UserId = req.UserId;
object Robj = productModule.GetAppletOfflineGoodsInfoModule(GoodsId, UserId, req.SmallShopsId, req.TenantId, req.MallBaseId, storeId: StoreId);
return ApiResult.Success("", Robj);
}
/// <summary>
/// 预定页面获取商品分类列表
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[HttpPost]
public ApiResult GetAppletOfflineCate(object requestMsg)
{
var req = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
if (req.MallBaseId <= 0)
{
return ApiResult.ParamIsNull();
}
object Robj = productModule.GetAppletOfflineCategoryListModule(req.TenantId, req.MallBaseId);
return ApiResult.Success("", Robj);
}
var Robj = productModule.GetAppletOfflineGoodsInfoModule(GoodsId, UserId, req.SmallShopsId, req.TenantId, req.MallBaseId, storeId: StoreId);
/// <summary>
/// 预定页面获取商品分类
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
///
[HttpPost]
public ApiResult GetAppletOfflineGoodsList(object requestMsg)
{
var req = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
if (req.MallBaseId <= 0)
{
return ApiResult.ParamIsNull();
}
JObject prams = JObject.Parse(req.msg.ToString());
int StoreId = prams.GetInt("StoreId", 0);
string categoryIds= prams.GetStringValue("categoryIds");
if (StoreId <= 0)
{
return ApiResult.ParamIsNull(message: "请选择门店");
}
object Robj = productModule.GetAppletOfflineGoodsListModule(req.TenantId, req.MallBaseId, categoryIds, storeId: StoreId);
return ApiResult.Success("", Robj);
}
......
......@@ -324,6 +324,7 @@ namespace Mall.WebApi.Controllers.Reserve
model?.Remark,
model?.VideoType,
model?.LimitBuyGoodsNum,
model?.ServiceTime,
});
}
......
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