diff --git a/app/admin/controller/store_product_price/StoreProductPriceController.php b/app/admin/controller/store_product_price/StoreProductPriceController.php index b67b98da..98ded405 100644 --- a/app/admin/controller/store_product_price/StoreProductPriceController.php +++ b/app/admin/controller/store_product_price/StoreProductPriceController.php @@ -5,7 +5,6 @@ namespace app\admin\controller\store_product_price; use app\admin\controller\BaseAdminController; use app\admin\lists\store_product_price\StoreProductPriceLists; -use app\admin\logic\store_finance_flow\StoreFinanceFlowLogic; use app\admin\logic\store_product_price\StoreProductPriceLogic; use app\admin\validate\store_product_price\StoreProductPriceValidate; diff --git a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php index 75579b13..2abca841 100644 --- a/app/admin/logic/beforehand_order/BeforehandOrderLogic.php +++ b/app/admin/logic/beforehand_order/BeforehandOrderLogic.php @@ -350,8 +350,15 @@ class BeforehandOrderLogic extends BaseLogic ]; if(!empty($params['order_type']) && $params['order_type']>0){ $data['order_type'] = $params['order_type']; + if(!empty($find['warehousing_id'])){ + WarehouseOrder::where(['id' => $find['warehousing_id']])->update(['order_type' => $params['order_type']]); + } + if(!empty($find['outbound_id'])){ + WarehouseOrder::where(['id' => $find['outbound_id']])->update(['order_type' => $params['order_type']]); + } } $find->save($data); + Db::commit(); return true; } catch (\Throwable $e) { diff --git a/app/admin/logic/inventory_transfer_order/InventoryTransferOrderLogic.php b/app/admin/logic/inventory_transfer_order/InventoryTransferOrderLogic.php index c9518b6f..cb6dbd1e 100644 --- a/app/admin/logic/inventory_transfer_order/InventoryTransferOrderLogic.php +++ b/app/admin/logic/inventory_transfer_order/InventoryTransferOrderLogic.php @@ -3,12 +3,10 @@ namespace app\admin\logic\inventory_transfer_order; -use app\admin\logic\product_source_link\ProductSourceLinkLogic; use app\admin\logic\product_source_link_info\ProductSourceLinkInfoLogic; use app\common\model\inventory_transfer_order\InventoryTransferOrder; use app\common\logic\BaseLogic; use app\common\model\inventory_transfer\InventoryTransfer; -use app\common\model\product_source_link_info\ProductSourceLinkInfo; use app\common\model\store_branch_product\StoreBranchProduct; use app\common\model\store_product\StoreProduct; use app\common\model\system_store\SystemStore; @@ -139,7 +137,6 @@ class InventoryTransferOrderLogic extends BaseLogic 'product_id' => $v['product_id'], ]); $productSourceLinkInfoLogic->transfer(); - } Db::commit(); return true; diff --git a/app/admin/logic/store_product/StoreProductLogic.php b/app/admin/logic/store_product/StoreProductLogic.php index e4ef4e35..7a78e02d 100644 --- a/app/admin/logic/store_product/StoreProductLogic.php +++ b/app/admin/logic/store_product/StoreProductLogic.php @@ -3,22 +3,18 @@ namespace app\admin\logic\store_product; use app\admin\logic\ActivityZoneLogic; -use app\admin\logic\warehouse_product\WarehouseProductLogic; use app\common\model\store_product\StoreProduct; use app\common\logic\BaseLogic; use app\common\model\store_branch_product\StoreBranchProduct; use app\common\model\store_branch_product_attr_value\StoreBranchProductAttrValue; use app\common\model\store_branch_product_exchange\StoreBranchProductExchange; -use app\common\model\store_category\StoreCategory; use app\common\model\store_product_attr_value\StoreProductAttrValue; use app\common\model\store_product_cate\StoreProductCate; use app\common\model\store_product_group_price\StoreProductGroupPrice; use app\common\model\store_product_unit\StoreProductUnit; use app\common\model\system_store\SystemStore; -use app\common\model\system_store_storage\SystemStoreStorage; use app\common\model\user\User; use app\common\model\warehouse_product_storege\WarehouseProductStorege; -use Illuminate\Support\Facades\Log; use support\exception\BusinessException; use think\facade\Db; use Webman\RedisQueue\Redis; diff --git a/app/admin/logic/store_product_price/StoreProductPriceLogic.php b/app/admin/logic/store_product_price/StoreProductPriceLogic.php index 2c0544e7..b3ffda41 100644 --- a/app/admin/logic/store_product_price/StoreProductPriceLogic.php +++ b/app/admin/logic/store_product_price/StoreProductPriceLogic.php @@ -5,7 +5,6 @@ namespace app\admin\logic\store_product_price; use app\admin\logic\product_source_link_info\ProductSourceLinkInfoLogic; use app\admin\service\ProductPriceService; -use app\common\model\product_source_link_info\ProductSourceLinkInfo; use app\common\model\store_product_group_price\StoreProductGroupPrice; use app\common\model\store_product_price\StoreProductPrice; use app\common\logic\BaseLogic; @@ -97,6 +96,10 @@ class StoreProductPriceLogic extends BaseLogic 'price_lv' => $params['price_lv'], 'price_config' => $params['price_config'], ]); + $productPrice = StoreProduct::where('id', $find['product_id'])->value('vip_price'); + if ($productPrice != $find['vip_price']) { + SqlChannelPriceLog($find['product_id'], 43, $productPrice, $find['vip_price']); + } StoreProduct::where('id', $find['product_id'])->update([ 'purchase' => $find['purchase'], 'cost' => $find['cost'], @@ -115,7 +118,6 @@ class StoreProductPriceLogic extends BaseLogic $productSourceLinkInfoLogic = new ProductSourceLinkInfoLogic(); $productSourceLinkInfoLogic->storeProductPrice = $find; $productSourceLinkInfoLogic->updateSupplyPrice(); - } Db::commit(); return true; @@ -175,6 +177,10 @@ class StoreProductPriceLogic extends BaseLogic $update['status'] = 1; } $find->save($update); + $productPrice = StoreProduct::where('id', $find['product_id'])->value('vip_price'); + if ($productPrice != $find['vip_price']) { + SqlChannelPriceLog($find['product_id'], 43, $productPrice, $find['vip_price']); + } StoreProduct::where('id', $find['product_id'])->update([ 'purchase' => $find['purchase'] ?? 0, 'cost' => $find['cost'] ?? 0, diff --git a/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php b/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php index 0ed8f680..a5e94a03 100644 --- a/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php +++ b/app/admin/logic/system_store_storage/SystemStoreStorageLogic.php @@ -2,12 +2,10 @@ namespace app\admin\logic\system_store_storage; -use app\admin\logic\product_source_link\ProductSourceLinkLogic; use app\admin\logic\product_source_link_info\ProductSourceLinkInfoLogic; use app\admin\logic\store_product\StoreProductLogic; use app\common\model\product_source_link_info\ProductSourceLinkInfo; use app\common\model\store_branch_product\StoreBranchProduct; -use app\common\model\store_branch_product_attr_value\StoreBranchProductAttrValue; use app\common\model\system_store_storage\SystemStoreStorage; use app\common\logic\BaseLogic; use app\common\model\store_product\StoreProduct; @@ -91,7 +89,6 @@ class SystemStoreStorageLogic extends BaseLogic 'types' => ProductSourceLinkInfo::TypeStoreIn, ]); $productSourceLinkInfoLogic->storeInStorage(); - } Db::commit(); return true; diff --git a/app/admin/logic/warehouse_product/WarehouseProductLogic.php b/app/admin/logic/warehouse_product/WarehouseProductLogic.php index b0def63d..e3acc8ca 100644 --- a/app/admin/logic/warehouse_product/WarehouseProductLogic.php +++ b/app/admin/logic/warehouse_product/WarehouseProductLogic.php @@ -3,22 +3,16 @@ namespace app\admin\logic\warehouse_product; use app\admin\logic\delivery_service\DeliveryServiceLogic; -use app\admin\logic\product_source_link\ProductSourceLinkLogic; use app\admin\logic\product_source_link_info\ProductSourceLinkInfoLogic; -use app\admin\logic\store_branch_product\StoreBranchProductLogic; -use app\admin\logic\store_product\StoreProductLogic; -use app\common\model\beforehand_order\BeforehandOrder; use app\common\model\product_source_link_info\ProductSourceLinkInfo; use app\common\model\PurchaseFunds; use app\common\model\warehouse_product\WarehouseProduct; use app\common\logic\BaseLogic; -use app\common\model\purchase_product_offer\PurchaseProductOffer; use app\common\model\store_branch_product\StoreBranchProduct; use app\common\model\store_product\StoreProduct; use app\common\model\system_store_storage\SystemStoreStorage; use app\common\model\warehouse_order\WarehouseOrder; use app\common\model\warehouse_product_storege\WarehouseProductStorege; -use support\Log; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; @@ -197,13 +191,6 @@ class WarehouseProductLogic extends BaseLogic $res = WarehouseProduct::create($data); SqlChannelLog('WarehouseProduct', $res->id, $params['nums'], $params['financial_pm'] == 1 ? 1 : -1, Request()->url(),$admin_id); -// ProductSourceLinkInfoLogic::outbound([ -// 'product' => $data, -// 'warehouse_id' => $params['warehouse_id'], -// 'store_id' => $data['store_id'], -// 'link_id' => $res['id'], -// ]); - $productSourceLinkInfoLogic = new ProductSourceLinkInfoLogic(); $productSourceLinkInfoLogic->warehouseProduct = $data; $productSourceLinkInfoLogic->setInfo([ diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 6395ee63..f9715e38 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -2,26 +2,19 @@ namespace app\common\logic; -use app\admin\logic\product_source_link\ProductSourceLinkLogic; use app\admin\logic\product_source_link_info\ProductSourceLinkInfoLogic; use app\admin\logic\store_product\StoreProductLogic; -use app\admin\logic\user_ship\UserShipLogic; use app\api\logic\order\OrderLogic; use app\common\enum\OrderEnum; use app\common\enum\PayEnum; -use app\common\enum\user\UserShipEnum; use app\common\enum\YesNoEnum; use app\common\logic\user_product_storage\UserProductStorageLogic; use app\common\model\Config; use app\common\model\dict\DictData; -use app\common\model\dict\DictType; -use app\common\model\finance\CapitalFlow; -use app\common\model\finance\PayNotifyLog; use app\common\model\pay\PayNotify; use app\common\model\product_source_link_info\ProductSourceLinkInfo; use app\common\model\store_branch_product\StoreBranchProduct; use app\common\model\store_cash_finance_flow\StoreCashFinanceFlow; -use app\common\model\store_finance_flow\StoreFinanceFlow; use app\common\model\store_order\StoreOrder; use app\common\model\store_order_cart_info\StoreOrderCartInfo; use app\common\model\store_product\StoreProduct; @@ -31,13 +24,8 @@ use app\common\model\user\User; use app\common\model\user\UserAddress; use app\common\model\user\UserAuth; use app\common\model\user\UserRecharge; -use app\common\model\user_ship\UserShip; use app\common\model\user_sign\UserSign; -use app\common\model\vip_flow\VipFlow; -use app\common\service\Curl; use app\common\service\PushService; -use app\common\service\xpyun\XpsdkPrintApi; -use app\Request; use support\exception\BusinessException; use support\Log; use think\facade\Db; @@ -657,7 +645,6 @@ class PayNotifyLogic extends BaseLogic 'types' => ProductSourceLinkInfo::TypeOrder, ]); $productSourceLinkInfoLogic->sale(); - } else { StoreProductLogic::ordinary(['id' => $v['product_id']], $v['store_id'], 0, $storeProduct); StoreBranchProduct::update([