quanwei
2025-11-28 3ea53e61cc23fdb3ddf8b38a199ca60a6da8c407
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
 
namespace app\api\model\branch;
 
use app\common\exception\BaseException;
use app\common\model\branch\ActivityProduct as ActivityProductModel;
use app\common\model\branch\ActivityProductPrice as ActivityProductPriceModel;
 
/**
 * 活动商品模型
 */
class ActivityProduct extends ActivityProductModel
{
    /**
     * 隐藏字段
     * @var array
     */
    protected $hidden = [
        'is_delete',
        'app_id',
        'update_time'
    ];
 
    /**
     * 获取列表
     */
    public function getList($id)
    {
        $model = new ActivityProductPriceModel();
       return $model->getProductlist($id);
    }
 
    /**
     * 读取商品的详细规格数据
     */
    public function getSpec($product=null,$user=null)
    {
        $model = new ActivityProductPriceModel();
        return $product['spec_type'] == 20 ? $model->getManySpecData($product['spec_rel'], $product['sku']) : null;
    }
 
}