c
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user