| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace Util\Common;
- use JinDouYun\Dao\Customer\DCustomer;
- use JinDouYun\Cache\CustomerCache;
- class PartnerTools{
- private $dbCustomer;
- private $enterpriseId;
- private $cutTable = 1;//客户按照企业id分表
- public function __construct($enterpriseId){
- $this->enterpriseId = $enterpriseId;
- $this->dbCustomer = new DCustomer('default');
- $tableName = $this->dbCustomer->getTableName($this->dbCustomer->get_Table(), $this->enterpriseId, $this->cutTable);
- $this->dbCustomer->setTable($tableName);
- }
-
-
- public function setPushCustomer($parentId=0,$childId=0){
- if($parentId == 0 || $childId == 0 || $parentId == $childId){
- return false;
- }
- $childData = $this->dbCustomer->get($childId);
- var_dump($childData);
- if (empty($childData)) {
- return false;
- }
-
- return true;
-
- // $beginStatus = $this->dbCustomer->beginTransaction();
- // $this->dbCustomer->rollBack();
- // $beginStatus && $this->dbCustomer->commit();
-
-
-
- }
- public function delCustomerCache(){
- $enterpriseId = 0;
- $customerId = 0;
- $userCenterId = 0;
- $objCustomerCache = new CustomerCache();
- $objCustomerCache->delCustomerData($enterpriseId, $customerId);
- $objCustomerCache->delCustomerUserData($enterpriseId, $userCenterId);
- }
- }
|