From d7fec17e093788d71dcd89bb0d94030a9f6ecfae Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期一, 13 五月 2024 14:25:38 +0800
Subject: [PATCH] 调整显示顺序
---
CoreCms.Net.Services/Good/CoreCmsGoodsServices.cs | 31 +++++++++++++++++++++++++++----
1 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/CoreCms.Net.Services/Good/CoreCmsGoodsServices.cs b/CoreCms.Net.Services/Good/CoreCmsGoodsServices.cs
index d3f6a20..3841395 100644
--- a/CoreCms.Net.Services/Good/CoreCmsGoodsServices.cs
+++ b/CoreCms.Net.Services/Good/CoreCmsGoodsServices.cs
@@ -1,7 +1,7 @@
/***********************************************************************
- * Project: CoreCms
+ * Project: baifenBinfa
* ProjectName: 鐧惧垎鍏垫硶绠$悊绯荤粺
- * Web: hhtp://chuanyin.com
+ * Web: http://chuanyin.com
* Author:
* Email:
* CreateTime: 202403/02
@@ -19,6 +19,7 @@
using CoreCms.Net.IRepository;
using CoreCms.Net.IRepository.UnitOfWork;
using CoreCms.Net.IServices;
+using CoreCms.Net.IServices.baifenbingfa;
using CoreCms.Net.Loging;
using CoreCms.Net.Model.Entities;
using CoreCms.Net.Model.Entities.Expression;
@@ -53,6 +54,7 @@
private readonly ICoreCmsOrderItemServices _orderItemServices;
private readonly ICoreCmsUserServices _userServices;
private readonly ICoreCmsUserGradeServices _userGradeServices;
+ private readonly IBfbfComAPIService _bfbfComAPIService;
private readonly IServiceProvider _serviceProvider;
@@ -64,7 +66,7 @@
, ICoreCmsPromotionServices promotionServices
, ICoreCmsGoodsCollectionServices goodsCollectionServices
, ICoreCmsBrandServices brandServices
- , ICoreCmsOrderItemServices orderItemServices, ICoreCmsUserServices userServices, ICoreCmsUserGradeServices userGradeServices, IServiceProvider serviceProvider)
+ , ICoreCmsOrderItemServices orderItemServices, ICoreCmsUserServices userServices, ICoreCmsUserGradeServices userGradeServices, IServiceProvider serviceProvider, IBfbfComAPIService bfbfComAPIService)
{
this._dal = dal;
base.BaseDal = dal;
@@ -79,6 +81,8 @@
_userServices = userServices;
_userGradeServices = userGradeServices;
_serviceProvider = serviceProvider;
+ _bfbfComAPIService = bfbfComAPIService;
+
}
@@ -609,6 +613,8 @@
//鑾峰彇浼氬憳绾у埆浼樻儬浠�
//鑾峰彇浼氬憳绛夌骇浼樻儬浠锋牸浣撶郴
decimal gradePrice = 0;
+ //鐧惧垎鍏垫硶澧炲姞
+ bool IsDictionary = await _bfbfComAPIService.IsDictionary(userId);
if (userId > 0 && type == "goods")
{
//鑾峰彇鐢ㄦ埛淇℃伅
@@ -616,6 +622,8 @@
if (userInfo != null)
{
var goodsGrades = await _goodsGradeServices.QueryByClauseAsync(p => p.goodsId == good.id && p.gradeId == userInfo.grade);
+ //瀵规帴缁忛攢鍟嗕細鍛�
+
if (goodsGrades != null)
{
gradePrice = goodsGrades.gradePrice;
@@ -818,9 +826,16 @@
item.goods_id = good.id.ToString();
item.goods_name = good.name;
item.image = o.images;
+ if(!IsDictionary)
item.price = o.price - gradePrice; //鍑忓幓浼氬憳绛夌骇浠锋牸
+ else
+ item.price = o.distributionPrice;
item.sku_name_arr = o.spesDesc.Split(",").Select(s => s.Split(":")[1]).ToList();
item.stock = o.stock;
+ item.cutMoney = o.cutMoney;
+ item.distributionCutMoney = o.distributionCutMoney;
+ item.mktPrice = o.mktprice;
+ item.selPrice = o.price;
if (type == GlobalEnumVars.OrderType.PinTuan.ToString().ToLowerInvariant())
{
if (isMaxPinTuanGoodsNums)
@@ -866,9 +881,17 @@
item.goods_id = good.id.ToString();
item.goods_name = good.name;
item.image = o.images;
- item.price = o.price - gradePrice; //鍑忓幓浼氬憳绛夌骇浠锋牸
+ if (!IsDictionary)
+ item.price = o.price - gradePrice; //鍑忓幓浼氬憳绛夌骇浠锋牸
+ else
+ item.price = o.distributionPrice;
+ //item.price = o.price - gradePrice; //鍑忓幓浼氬憳绛夌骇浠锋牸
item.sku_name_arr = new List<string> { "榛樿" };
item.stock = o.stock;
+ item.cutMoney = o.cutMoney;
+ item.distributionCutMoney = o.distributionCutMoney;
+ item.mktPrice = o.mktprice;
+ item.selPrice = o.price;
if (type == GlobalEnumVars.OrderType.PinTuan.ToString().ToLowerInvariant())
{
if (isMaxPinTuanGoodsNums)
--
Gitblit v1.9.1