栏目分类
热点资讯
来吧成人综合
你的位置:勾引twitter > 来吧成人综合 > 文爱 porn 华为云就业器Flexus X搭建悟空crm解决系统——助力企业云上解决
文爱 porn 华为云就业器Flexus X搭建悟空crm解决系统——助力企业云上解决

发布日期:2025-01-01 00:49    点击次数:114

文爱 porn 华为云就业器Flexus X搭建悟空crm解决系统——助力企业云上解决

1、为什么咱们企业会遴荐Flexus云就业器X实例来部署我方的CRM解决系统?

因为基于华为云Flexus X实例搭建CRM解决平台,不错放心濒临企业里面少顷万变的业务压力变化

2、华为云就业器Flexus X决策及上风:

伸开剩余96%

纯真伸缩

搭配弹性伸缩就业AS及负载平衡就业ELB,不错结束基于业务负载的快速弹缩,放心吩咐多变的市集业务压力

数据可靠

搭配华为云数据库就业,存储电商捏久化数据,使用肤浅,可靠性高

安全可靠

搭配WAF、DDoS等网罗安全就业,结束对电买卖务全目的安全驻扎,裁减黑客入侵风险

3、在浮屠里面装配必要的环境PHP7.3、Mysql5.6+、NGINX

4、装配搭建好,参预CRM解决界面:

点击添加客户信息的技术就会发现,领导:

APP Referer校验失败。请查验该ak成立的白名单与探询总计的域名是否一致。细目稽查:http://lbsyun.baidu.com/apiconsole/key#

这是由于百度舆图api接口莫得竖立好导致的问题出现

当竖立好舆图参数之后,就不错进行地区定位和使用附件客户等功能了

5、客户细目功能模块代码

public function read()

{

$customerModel = model('Customer');

$cutomerLogic = new CustomerLogic();

$param = $this->param;

$userInfo = $this->userInfo;

$data = $customerModel->getDataById($param['id'], $userInfo['id']);

if (!$data) {

return resultArray(['error' => $customerModel->getError()]);

高中生自慰

}

//数据权限判断

$userModel = new \app\admin\model\User();

$auth_user_ids = $userModel->getUserByPer('crm', 'customer', 'read');

//读权限

$roPre = $userModel->rwPre($userInfo['id'], $data['ro_user_id'], $data['rw_user_id'], 'read');

$rwPre = $userModel->rwPre($userInfo['id'],三月系列 $data['ro_user_id'], $data['rw_user_id'], 'update');

//判断是否客户池数据

$wherePool = $customerModel->getWhereByPool();

$resPool = db('crm_customer')->alias('customer')->where(['customer_id' => $param['id']])->where($wherePool)->find();

if (!$resPool && !in_array($data['owner_user_id'], $auth_user_ids) && !$roPre && !$rwPre) {

$authData['dataAuth'] = (int)0;

return resultArray(['data' => $authData]);

}

return resultArray(['data' => $data]);

}

6、裁剪客户功能模块代码

public function update()

{

$customerModel = model('Customer');

$param = $this->param;

$userInfo = $this->userInfo;

//数据细目

$data = $customerModel->getDataById($param['id']);

if (!$data) {

return resultArray(['error' => $customerModel->getError()]);

}

$param['user_id'] = $userInfo['id'];

if ($customerModel->updateDataById($param, $param['id'])) {

return resultArray(['data' => '裁剪得手']);

} else {

return resultArray(['error' => $customerModel->getError()]);

}

}

7、删除客户功能模块代码

public function delete()

