Commit 208134d3 authored by liudong1993's avatar liudong1993

返佣

parent f12257b9
......@@ -85,7 +85,7 @@ namespace Mall.Common.Enum
/// <summary>
/// 导游通知
/// </summary>
[EnumField("SMS_201716853")]
[EnumField("SMS_201722097")]
GuideMsg =15
}
......
......@@ -21,6 +21,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public List<RB_Goods_TargetDate_Extend> TargetDateList { get; set; }
/// <summary>
/// 日期
/// </summary>
public List<string> TargetDateStrList { get; set; }
/// <summary>
/// 线路描述list
/// </summary>
public List<string> LineDescriptionList { get; set; }
......@@ -49,8 +53,10 @@ namespace Mall.Model.Extend.Product
/// 联系电话
/// </summary>
public string GuideTelephone { get; set; }
/// <summary>
/// 导游简介
/// </summary>
public string Introduction { get; set; }
/// <summary>
/// 头像
......@@ -66,7 +72,14 @@ namespace Mall.Model.Extend.Product
/// </summary>
public string CarColorName { get; set; }
/// <summary>
/// 车辆评分
/// </summary>
public decimal CarScore { get; set; }
/// <summary>
/// 车型号
/// </summary>
public string CarModel { get; set; }
/// <summary>
/// 车辆类型
/// </summary>
......
......@@ -1644,23 +1644,21 @@ namespace Mall.Module.Product
#region 司导商品
string SiteName = SiteRepository.GetGuideCarSiteList(new RB_GuideCar_Site_Extend() { ID = model.SiteId ?? 0 }).FirstOrDefault()?.SiteName ?? "";
var guideModel = GuideRepository.GetGuideCarGuideList(new RB_GuideCar_Guide_Extend() { ID = model.GuideId ?? 0 }).FirstOrDefault();
string GuideName = guideModel?.Name ?? "";
model.GuideName = guideModel?.Name ?? "";
model.GuidePhoto= guideModel?.GuidePhoto ?? "";
model.GuideScore = guideModel?.Score ?? 5;
model.Introduction = guideModel?.Introduction ?? "";
model.GuideWorkYears = guideModel?.WorkYears ?? 1;
var carModel = GuideCarRepository.GetGuideCarCarList(new RB_GuideCar_Car_Extend() { ID = model.GuideId ?? 0 }).FirstOrDefault();
string CarName = carModel?.Name ?? "";
string CarColorName = CarColorRepository.GetCarColorList(new RB_GuideCar_CarColor_Extend() { ID = model.CarColorId ?? 0 }).FirstOrDefault()?.ColorName ?? "";
decimal GuideScore = guideModel?.Score ?? 5;
decimal CarScore = carModel?.Score ?? 5;
model.CarColorName = CarColorRepository.GetCarColorList(new RB_GuideCar_CarColor_Extend() { ID = model.CarColorId ?? 0 }).FirstOrDefault()?.ColorName ?? "";
model.CarScore = carModel?.Score ?? 5;
model.CarModel = carModel?.CarType ?? "";
model.LineDescriptionList = new List<string>();
if (!string.IsNullOrEmpty(model.LineDescription) && model.LineDescription != "[]")
{
model.LineDescriptionList = JsonConvert.DeserializeObject<List<string>>(model.LineDescription);
}
//var targetList = goods_TargetDateRepository.GetList(new RB_Goods_TargetDate_Extend() { GoodsId = goodsId });
//if (model.AdvanceDay > 0) {
// DateTime Mindate = Convert.ToDateTime(DateTime.Now.AddDays(model.AdvanceDay ?? 0).ToString("yyyy-MM-dd"));
// targetList = targetList.Where(x => x.Date >= Mindate).ToList();
//}
#endregion
#region 返回参数
......@@ -1690,13 +1688,17 @@ namespace Mall.Module.Product
member_price = price_member_max,
site_name = SiteName,
site_id = model.SiteId,
guide_name = GuideName,
guide_name = model.GuideName,
guide_id = model.GuideId,
guide_score = GuideScore,
guide_photo = model.GuidePhoto,
guide_introduction = model.Introduction,
guide_workyears = model.GuideWorkYears,
guide_score = model.GuideScore,
car_name = CarName,
car_id = model.CarId,
car_score = CarScore,
carcolor_name = CarColorName,
car_score = model.CarScore,
carcolor_name = model.CarColorName,
car_model = model.CarModel,
carcolor_id = model.CarColorId,
car_number = model.CarNumber,
car_buyyear = model.CarBuyYear,
......
This diff is collapsed.
......@@ -1471,7 +1471,7 @@ GROUP BY od.GoodsId,o.OrderId
/// <returns></returns>
public List<RB_Goods_Order_Extend> GetCanReceivingOrderList(int day, int t, int m)
{
string sql = $@"SELECT OrderId,UserId,OrderNo,OrderSource,CouponsIds FROM rb_goods_order where TenantId ={t} and MallBaseId ={m} and `Status`=0 and OrderStatus =3 and DATE_ADD(DeliveryTime,INTERVAL {day} DAY) < '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}'";
string sql = $@"SELECT OrderId,UserId,OrderNo,OrderSource,CouponsIds FROM rb_goods_order where TenantId ={t} and MallBaseId ={m} and `Status`=0 and OrderStatus =3 and OrderClassify=0 and DATE_ADD(DeliveryTime,INTERVAL {day} DAY) < '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}'";
return Get<RB_Goods_Order_Extend>(sql).ToList();
}
#endregion
......
......@@ -560,12 +560,20 @@ namespace Mall.WebApi.Controllers.MallBase
demodel.IsSpell ??= 1;
demodel.AdvanceDay ??= 0;
if (demodel.TargetDateList != null && demodel.TargetDateList.Any()) {
//去除重复
if (demodel.TargetDateList.Count() != demodel.TargetDateList.Select(x => x.Date).Distinct().Count()) {
demodel.TargetDateList = new List<RB_Goods_TargetDate_Extend>();
if (demodel.TargetDateStrList != null && demodel.TargetDateStrList.Any()) {
if (demodel.TargetDateStrList.Count() != demodel.TargetDateStrList.Distinct().Count())
{
return ApiResult.ParamIsNull("可预定日期有重复");
}
foreach (var item in demodel.TargetDateStrList) {
demodel.TargetDateList.Add(new RB_Goods_TargetDate_Extend()
{
Date = Convert.ToDateTime(item)
});
}
}
if (demodel.Id > 0)
{
string vmsg = guideCarModule.ValidateGoodsTargetDate(demodel.Id, demodel.TargetDateList);
......
......@@ -1039,7 +1039,7 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.Failed();
}
bool flag = orderModule.SetSDOrderConfirm(OrderId, Type, req.EmpId);
bool flag = orderModule.SetSDOrderConfirm(OrderId, Type, req.EmpId, _accessor);
if (flag)
{
return ApiResult.Success();
......
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