Commission.php
766 Bytes
<?php
defined('IN_IA') or exit('Access Denied');
require_once IA_ROOT . '/addons/zh_cjdianc/inc/func/Http.php';
require_once IA_ROOT . '/addons/zh_cjdianc/inc/config.php';
class Commission
{
const STATUS_HOLD = 1; //1冻结,,
const STATUS_AVAILABLE = 2; //2有效
const STATUS_INVALID = 3; //3无效
/**
* 冻结订单佣金
* @param $order_id
*/
static function invalidOrderFee($order_id)
{
$res = pdo_update('cjdc_earnings', array('state' => self::STATUS_INVALID), array('order_id' => $order_id));
return $res;
}
/**
* @param $order_id
* @return bool
*/
static function availableOrderFee($order_id)
{
$res = pdo_update('cjdc_earnings', array('state' => self::STATUS_AVAILABLE), array('order_id' => $order_id));
return $res;
}
}