Commit 09500f51 authored by 吴春's avatar 吴春

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

parents d6024745 c47fd47c
...@@ -312,5 +312,9 @@ namespace Mall.Model.Entity.Product ...@@ -312,5 +312,9 @@ namespace Mall.Model.Entity.Product
/// 订单分类 0正常订单 1司导订单 /// 订单分类 0正常订单 1司导订单
/// </summary> /// </summary>
public int OrderClassify { get; set; } public int OrderClassify { get; set; }
/// <summary>
/// 目的地(司导订单)
/// </summary>
public string DestinationAddress { get; set; }
} }
} }
...@@ -5875,7 +5875,8 @@ namespace Mall.Module.Product ...@@ -5875,7 +5875,8 @@ namespace Mall.Module.Product
TripSTime = item.TripSTime, TripSTime = item.TripSTime,
UseDay = item.UseDay, UseDay = item.UseDay,
InsuranceMoney = item.InsuranceMoney, InsuranceMoney = item.InsuranceMoney,
InsuranceCostMoney = item.InsuranceCostMoney InsuranceCostMoney = item.InsuranceCostMoney,
InsuranceFinanceId = 0
}, trans); }, trans);
item.Id = detailId; item.Id = detailId;
if (detailId > 0 && SatisfiedGoodsList.Any()) if (detailId > 0 && SatisfiedGoodsList.Any())
...@@ -5900,7 +5901,8 @@ namespace Mall.Module.Product ...@@ -5900,7 +5901,8 @@ namespace Mall.Module.Product
}, trans); }, trans);
} }
} }
if (IsSDGoods == false)
{
//更新商品数量 //更新商品数量
Dictionary<string, object> keyValues = new Dictionary<string, object>() { Dictionary<string, object> keyValues = new Dictionary<string, object>() {
{ nameof(RB_Goods.InventoryNum),item.InventoryNum-(item.Number??0)} { nameof(RB_Goods.InventoryNum),item.InventoryNum-(item.Number??0)}
...@@ -5967,6 +5969,7 @@ namespace Mall.Module.Product ...@@ -5967,6 +5969,7 @@ namespace Mall.Module.Product
TenantId = demodel.TenantId TenantId = demodel.TenantId
}, trans); }, trans);
} }
}
#region 更新司导商品预约时间 #region 更新司导商品预约时间
if (IsSDGoods) { if (IsSDGoods) {
...@@ -6057,7 +6060,7 @@ namespace Mall.Module.Product ...@@ -6057,7 +6060,7 @@ namespace Mall.Module.Product
demodel.OrderNo, demodel.OrderNo,
Name = demodel.Consignee, Name = demodel.Consignee,
demodel.Mobile, demodel.Mobile,
TripDate = item.TripSTime.Value.ToString("yyyy-MM-dd HH:mm") + " " + (item.UseDay ?? 0) + "天", TripDate = item.TripSTime.Value.ToString("yyyy-MM-dd HH:mm") + " " + ((item.UseDay ?? 0) == Convert.ToDecimal(0.5) ? "半" : Convert.ToInt32(item.UseDay ?? 0).ToString()) + "日",
Address = demodel.ShoppingAddress, Address = demodel.ShoppingAddress,
item.Number item.Number
}; };
...@@ -8690,6 +8693,74 @@ namespace Mall.Module.Product ...@@ -8690,6 +8693,74 @@ namespace Mall.Module.Product
}; };
goods_SpecificationPriceRepository.Update(keyValues2, wheres2, trans); goods_SpecificationPriceRepository.Update(keyValues2, wheres2, trans);
} }
if (item.OrderType == OrderTypeEnum.SDGoods)
{
//更新商品可预定日期
var tdlist = goods_TargetDateRepository.GetList(new RB_Goods_TargetDate_Extend() { GoodsId = item.GoodsId ?? 0, StartTime = item.TripSTime.Value.ToString("yyyy-MM-dd"), EndTime = item.TripETime.Value.ToString("yyyy-MM-dd") });
if (item.CarType == GuideCarGoodsTypeEnum.Line && item.IsSpell == 1)
{
//只调整第一天的 其他天 直接表示已预订了
var fristModel = tdlist.Where(x => x.Date == Convert.ToDateTime(item.TripSTime.Value.ToString("yyyy-MM-dd"))).FirstOrDefault();
//第一条更新数量 如果OK咯 更新已预定
if (fristModel != null)
{
Dictionary<string, object> keyValues1 = new Dictionary<string, object>
{
{ nameof(RB_Goods_TargetDate.IsReserve), 1 },
{ nameof(RB_Goods_TargetDate.ReserveNum), (fristModel.ReserveNum) - (item.Number ?? 0) }
};
List<WhereHelper> wheres1 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Goods_TargetDate.Id),
FiledValue=fristModel.Id,
OperatorEnum=OperatorEnum.Equal
}
};
goods_TargetDateRepository.Update(keyValues1, wheres1, trans);
if ((fristModel.ReserveNum) - (item.Number ?? 0) <= 0)
{
//其他的直接改未预定
foreach (var qitem in tdlist.Where(x => x.Date != Convert.ToDateTime(item.TripSTime.Value.ToString("yyyy-MM-dd")) && x.IsReserve == 2))
{
Dictionary<string, object> keyValues2 = new Dictionary<string, object>() {
{ nameof(RB_Goods_TargetDate.IsReserve),1},
{ nameof(RB_Goods_TargetDate.ReserveNum),0},
};
List<WhereHelper> wheres2 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Goods_TargetDate.Id),
FiledValue=qitem.Id,
OperatorEnum=OperatorEnum.Equal
}
};
goods_TargetDateRepository.Update(keyValues2, wheres2, trans);
}
}
}
}
else
{
//直接回滚所有的日期 为可预定
foreach (var qitem in tdlist)
{
Dictionary<string, object> keyValues1 = new Dictionary<string, object>() {
{ nameof(RB_Goods_TargetDate.IsReserve),1},
{ nameof(RB_Goods_TargetDate.ReserveNum),0},
};
List<WhereHelper> wheres1 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Goods_TargetDate.Id),
FiledValue=qitem.Id,
OperatorEnum=OperatorEnum.Equal
}
};
goods_TargetDateRepository.Update(keyValues1, wheres1, trans);
}
}
}
else
{
//更新商品表库存 //更新商品表库存
Dictionary<string, object> keyValues1 = new Dictionary<string, object>() { Dictionary<string, object> keyValues1 = new Dictionary<string, object>() {
{ nameof(RB_Goods.InventoryNum), (gmodel.InventoryNum??0)+(item.Number??0)} { nameof(RB_Goods.InventoryNum), (gmodel.InventoryNum??0)+(item.Number??0)}
...@@ -8702,6 +8773,7 @@ namespace Mall.Module.Product ...@@ -8702,6 +8773,7 @@ namespace Mall.Module.Product
} }
}; };
goodsRepository.Update(keyValues1, wheres1, trans); goodsRepository.Update(keyValues1, wheres1, trans);
}
goods_LogRepository.Insert(new RB_Goods_Log() goods_LogRepository.Insert(new RB_Goods_Log()
{ {
Id = 0, Id = 0,
...@@ -10700,6 +10772,7 @@ namespace Mall.Module.Product ...@@ -10700,6 +10772,7 @@ namespace Mall.Module.Product
x.FreeShippingRemarks, x.FreeShippingRemarks,
x.SmallShopsCostPrice, x.SmallShopsCostPrice,
CouponMoney = x.CouponMoney ?? 0, CouponMoney = x.CouponMoney ?? 0,
InsuranceMoney = x.InsuranceMoney ?? 0,
IntegralMoney = x.IntegralMoney ?? 0, IntegralMoney = x.IntegralMoney ?? 0,
IntegralNumber = x.IntegralNumber ?? 0, IntegralNumber = x.IntegralNumber ?? 0,
}) })
...@@ -10779,7 +10852,7 @@ namespace Mall.Module.Product ...@@ -10779,7 +10852,7 @@ namespace Mall.Module.Product
orderModel.OrderNo, orderModel.OrderNo,
Name = orderModel.Consignee, Name = orderModel.Consignee,
orderModel.Mobile, orderModel.Mobile,
TripDate = item.TripSTime.Value.ToString("yyyy-MM-dd HH:mm") + " " + (item.UseDay ?? 0) + "天", TripDate = item.TripSTime.Value.ToString("yyyy-MM-dd HH:mm") + " " + ((item.UseDay ?? 0) == Convert.ToDecimal(0.5) ? "半" : Convert.ToInt32(item.UseDay ?? 0).ToString()) + "日",
Address = orderModel.ShoppingAddress, Address = orderModel.ShoppingAddress,
item.Number item.Number
}; };
......
...@@ -74,7 +74,7 @@ namespace Mall.ThirdCore.Commom ...@@ -74,7 +74,7 @@ namespace Mall.ThirdCore.Commom
{ {
try try
{ {
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ConfigValue.json"); string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "appsettings.json");
//读取json文件 //读取json文件
using (StreamReader sr = new StreamReader(path)) using (StreamReader sr = new StreamReader(path))
......
...@@ -66,7 +66,7 @@ namespace Mall.ThirdCore.Message ...@@ -66,7 +66,7 @@ namespace Mall.ThirdCore.Message
IAcsClient acsClient = new DefaultAcsClient(profile); IAcsClient acsClient = new DefaultAcsClient(profile);
//必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式 //必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式
request.PhoneNumbers = obj["phoneNumber"].ToString(); request.PhoneNumbers = obj["phoneNumber"].ToString();
request.SignName = aliSms["signName"].ToString(); request.SignName = "印象之旅"; //aliSms["signName"].ToString();
//必填:短信模板-可在短信控制台中找到 //必填:短信模板-可在短信控制台中找到
request.TemplateCode = obj["templateCode"].ToString(); request.TemplateCode = obj["templateCode"].ToString();
//可选:模板中的变量替换JSON串,如模板内容为"您的验证码为${code}"时,此处的值为 //可选:模板中的变量替换JSON串,如模板内容为"您的验证码为${code}"时,此处的值为
......
...@@ -346,6 +346,22 @@ namespace Mall.WebApi.Controllers.Product ...@@ -346,6 +346,22 @@ namespace Mall.WebApi.Controllers.Product
return ApiResult.Success("", Robj); return ApiResult.Success("", Robj);
} }
/// <summary>
/// 获取提前预约天数
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetGuideCarInfoForPagePath(object requestMsg)
{
var req = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
var model = guideCarModule.GetGuideCarInfo(req.TenantId, req.MallBaseId);
return ApiResult.Success("", new
{
model.PagePath
});
}
/// <summary> /// <summary>
/// 获取车辆分类下拉 /// 获取车辆分类下拉
......
...@@ -252,7 +252,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -252,7 +252,8 @@ namespace Mall.WebApi.Controllers.MallBase
y.Final_Price, y.Final_Price,
y.Number, y.Number,
y.IsComment, y.IsComment,
y.FreeShippingRemarks y.FreeShippingRemarks,
InsuranceMoney = y.InsuranceMoney ?? 0
}), }),
x.OrderStatus, x.OrderStatus,
OrderStatusName = x.OrderStatus.GetEnumName(), OrderStatusName = x.OrderStatus.GetEnumName(),
...@@ -534,7 +535,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -534,7 +535,7 @@ namespace Mall.WebApi.Controllers.MallBase
} }
if (string.IsNullOrEmpty(demodel.ShoppingAddress)) if (string.IsNullOrEmpty(demodel.ShoppingAddress))
{ {
return ApiResult.ParamIsNull("接送地址地址不能为空"); return ApiResult.ParamIsNull("接送地址不能为空");
} }
if (!demodel.TripSTime.HasValue) if (!demodel.TripSTime.HasValue)
{ {
...@@ -584,6 +585,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -584,6 +585,7 @@ namespace Mall.WebApi.Controllers.MallBase
demodel.UserId = userInfo.UserId; demodel.UserId = userInfo.UserId;
demodel.SmallShopsId = req.SmallShopsId; demodel.SmallShopsId = req.SmallShopsId;
demodel.OrderClassify = 1; demodel.OrderClassify = 1;
demodel.DestinationAddress ??= "";
#endregion #endregion
return orderModule.SetAppletSDGoodsOrderInfo(demodel); return orderModule.SetAppletSDGoodsOrderInfo(demodel);
......
...@@ -132,6 +132,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -132,6 +132,8 @@ namespace Mall.WebApi.Controllers.MallBase
y.YFMoney, y.YFMoney,
y.PayMoney, y.PayMoney,
CouponMoney = y.CouponMoney ?? 0, CouponMoney = y.CouponMoney ?? 0,
InsuranceMoney = y.InsuranceMoney ?? 0,
InsuranceCostMoney = y.InsuranceCostMoney ?? 0,
IntegralMoney = y.IntegralMoney ?? 0, IntegralMoney = y.IntegralMoney ?? 0,
IntegralNumber = y.IntegralNumber ?? 0, IntegralNumber = y.IntegralNumber ?? 0,
SFinanceList = y.FinanceList.Where(z => z.Type == 1).Select(z => new SFinanceList = y.FinanceList.Where(z => z.Type == 1).Select(z => new
......
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
"Microsoft.Hosting.Lifetime": "Information" "Microsoft.Hosting.Lifetime": "Information"
} }
}, },
"AliSms": {
"signName": "印象之旅",
"accessKeyId": "LTAIwE7l9dImZSa3",
"accessKeySecret": "j47Ajn0d0WzUCIX8Biyj3P2r8QDltI"
},
"JwtSecretKey": "@VIITTOREBORN*2018", "JwtSecretKey": "@VIITTOREBORN*2018",
"JwtExpirTime": 2592000, "JwtExpirTime": 2592000,
"ApiExpirTime": 2592000, "ApiExpirTime": 2592000,
......
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