Commit 0093b91a authored by liudong1993's avatar liudong1993

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

parents 610ca82f 1ce7fb4d
...@@ -52,8 +52,8 @@ namespace Mall.Common.Plugin ...@@ -52,8 +52,8 @@ namespace Mall.Common.Plugin
if (result != null && !string.IsNullOrEmpty(result)) if (result != null && !string.IsNullOrEmpty(result))
{ {
JObject jObj = JObject.Parse(result); JObject jObj = JObject.Parse(result);
miniAppUserCache.UserOpenId = jObj["openid"].ToString(); miniAppUserCache.UserOpenId = jObj.GetStringValue("openid");
miniAppUserCache.UserUnoinid = jObj["unionid"].ToString(); miniAppUserCache.UserUnoinid = jObj.GetStringValue("unionid");
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -4561,7 +4561,31 @@ namespace Mall.Module.Product ...@@ -4561,7 +4561,31 @@ namespace Mall.Module.Product
goods_OrderRepository.DBSession.Commit(); goods_OrderRepository.DBSession.Commit();
//任务执行 订单记录当前用户的所有上级 //任务执行 订单记录当前用户的所有上级
Task.Run(() => SaveOrderUserAllParent(demodel.UserId ?? 0, OrderId)); Task.Run(() => SaveOrderUserAllParent(demodel.UserId ?? 0, OrderId));
return ApiResult.Success("", new { OrderId }); //进阶小课堂回调
if (demodel.TenantId == 27 && demodel.OrderStatus == OrderStatusEnum.Completed)
{
Task.Run(() =>
{
try
{
string url = Common.Config.JJSWAdminApi + "/api/Third/SynchronousMallOrder";
var postData =
new
{
Msg = new
{
OrderId = OrderId
}
};
string str = HttpHelper.HttpPost(url, Common.Plugin.JsonHelper.Serialize(postData));
}
catch
{
}
});
}
return ApiResult.Success("", new { OrderId,demodel.OrderStatus });
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -2133,12 +2133,26 @@ namespace Mall.Module.Product ...@@ -2133,12 +2133,26 @@ namespace Mall.Module.Product
List<RB_Goods_Specification_Extend> SpecificationListToPrice = new List<RB_Goods_Specification_Extend>(); List<RB_Goods_Specification_Extend> SpecificationListToPrice = new List<RB_Goods_Specification_Extend>();
List<RB_Goods_SpecificationValue_Extend> SpecificationValueListToPrice = new List<RB_Goods_SpecificationValue_Extend>(); List<RB_Goods_SpecificationValue_Extend> SpecificationValueListToPrice = new List<RB_Goods_SpecificationValue_Extend>();
bool IsHaveSellingPriceZero = false; bool IsHaveSellingPriceZero = false;
if (model.SpecificationPriceList.Where(x => x.SellingPrice > 0).Count() != model.SpecificationPriceList.Count()) //进阶小课堂商品价格可以为0 HK 2022-11-01新增条件
if (model.TenantId == 27)
{ {
//有数量为0的
IsHaveSellingPriceZero = true; IsHaveSellingPriceZero = true;
} }
foreach (var item in model.SpecificationPriceList.Where(x => x.SellingPrice > 0)) else
{
if (model.SpecificationPriceList.Where(x => x.SellingPrice > 0).Count() != model.SpecificationPriceList.Count())
{
//有数量为0的
IsHaveSellingPriceZero = true;
}
}
var tempList = model.SpecificationPriceList.Where(x => x.SellingPrice > 0);
//进阶小课堂商品价格可以为0 HK 2022-11-01新增条件
if (model.TenantId == 27)
{
tempList = model.SpecificationPriceList;
}
foreach (var item in tempList)
{ {
var ssarr = item.SpecificationSort.Split(':'); var ssarr = item.SpecificationSort.Split(':');
int Sort = Convert.ToInt32(ssarr[0]); int Sort = Convert.ToInt32(ssarr[0]);
......
...@@ -111,7 +111,6 @@ namespace Mall.Repository.MarketingCenter ...@@ -111,7 +111,6 @@ namespace Mall.Repository.MarketingCenter
string allWhere = "";//通用 string allWhere = "";//通用
if (query != null) if (query != null)
{ {
if (query.TenantId > 0) if (query.TenantId > 0)
{ {
where += $" AND b.{nameof(RB_DiscountCoupon_Extend.TenantId)}={query.TenantId}"; where += $" AND b.{nameof(RB_DiscountCoupon_Extend.TenantId)}={query.TenantId}";
...@@ -126,9 +125,7 @@ namespace Mall.Repository.MarketingCenter ...@@ -126,9 +125,7 @@ namespace Mall.Repository.MarketingCenter
} }
if (query.ProductList != null && query.ProductList.Any()) if (query.ProductList != null && query.ProductList.Any())
{ {
List<int> allGoodsClass = new List<int>(); List<int> allGoodsClass = new List<int>();
foreach (var item in query.ProductList) foreach (var item in query.ProductList)
{ {
if (!string.IsNullOrWhiteSpace(goodsWhere)) if (!string.IsNullOrWhiteSpace(goodsWhere))
...@@ -148,7 +145,6 @@ namespace Mall.Repository.MarketingCenter ...@@ -148,7 +145,6 @@ namespace Mall.Repository.MarketingCenter
foreach (var item in goodsClassList) foreach (var item in goodsClassList)
{ {
decimal nowPrice = 0; decimal nowPrice = 0;
foreach (var classItem in query.ProductList) foreach (var classItem in query.ProductList)
{ {
if (classItem.GoodsClassId.Any(x => x == item.Key)) if (classItem.GoodsClassId.Any(x => x == item.Key))
...@@ -165,10 +161,12 @@ namespace Mall.Repository.MarketingCenter ...@@ -165,10 +161,12 @@ namespace Mall.Repository.MarketingCenter
goodsClassWhere += $" (c.ProductId = {item.Key} and b.MinConsumePrice<= {nowPrice}) "; goodsClassWhere += $" (c.ProductId = {item.Key} and b.MinConsumePrice<= {nowPrice}) ";
} }
} }
goodsClassWhere = " and (" + goodsClassWhere + ")"; if (!string.IsNullOrEmpty(goodsClassWhere))
{
goodsClassWhere = " and (" + goodsClassWhere + ")";
}
decimal allPrice = query.ProductList.Sum(x => x.GoodsPrice); decimal allPrice = query.ProductList.Sum(x => x.GoodsPrice);
allWhere = $" and b.MinConsumePrice<= {allPrice} "; allWhere = $" and b.MinConsumePrice<= {allPrice} ";
} }
} }
string sql = @$" SELECT a.ID as MemberCouponId,a.UserId,b.`Name`,b.CouponType,b.UseType,b.MinConsumePrice,b.DiscountsPrice,b.MaxDiscountsPrice,b.`Describe`,a.StartDate,a.EndDate,b.ID from rb_member_discountcoupon as a string sql = @$" SELECT a.ID as MemberCouponId,a.UserId,b.`Name`,b.CouponType,b.UseType,b.MinConsumePrice,b.DiscountsPrice,b.MaxDiscountsPrice,b.`Describe`,a.StartDate,a.EndDate,b.ID from rb_member_discountcoupon as a
......
...@@ -540,19 +540,29 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -540,19 +540,29 @@ namespace Mall.WebApi.Controllers.MallBase
} }
item.Specification = JsonConvert.SerializeObject(item.SpecificationList); item.Specification = JsonConvert.SerializeObject(item.SpecificationList);
} }
demodel.TenantId = userInfo.TenantId;
if (((demodel.Income ?? 0) + ((demodel.DepositMoney))) <= 0) //进阶小课堂价格可以为0 hk 2022-11-01修改
if (demodel.TenantId != 27)
{ {
return ApiResult.ParamIsNull("订单金额不正确"); if (((demodel.Income ?? 0) + ((demodel.DepositMoney))) <= 0)
{
return ApiResult.ParamIsNull("订单金额不正确");
}
} }
demodel.OrderStatus = Common.Enum.Goods.OrderStatusEnum.NonPayment;
//进阶小课堂价格可以为0
if (demodel.TenantId == 27 && demodel.Income == 0)
{
demodel.OrderStatus = OrderStatusEnum.Completed;
}
demodel.BuyerMessage ??= "";//买家留言 demodel.BuyerMessage ??= "";//买家留言
demodel.OrderSource ??= UserSourceEnum.WeiXin; demodel.OrderSource ??= UserSourceEnum.WeiXin;
#region 赋默认值 #region 赋默认值
demodel.TenantId = userInfo.TenantId;
demodel.MallBaseId = userInfo.MallBaseId; demodel.MallBaseId = userInfo.MallBaseId;
demodel.Country ??= 2; demodel.Country ??= 2;
demodel.OrderStatus = Common.Enum.Goods.OrderStatusEnum.NonPayment;
demodel.CreateDate = DateTime.Now; demodel.CreateDate = DateTime.Now;
demodel.Fee ??= 0; demodel.Fee ??= 0;
demodel.FreightMoney ??= 0; demodel.FreightMoney ??= 0;
...@@ -579,7 +589,6 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -579,7 +589,6 @@ namespace Mall.WebApi.Controllers.MallBase
demodel.IsOffline = 0; demodel.IsOffline = 0;
} }
} }
#endregion #endregion
return orderModule.SetAppletGoodsOrderInfo(demodel); return orderModule.SetAppletGoodsOrderInfo(demodel);
......
...@@ -407,7 +407,7 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -407,7 +407,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
{ {
if (carrierModule.ValidateCarrierName(query.CarrierName, userInfo.MallBaseId)) if (carrierModule.ValidateCarrierName(query.CarrierName, userInfo.MallBaseId))
{ {
return ApiResult.Failed("该载体名称已存在,请选择绑定已有载体"); //return ApiResult.Failed("该载体名称已存在,请选择绑定已有载体");
} }
} }
...@@ -418,7 +418,7 @@ namespace Mall.WebApi.Controllers.TradePavilion ...@@ -418,7 +418,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
var carrmodel = carrierModule.GetCarrierModel(new RB_Carrier_Extend { ID = query.ExistCarrierId, TenantId = query.TenantId, MallBaseId = query.MallBaseId }); var carrmodel = carrierModule.GetCarrierModel(new RB_Carrier_Extend { ID = query.ExistCarrierId, TenantId = query.TenantId, MallBaseId = query.MallBaseId });
if (carrmodel.UserId > 0) if (carrmodel.UserId > 0)
{ {
return ApiResult.Failed("该载体已被其他用户认证,请核实后再试"); //return ApiResult.Failed("该载体已被其他用户认证,请核实后再试");
} }
} }
#endregion #endregion
......
...@@ -106,6 +106,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -106,6 +106,7 @@ namespace Mall.WebApi.Controllers.User
{ {
return ApiResult.ParamIsNull("请传递唯一码"); return ApiResult.ParamIsNull("请传递唯一码");
} }
//查询用户默认分组 //查询用户默认分组
var groupModel = memberGroupModule.GetMemberGroupListModule(new RB_Member_Group_Extend() var groupModel = memberGroupModule.GetMemberGroupListModule(new RB_Member_Group_Extend()
{ {
......
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