{

$param = $this->param;

$user = new ApiCommon();

$userInfo = $user->userInfo;

// 是否客户池

if ($param['isSeas'] == 1) {

$permission = checkPerByAction('crm', 'customer', 'poolDelete');

} else {

$permission = checkPerByAction('crm', 'customer', 'delete');

}

if ($permission == false) {

return resultArray(['error' => '无权操作']);

}

$customerModel = model('Customer');

$userModel = new \app\admin\model\User();

$recordModel = new \app\admin\model\Record();

$fileModel = new \app\admin\model\File();

$actionRecordModel = new \app\admin\model\ActionRecord();

if (!is_array($param['id'])) {

$customer_id[] = $param['id'];

} else {

$customer_id = $param['id'];

}

$delIds = [];

$errorMessage = [];

//数据权限判断

$auth_user_ids = $userModel->getUserByPer('crm', 'customer', 'delete');

//判断是否客户池数据(客户池数据惟有解决员不错删)

$adminId = $userModel->getAdminId();

$wherePool = $customerModel->getWhereByPool();

foreach ($customer_id as $k => $v) {

$isDel = true;

//数据细目

$data = db('crm_customer')->where(['customer_id' => $v])->find();

if (!$data) {

$isDel = false;

$errorMessage[] = 'id为' . $v . '的客户删除失败,作假原因:' . $customerModel->getError();

}

$resPool = db('crm_customer')->alias('customer')->where(['customer_id' => $v])->where($wherePool)->find();

if (!$resPool && !in_array($data['owner_user_id'], $auth_user_ids) && $isDel) {

$isDel = false;

$errorMessage[] = '无权操作';

}

// 公海 (原逻辑,公海仅允许解决员删除,修改为授权,不再为止)

// if ($resPool && !in_array($data['owner_user_id'],$adminId)) {

// $isDel = false;

// $errorMessage[] = '称呼为'.$data['name'].'的客户删除失败,作假原因:无权操作';

// }

//有商机、条约、关系东谈主则不成删除

if ($isDel) {

$resBusiness = db('crm_business')->where(['customer_id' => $v])->find();

if ($resBusiness) {

$isDel = false;

$errorMessage[] = '客户下存在商机,不成删除';

}

}

if ($isDel) {

$resContacts = db('crm_contacts')->where(['customer_id' => $v])->find();

if ($resContacts) {

$isDel = false;

// $errorMessage[] = '称呼为' . $data['name'] . '的客户删除失败,作假原因:客户下存在关系东谈主,不成删除';

$errorMessage[] = '客户下存在关系东谈主,不成删除';

}

}

if ($isDel) {

$resContract = db('crm_contract')->where(['customer_id' => $v])->find();

if ($resContract) {

$isDel = false;

$errorMessage[] = '客户下存在条约,不成删除';

}

}

if ($isDel) {

$delIds[] = $v;

}

}

$dataInfo = $customerModel->where('customer_id', ['in', $delIds])->select();

if ($delIds) {

$delRes = $customerModel->delDatas($delIds);

if (!$delRes) {

return resultArray(['error' => $customerModel->getError()]);

}

// 删除客户膨胀数据

db('crm_customer_data')->whereIn('customer_id', $delIds)->delete();

// 删除跟进纪录

$recordModel->delDataByTypes(2, $delIds);

// 删除关联附件

$fileModel->delRFileByModule('crm_customer', $delIds);

// 删除关联操作纪录

$actionRecordModel->delDataById(['types' => 'crm_customer', 'action_id' => $delIds]);

foreach ($dataInfo as $k => $v) {

RecordActionLog($userInfo['id'], 'crm_customer', 'delete', $v['name'], '', '', '删除了客户:' . $v['name']);

}

}

if ($errorMessage) {

return resultArray(['error' => $errorMessage]);

} else {

return resultArray(['data' => '删除得手']);

}

}

8、客户信息细目界面

9、客户回荡功能

public function transfer()

{

$param = $this->param;

$userInfo = $this->userInfo;

$customerModel = model('Customer');

$businessModel = model('Business');

$contractModel = model('Contract');

$contactsModel = model('Contacts');

$settingModel = model('Setting');

$customerConfigModel = model('CustomerConfig');

$userModel = new \app\admin\model\User();

if (!$param['owner_user_id']) {

return resultArray(['error' => '变更精采东谈主不成为空']);

}

if (!$param['customer_id'] 文爱 porn

巨型玩具与肛门玩到脱肛 情色中心 欧美性爱 偷偷撸影院 亚洲 欧美 另类 来吧成人综合 中文娱乐网