|
@@ -4,6 +4,7 @@ namespace app\common\model;
|
|
|
|
|
|
|
|
use think\Model;
|
|
use think\Model;
|
|
|
use Exception;
|
|
use Exception;
|
|
|
|
|
+use Google\Service\Storage\Resource\Objects;
|
|
|
|
|
|
|
|
class ProductOrder extends Model
|
|
class ProductOrder extends Model
|
|
|
{
|
|
{
|
|
@@ -130,8 +131,9 @@ class ProductOrder extends Model
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//获取持有产品数量
|
|
//获取持有产品数量
|
|
|
- public static function getByOrderProductNum($productId, $num, $uid){
|
|
|
|
|
- if(empty($productId)) return [];
|
|
|
|
|
|
|
+ public static function getByOrderProductNum($productId, $num, $uid)
|
|
|
|
|
+ {
|
|
|
|
|
+ if(empty($productId)) return (object)[];
|
|
|
foreach ($productId as &$item) {
|
|
foreach ($productId as &$item) {
|
|
|
$item['num'] = $num;
|
|
$item['num'] = $num;
|
|
|
$count = self::getUserOrderNum($uid, $item['id']);
|
|
$count = self::getUserOrderNum($uid, $item['id']);
|