64 lines
1.6 KiB
PHP
64 lines
1.6 KiB
PHP
<?php
|
|
|
|
class PinganUsersCmmssnEntity
|
|
{
|
|
public $id;
|
|
public $money;
|
|
public $pinganUserId;
|
|
public $teamId;
|
|
public $depId;
|
|
public $areaId;
|
|
public $cfId;
|
|
public $cfType;
|
|
public $status;
|
|
public $createTime;
|
|
public $sourceId;
|
|
|
|
protected $ci;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->ci = &get_instance();
|
|
$this->ci->load->model('agent/pingan/pingan_users_cmmssn_model');
|
|
$this->ci->load->model('agent/pingan/pingan_users_model');
|
|
}
|
|
|
|
/**
|
|
* 获取类型中文
|
|
* @return string
|
|
*/
|
|
public function getTypeCn()
|
|
{
|
|
return Pingan_users_cmmssn_model::CF_TYPE_CN[$this->cfType];
|
|
}
|
|
|
|
/**
|
|
* @return mixed|string
|
|
*/
|
|
public function getFromCn()
|
|
{
|
|
$this->ci->load->model('agent/auto_product_model');
|
|
$result = '';
|
|
if ($this->sourceId) {
|
|
if (in_array($this->cfType, [Pingan_users_cmmssn_model::CF_TYPE_ORDER_OWN,
|
|
Pingan_users_cmmssn_model::CF_TYPE_ORDER_TEAM])) { //来源订单
|
|
$row = $this->ci->auto_product_model->get(['id' => $this->sourceId]);
|
|
$result = $row['title'] ? '产品-' . $row['title'] : '';
|
|
}
|
|
}
|
|
return $result;
|
|
}
|
|
|
|
/**
|
|
* 获取归属用户
|
|
* @return array
|
|
*/
|
|
public function getBelongUser()
|
|
{
|
|
$result = [];
|
|
if ($this->pinganUserId) {
|
|
$result = $this->ci->pingan_users_model->get(['id' => $this->pinganUserId]);
|
|
}
|
|
return $result;
|
|
}
|
|
} |