LiveOrderController.class.php
962 Bytes
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
<?php
/**
* Created by PhpStorm.
* User: yingcai
* Date: 2018/2/1
* Time: 下午7:07
*/
namespace Apicp\Controller\LiveOrder;
use Common\Common\Constant;
use Common\Common\Order;
class LiveOrderController extends AbstractController
{
/**
* LiveOrder
* @author houyingcai
* @desc 企业是否购买过员圈直播接口
* @return array|bool 购买规则
array(
'is_live_order' => 1, // 企业是否购买了直播(1=是,2=否)
)
*/
public function Index_post()
{
$orderServ = &Order::instance();
// 企业是否购买过员圈直播
$result = $orderServ->fetchOrderLiveList(['ordType' => Constant::ORDER_TYPE_PRODUCT_LIVE]);
$isLiveOrder = $result['total'] ? Constant::LIVE_BUY_TRUE : Constant::LIVE_BUY_FALSE;
$this->_result = [
'is_live_order' => $isLiveOrder,
];
return true;
}
}