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
if (result != null && !string.IsNullOrEmpty(result))
{
JObject jObj = JObject.Parse(result);
miniAppUserCache.UserOpenId = jObj["openid"].ToString();
miniAppUserCache.UserUnoinid = jObj["unionid"].ToString();
miniAppUserCache.UserOpenId = jObj.GetStringValue("openid");
miniAppUserCache.UserUnoinid = jObj.GetStringValue("unionid");
}
}
catch (Exception ex)
......
......@@ -4561,7 +4561,31 @@ namespace Mall.Module.Product
goods_OrderRepository.DBSession.Commit();
//任务执行 订单记录当前用户的所有上级
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)
{
......
......@@ -2133,12 +2133,26 @@ namespace Mall.Module.Product
List<RB_Goods_Specification_Extend> SpecificationListToPrice = new List<RB_Goods_Specification_Extend>();
List<RB_Goods_SpecificationValue_Extend> SpecificationValueListToPrice = new List<RB_Goods_SpecificationValue_Extend>();
bool IsHaveSellingPriceZero = false;
//进阶小课堂商品价格可以为0 HK 2022-11-01新增条件
if (model.TenantId == 27)
{
IsHaveSellingPriceZero = true;
}
else
{
if (model.SpecificationPriceList.Where(x => x.SellingPrice > 0).Count() != model.SpecificationPriceList.Count())
{
//有数量为0的
IsHaveSellingPriceZero = true;
}
foreach (var item in model.SpecificationPriceList.Where(x => x.SellingPrice > 0))
}
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(':');
int Sort = Convert.ToInt32(ssarr[0]);
......
......@@ -111,7 +111,6 @@ namespace Mall.Repository.MarketingCenter
string allWhere = "";//通用
if (query != null)
{
if (query.TenantId > 0)
{
where += $" AND b.{nameof(RB_DiscountCoupon_Extend.TenantId)}={query.TenantId}";
......@@ -126,9 +125,7 @@ namespace Mall.Repository.MarketingCenter
}
if (query.ProductList != null && query.ProductList.Any())
{
List<int> allGoodsClass = new List<int>();
foreach (var item in query.ProductList)
{
if (!string.IsNullOrWhiteSpace(goodsWhere))
......@@ -148,7 +145,6 @@ namespace Mall.Repository.MarketingCenter
foreach (var item in goodsClassList)
{
decimal nowPrice = 0;
foreach (var classItem in query.ProductList)
{
if (classItem.GoodsClassId.Any(x => x == item.Key))
......@@ -165,10 +161,12 @@ namespace Mall.Repository.MarketingCenter
goodsClassWhere += $" (c.ProductId = {item.Key} and b.MinConsumePrice<= {nowPrice}) ";
}
}
if (!string.IsNullOrEmpty(goodsClassWhere))
{
goodsClassWhere = " and (" + goodsClassWhere + ")";
}
decimal allPrice = query.ProductList.Sum(x => x.GoodsPrice);
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
......
......@@ -540,19 +540,29 @@ namespace Mall.WebApi.Controllers.MallBase
}
item.Specification = JsonConvert.SerializeObject(item.SpecificationList);
}
demodel.TenantId = userInfo.TenantId;
//进阶小课堂价格可以为0 hk 2022-11-01修改
if (demodel.TenantId != 27)
{
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.OrderSource ??= UserSourceEnum.WeiXin;
#region 赋默认值
demodel.TenantId = userInfo.TenantId;
demodel.MallBaseId = userInfo.MallBaseId;
demodel.Country ??= 2;
demodel.OrderStatus = Common.Enum.Goods.OrderStatusEnum.NonPayment;
demodel.CreateDate = DateTime.Now;
demodel.Fee ??= 0;
demodel.FreightMoney ??= 0;
......@@ -579,7 +589,6 @@ namespace Mall.WebApi.Controllers.MallBase
demodel.IsOffline = 0;
}
}
#endregion
return orderModule.SetAppletGoodsOrderInfo(demodel);
......
......@@ -407,7 +407,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
if (carrierModule.ValidateCarrierName(query.CarrierName, userInfo.MallBaseId))
{
return ApiResult.Failed("该载体名称已存在,请选择绑定已有载体");
//return ApiResult.Failed("该载体名称已存在,请选择绑定已有载体");
}
}
......@@ -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 });
if (carrmodel.UserId > 0)
{
return ApiResult.Failed("该载体已被其他用户认证,请核实后再试");
//return ApiResult.Failed("该载体已被其他用户认证,请核实后再试");
}
}
#endregion
......
......@@ -106,6 +106,7 @@ namespace Mall.WebApi.Controllers.User
{
return ApiResult.ParamIsNull("请传递唯一码");
}
//查询用户默认分组
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