This commit is contained in:
2024-01-31 11:36:25 +07:00
parent caef156a05
commit 4561bd68d1
125 changed files with 9117 additions and 58 deletions

View File

@@ -0,0 +1,46 @@
<?php
namespace Hura8\Components\Marketing\Controller;
use Hura8\Components\Marketing\Model\CouponModel;
use Hura8\System\Controller\aEntityBaseController;
class bCouponController extends aEntityBaseController
{
protected $type_list = array(
'pro' => "Tặng sản phẩm",
'cash' => "Tặng tiền mặt",
'priceoff' => "Giảm giá %",
'other' => "Khác"
);
/* @var CouponModel $objCouponModel */
protected $objCouponModel;
public function __construct()
{
$this->objCouponModel = new CouponModel();
parent::__construct($this->objCouponModel);
}
public function getTotalProduct($coupon_id, array $condition = [])
{
return $this->objCouponModel->getTotalProduct($coupon_id, $condition);
}
public function getListProduct($coupon_id, array $condition = []) {
return $this->objCouponModel->getListProduct($coupon_id, $condition);
}
public function getTypeList() {
return $this->type_list;
}
}

View File

@@ -0,0 +1,26 @@
<?php
namespace Hura8\Components\Marketing\Controller;
use Hura8\Components\Marketing\Model\ProductFeedModel;
use Hura8\System\Controller\aEntityBaseController;
class bProductFeedController extends aEntityBaseController
{
protected $objProductFeedModel;
public function __construct()
{
$this->objProductFeedModel = new ProductFeedModel();
parent::__construct($this->objProductFeedModel);
}
public function getInfoByPublicId($public_id)
{
return $this->objProductFeedModel->getInfoByPublicId($public_id);
}
}