Commit 2cfdfe25 authored by 吴春's avatar 吴春

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

parents 1178c657 f067c546
......@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Product;
using Mall.Model.Extend.Finance;
using Mall.Model.Extend.Reserve;
namespace Mall.Model.Extend.Product
{
......@@ -36,6 +37,12 @@ namespace Mall.Model.Extend.Product
/// 课程卡信息 //2020-10-11 Add By:w
/// </summary>
public List<Education.RB_Education_MemberCoupon_Extend> MemberEducationCouponList { get; set; }
/// <summary>
/// 套餐卡信息
/// </summary>
public List<RB_Reserve_MemberCoupon_Extend> ReserveCouponList { get; set; }
/// <summary>
/// 是否直播订单
/// </summary>
......
This diff is collapsed.
......@@ -24,6 +24,7 @@ using Mall.Repository.Finance;
using Mall.Repository.GuideCar;
using Mall.Repository.MarketingCenter;
using Mall.Repository.Product;
using Mall.Repository.Reserve;
using Mall.Repository.User;
using Mall.ThirdCore.Message;
using Microsoft.Extensions.Configuration;
......@@ -57,6 +58,24 @@ namespace Mall.Module.Product
/// </summary>
private RB_Education_MemberUseCouponRepository education_MemberUseCouponRepository = new RB_Education_MemberUseCouponRepository();
/// <summary>
/// 套餐卡
/// </summary>
private RB_Reserve_MemberCouponRepository reserve_MemberCouponRepository = new RB_Reserve_MemberCouponRepository();
/// <summary>
/// 套餐卡实体
/// </summary>
private RB_Reserve_CouponRepository reserve_CouponRepository = new RB_Reserve_CouponRepository();
/// <summary>
/// 套餐卡适配
/// </summary>
private RB_Reserve_CouponProductRepository reserve_CouponProductRepository = new RB_Reserve_CouponProductRepository();
/// <summary>
/// 套餐卡使用
/// </summary>
private RB_Reserve_MemberUseCouponRepository reserve_MemberUseCouponRepository = new RB_Reserve_MemberUseCouponRepository();
/// <summary>
......
......@@ -11,6 +11,7 @@ using Mall.Model.Entity.Product;
using Mall.Model.Entity.User;
using Mall.Model.Extend.BaseSetUp;
using Mall.Model.Extend.Product;
using Mall.Model.Extend.Reserve;
using Mall.Model.Extend.User;
using Mall.Model.Query;
using Mall.Repository;
......@@ -2648,7 +2649,7 @@ namespace Mall.Module.Product
/// <param name="MallBaseId"></param>
/// <param name="storeId">门店编号</param>
/// <returns></returns>
public object GetAppletOfflineGoodsInfoModule(int goodsId, int UserId, int SmallShopsId, int TenantId, int MallBaseId, int storeId = 0)
public object GetAppletOfflineGoodsInfoModule(int goodsId, int UserId, int SmallShopsId, int TenantId, int MallBaseId, int storeId = 0,int servicePersionId=0)
{
var model = goodsRepository.GetEntity(goodsId).RefMapperTo<RB_Goods_Extend>();
if (model == null || model.TenantId != TenantId || model.MallBaseId != MallBaseId)
......@@ -3538,8 +3539,12 @@ namespace Mall.Module.Product
{
categoryIds = string.Join(",", model.CategoryList.Select(qitem => qitem.CategoryId));
}
var servicePersionList = reserve_ServicePersonalRepository.GetServicePersonalListExtRepository(storeId,model.Id, categoryIds)?.ToList() ?? new List<Model.Extend.Reserve.RB_Reserve_ServicePersonal_Extend>();
//服务人员列表
var servicePersionList = new List<RB_Reserve_ServicePersonal_Extend>();
if (model.IsChooseServicePerson == 1)
{
servicePersionList= reserve_ServicePersonalRepository.GetServicePersonalListExtRepository(storeId, model.Id, categoryIds,servicePersionId)?.ToList() ?? new List<Model.Extend.Reserve.RB_Reserve_ServicePersonal_Extend>();
}
var storeModel = storesRepository.GetEntity(storeId);
List<StoreReserveDate> storeDateList = new List<StoreReserveDate>();
DateTime currentDay = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd"));
......
......@@ -91,6 +91,14 @@ namespace Mall.Repository.Reserve
{
builder.Append($" AND {nameof(RB_Reserve_Coupon_Extend.ID)} in({query.CouponIds})");
}
if (query.StoreId > 0)
{
builder.Append($" AND ( FIND_IN_SET('{query.StoreId}', {nameof(RB_Reserve_Coupon_Extend.StoreIds)}) or FIND_IN_SET('0', {nameof(RB_Reserve_Coupon_Extend.StoreIds)} )) ");
}
else
{
builder.Append($" AND FIND_IN_SET('0', {nameof(RB_Reserve_Coupon_Extend.StoreIds)})");
}
}
return Get<RB_Reserve_Coupon_Extend>(builder.ToString()).ToList();
}
......
......@@ -341,8 +341,9 @@ ORDER BY t.orderNum desc ";
/// <param name="storeId"></param>
/// <param name="productId"></param>
/// <param name="categoryIds"></param>
/// <param name="servicePersionId">服务人员Id</param>
/// <returns></returns>
public List<RB_Reserve_ServicePersonal_Extend> GetServicePersonalListExtRepository(int storeId, int productId, string categoryIds)
public List<RB_Reserve_ServicePersonal_Extend> GetServicePersonalListExtRepository(int storeId, int productId, string categoryIds,int servicePersionId=0)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
......@@ -365,6 +366,10 @@ LEFT JOIN
) AS orderTab ON A.ID=orderTab.OrderNum
WHERE A.Status=0 AND A.StoreId={2}
", productId, categoryIds, storeId);
if (servicePersionId > 0)
{
builder.AppendFormat(" AND A.ID={0} ", servicePersionId);
}
return Get<RB_Reserve_ServicePersonal_Extend>(builder.ToString()).ToList();
}
......
......@@ -423,13 +423,13 @@ namespace Mall.WebApi.Controllers.MallBase
JObject prams = JObject.Parse(req.msg.ToString());
int GoodsId = prams.GetInt("GoodsId", 0);
int StoreId = prams.GetInt("StoreId", 0);
int servicePersionId = prams.GetInt("servicePersionId", 0);
if (StoreId<=0 || GoodsId<=0)
{
return ApiResult.ParamIsNull(message:"请选择门店");
}
int UserId = req.UserId;
object Robj = productModule.GetAppletOfflineGoodsInfoModule(GoodsId, UserId, req.SmallShopsId, req.TenantId, req.MallBaseId, storeId: StoreId);
object Robj = productModule.GetAppletOfflineGoodsInfoModule(GoodsId, UserId, req.SmallShopsId, req.TenantId, req.MallBaseId, storeId: StoreId,servicePersionId:servicePersionId);
return ApiResult.Success("", Robj);
}
......
......@@ -710,7 +710,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
demodel.DeliveryMethod = Common.Enum.Goods.OrderDeliveryMethodEnum.VerificationShop;
if ((demodel.Income ?? 0) <= 0)
if ((demodel.Income ?? 0) < 0)
{
return ApiResult.ParamIsNull("订单金额不正确");
}
......
......@@ -1909,6 +1909,10 @@ namespace Mall.WebApi.Controllers.MallBase
CouponMoney = y.CouponMoney ?? 0,
InsuranceMoney = y.InsuranceMoney ?? 0,
InsuranceCostMoney = y.InsuranceCostMoney ?? 0,
MemberEducationCouponList = y.ReserveCouponList.Select(z => new
{
z.Name,
}),
SFinanceList = y.FinanceList.Where(z => z.Type == 1).Select(z => new
{
z.FrID,
......
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