* Change function commitResult after code review.

This commit is contained in:
dingguodong
2021-08-18 14:52:15 +08:00
parent 0571865a7b
commit e9887b9976
+4 -1
View File
@@ -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')));