| 1234567891011121314151617181920212223242526272829 |
- <?php
- namespace app\common\dao\profit;
- use app\common\dao\BaseDao;
- use app\common\model\profit\ProductPvModel;
- class ProductPvDao extends BaseDao
- {
- protected function getModel(): string
- {
- return ProductPvModel::class;
- }
- /**
- * @param $productId
- * @return mixed
- * 获取商品业绩
- */
- public function getData($productId = 0)
- {
- $where = [];
- if($productId != 0) {
- $where['product_id'] = $productId;
- }
- return $this->getModel()::getDB()->where($where)->column('pv','product_id');
- }
- }
|