From e9887b9976086423eb74e63efafa90363c212d4e Mon Sep 17 00:00:00 2001 From: dingguodong Date: Wed, 18 Aug 2021 14:52:15 +0800 Subject: [PATCH] * Change function commitResult after code review. --- module/ci/control.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/ci/control.php b/module/ci/control.php index d06c715240..e38d453fc4 100644 --- a/module/ci/control.php +++ b/module/ci/control.php @@ -123,7 +123,10 @@ class ci extends control $caseResult = $post->funcResult; $firstCase = array_shift($caseResult); $productID = $firstCase->productId; - if(empty($productID) and !empty($firstCase->id)) $productID = $this->dao->select('product')->from(TABLE_CASE)->where('id')->eq((int)$firstCase->id)->fetch('product'); + if(empty($productID) and !empty($firstCase->id)) + { + $productID = $this->dao->findById($firstCase->id)->from(TABLE_CASE)->fetch('product'); + } } if(empty($productID)) die(json_encode(array('result' => 'fail', 'message' => 'productID is not found')));