shish 2 년 전
부모
커밋
f1b04d3531
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      biz-ghs/cp/classes/CpClass.php
  2. 4 0
      biz-ghs/product/classes/ProductClass.php

+ 1 - 1
biz-ghs/cp/classes/CpClass.php

@@ -24,7 +24,7 @@ class CpClass extends BaseClass
     {
         $ptCpId = $ptCp->id ?? 0;
         $mainId = $currentShop->mainId ?? 0;
-        $shopCp = CpClass::getByCondition(['ptCpId' => $ptCpId], true);
+        $shopCp = CpClass::getByCondition(['mainId' => $mainId, 'ptCpId' => $ptCpId], true);
         if (empty($shopCp)) {
             $ptCpClassId = $ptCp->classId ?? 0;
             $ptCpClass = PtCpClassClass::getById($ptCpClassId, true);

+ 4 - 0
biz-ghs/product/classes/ProductClass.php

@@ -75,6 +75,10 @@ class ProductClass extends BaseClass
         $staffId = $data['staffId'] ?? 0;
         $staffName = $data['staffName'] ?? '';
 
+        if (isset($respond->hasCpId) == false || $respond->hasCpId == 0) {
+            noticeUtil::push("mainId:" . $mainId . "建的花材【{$name}】没有关联产品", '15280215347');
+        }
+
         $ptItem = PtItemClass::getById($ptItemId, true);
         if (!empty($ptItem)) {
             $ptItem->useNum = 1;