国产精品久久久aaaa,日日干夜夜操天天插,亚洲乱熟女香蕉一区二区三区少妇,99精品国产高清一区二区三区,国产成人精品一区二区色戒,久久久国产精品成人免费,亚洲精品毛片久久久久,99久久婷婷国产综合精品电影,国产一区二区三区任你鲁

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

華為云服務(wù)器 Flexus X 搭建悟空 crm 管理系統(tǒng)——助力企業(yè)云上管理(解決 APP Referer 校驗失敗問題)

jf_81200783 ? 來源:jf_81200783 ? 作者:jf_81200783 ? 2025-02-06 15:43 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

1、為什么我們企業(yè)會選擇 Flexus 云服務(wù)器 X 實例來部署自己的 CRM 管理系統(tǒng)?

wKgZO2dwGomAUF-1AAQMm_QEWyA758.png

wKgZPGdwGomAftakAAPEYgUDXwE595.png

wKgZO2dwGomANR6vAAP2yoOokos952.png

因為基于華為云 Flexus X 實例搭建 CRM 管理平臺,可以從容面對企業(yè)內(nèi)部瞬息萬變的業(yè)務(wù)壓力變化

2、華為云服務(wù)器 Flexus X 方案及優(yōu)勢:

靈活伸縮

搭配彈性伸縮服務(wù) AS 及負(fù)載均衡服務(wù) ELB,可以實現(xiàn)基于業(yè)務(wù)負(fù)載的快速彈縮,從容應(yīng)對多變的市場業(yè)務(wù)壓力

數(shù)據(jù)可靠

搭配華為云數(shù)據(jù)庫服務(wù),存儲電商持久化數(shù)據(jù),使用方便,可靠性高

安全可靠

搭配 WAF、DDoS 等網(wǎng)絡(luò)安全服務(wù),實現(xiàn)對電商業(yè)務(wù)全方位安全防護(hù),降低黑客入侵風(fēng)險

wKgZPGdwGoqAMKRsAACHHBuyeu0501.png

wKgZO2dwGoqAGTsUAAHW1WAy7PQ120.png

3、在寶塔里面安裝必要的環(huán)境 PHP7.3、Mysql5.6+、NGINX

wKgZPGdwGouAX7NeAAQYQfEOzu8911.png

wKgZO2dwGouAXmrEAAHV-f13P2Q168.png

4、安裝搭建好,進(jìn)入 CRM 管理界面:

wKgZPGdwGoyACKLoAAVdJSMEij0037.png

點擊添加客戶信息的時候就會發(fā)現(xiàn),提示:

APP Referer 校驗失敗。請檢查該 ak 設(shè)置的白名單與訪問所有的域名是否一致。詳情查看:http://lbsyun.baidu.com/apiconsole/key#

這是由于百度地圖 api 接口沒有配置好導(dǎo)致的問題出現(xiàn)

wKgZO2dwGoyAKkCYAAGNZlsunXE268.png

當(dāng)配置好地圖參數(shù)之后,就可以進(jìn)行地區(qū)定位和使用附件客戶等功能了

wKgZPGdwGoyAIaI2AAH_iklgCb0230.png

wKgZO2dwGo2AIiscAAKm5ZvT4b8354.png

wKgZPGdwGo2AYEvnAAdWGbi3_ik512.png

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()]);

}

//數(shù)據(jù)權(quán)限判斷

$userModel = new appadminmodelUser();

authu?seri?ds=userModel->getUserByPer('crm', 'customer', 'read');

//讀權(quán)限

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');

//判斷是否客戶池數(shù)據(jù)

wherePool=customerModel->getWhereByPool();

resPool=db(′crmc?ustomer′)?>alias(′customer′)?>where([′customeri?d′=>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;

//數(shù)據(jù)詳情

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

if (!$data) {

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

}

param[′useri?d′]=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' => '無權(quán)操作']);

}

$customerModel = model('Customer');

$userModel = new appadminmodelUser();

$recordModel = new appadminmodelRecord();

$fileModel = new appadminmodelFile();

$actionRecordModel = new appadminmodelActionRecord();

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

customeri?d[]=param['id'];

} else {

customeri?d=param['id'];

}

$delIds = [];

$errorMessage = [];

//數(shù)據(jù)權(quán)限判斷

authu?seri?ds=userModel->getUserByPer('crm', 'customer', 'delete');

//判斷是否客戶池數(shù)據(jù)(客戶池數(shù)據(jù)只有管理員可以刪)

adminId=userModel->getAdminId();

wherePool=customerModel->getWhereByPool();

foreach (customeri?dask => $v) {

$isDel = true;

//數(shù)據(jù)詳情

data=db(′crmc?ustomer′)?>where([′customeri?d′=>v])->find();

if (!$data) {

$isDel = false;

errorMessage[]=′id為′.v . '的客戶刪除失敗,錯誤原因:' . $customerModel->getError();

}

resPool=db(′crmc?ustomer′)?>alias(′customer′)?>where([′customeri?d′=>v])->where($wherePool)->find();

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

$isDel = false;

$errorMessage[] = '無權(quán)操作';

}

// 公海 (原邏輯,公海僅允許管理員刪除,修改為授權(quán),不再限制)

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

// $isDel = false;

// errorMessage[]=′名稱為′.data['name'].'的客戶刪除失敗,錯誤原因:無權(quán)操作';

// }

//有商機(jī)、合同、聯(lián)系人則不能刪除

if ($isDel) {

resBusiness=db(′crmb?usiness′)?>where([′customeri?d′=>v])->find();

if ($resBusiness) {

$isDel = false;

$errorMessage[] = '客戶下存在商機(jī),不能刪除';

}

}

if ($isDel) {

resContacts=db(′crmc?ontacts′)?>where([′customeri?d′=>v])->find();

if ($resContacts) {

$isDel = false;

// errorMessage[]=′名稱為′.data['name'] . '的客戶刪除失敗,錯誤原因:客戶下存在聯(lián)系人,不能刪除';

$errorMessage[] = '客戶下存在聯(lián)系人,不能刪除';

}

}

if ($isDel) {

resContract=db(′crmc?ontract′)?>where([′customeri?d′=>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()]);

}

// 刪除客戶擴(kuò)展數(shù)據(jù)

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

// 刪除跟進(jìn)記錄

recordModel?>delDataByTypes(2,delIds);

// 刪除關(guān)聯(lián)附件

fileModel?>delRFileByModule(′crmc?ustomer′,delIds);

// 刪除關(guān)聯(lián)操作記錄

actionRecordModel?>delDataById([′types′=>′crmc?ustomer′,′actioni?d′=>delIds]);

foreach (dataInfoask => $v) {

RecordActionLog(userInfo[′id′],′crmc?ustomer′,′delete′,v['name'], '', '', '刪除了客戶:' . $v['name']);

}

}

if ($errorMessage) {

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

} else {

return resultArray(['data' => '刪除成功']);

}

}

8、客戶信息詳情界面

wKgZO2dwGo6AHhO3AAYzBI7FGsQ994.png

9、客戶轉(zhuǎn)移功能

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 appadminmodelUser();

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

return resultArray(['error' => '變更負(fù)責(zé)人不能為空']);

}

if (!param[′customeri?d′]∣∣!isa?rray(param['customer_id'])) {

return resultArray(['error' => '請選擇需要轉(zhuǎn)移的客戶']);

}

isr?emove=(param['is_remove'] == 2) ? 2 : 1;

type=param['type'] == 2 ?: 1;

types=param['types'] ?: [];

$data = [];

data[′owneru?seri?d′]=param['owner_user_id'];

$data['update_time'] = time();

$data['follow'] = '待跟進(jìn)';

# 獲取客戶的時間

$data['obtain_time'] = time();

ownerUserName=userModel->getUserNameById($param['owner_user_id']);

$errorMessage = [];

foreach (param[′customeri?d′]ascustomer_id) {

customerInfo=db(′crmc?ustomer′)?>where([′customeri?d′=>customer_id])->find();

if (!$customerInfo) {

errorMessage[]=′名稱:為《′.customerInfo['name'] . '》的客戶轉(zhuǎn)移失敗,錯誤原因:數(shù)據(jù)不存在;';

continue;

}

$resCustomer = true;

//權(quán)限判斷

if (!customerModel?>checkData(customer_id)) {

errorMessage[]=customerInfo['name'] . '轉(zhuǎn)移失敗,錯誤原因:無權(quán)限;';

continue;

}

//擁有客戶數(shù)上限檢測

if (!customerConfigModel?>checkData(param['owner_user_id'], 1)) {

errorMessage[]=customerInfo['name'] . '轉(zhuǎn)移失敗,錯誤原因:' . $customerConfigModel->getError();

continue;

}

//團(tuán)隊成員

$teamData = [];

teamData[′type′]=type; //權(quán)限 1 只讀 2 讀寫

teamData[′useri?d′]=[customerInfo['owner_user_id']]; //協(xié)作人

$teamData['types'] = 'crm_customer'; //類型

teamData[′typesi?d′]=customer_id; //類型 ID

teamData[′isd?el′]=(is_remove == 1) ? 1 : '';

res=settingModel->createTeamData($teamData);

# 處理分配標(biāo)識,待辦事項專用

$data['is_allocation'] = 1;

resCustomer=db(′crmc?ustomer′)?>where([′customeri?d′=>customer_id])->update($data);

if (!$resCustomer) {

errorMessage[]=customerInfo['name'] . '轉(zhuǎn)移失敗,錯誤原因:數(shù)據(jù)出錯;';

continue;

} else {

# 處理轉(zhuǎn)移時,負(fù)責(zé)人出現(xiàn)在只讀和讀寫成員列表中

$customerArray = [];

teamCustomer=db(′crmc?ustomer′)?>field([′owneru?seri?d′,′rou?seri?d′,′rwu?seri?d′])?>where(′customeri?d′,customer_id)->find();

if (!empty($teamCustomer['ro_user_id'])) {

customerRo=arrayToString(arrayd?iff(stringToArray(teamCustomer['ro_user_id']), [$teamCustomer['owner_user_id']]));

customerArray[′rou?seri?d′]=customerRo;

}

if (!empty($teamCustomer['rw_user_id'])) {

customerRo=arrayToString(arrayd?iff(stringToArray(teamCustomer['rw_user_id']), [$teamCustomer['owner_user_id']]));

customerArray[′rwu?seri?d′]=customerRo;

}

db('crm_customer')->where('customer_id', customeri?d)?>update(customerArray);

}

if (in_array('crm_contacts', $types)) {

$contactsIds = [];

contactsIds=db(′crmc?ontacts′)?>where([′customeri?d′=>customer_id])->column('contacts_id');

if ($contactsIds) {

resContacts=contactsModel->transferDataById(contactsIds,param['owner_user_id'], type,is_remove);

if ($resContacts !== true) {

errorMessage[]=resContacts;

continue;

}

}

}

//商機(jī)、合同轉(zhuǎn)移

if (in_array('crm_business', $types)) {

$businessIds = [];

businessIds=db(′crmb?usiness′)?>where([′customeri?d′=>customer_id])->column('business_id');

if ($businessIds) {

resBusiness=businessModel->transferDataById(businessIds,param['owner_user_id'], type,is_remove);

if ($resBusiness !== true) {

errorMessage=errorMessage ? array_merge(errorMessage,resBusiness) : $resBusiness;

continue;

}

}

}

if (in_array('crm_contract', $types)) {

$contractIds = [];

contractIds=db(′crmc?ontract′)?>where([′customeri?d′=>customer_id])->column('contract_id');

if ($contractIds) {

resContract=contractModel->transferDataById(contractIds,param['owner_user_id'], type,is_remove);

if ($resContract !== true) {

errorMessage=errorMessage ? array_merge(errorMessage,resContract) : $resContract;

continue;

}

}

}

//修改記錄

updateActionLog(userInfo[′id′],′crmc?ustomer′,customer_id, '', '', '將客戶轉(zhuǎn)移給:' . $ownerUserName);

RecordActionLog(userInfo[′id′],′crmc?ustomer′,′transfer′,customerInfo['name'], '', '', '將客戶:' . customerInfo[′name′].′轉(zhuǎn)移給:′.ownerUserName);

}

if (!$errorMessage) {

return resultArray(['data' => '轉(zhuǎn)移成功']);

} else {

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

}

}

企業(yè) CRM 管理系統(tǒng)部署上線之后,我們可以在華為云的控制臺可以觀察監(jiān)控著 CPU 使用情況、內(nèi)存、磁盤等等一切運作情況。華為云真的是性能強(qiáng)大、安全、穩(wěn)定的云產(chǎn)品?。?!

wKgZPGdwGo6Acs3PAAbOhPW06uc881.png

華為云 828 為企業(yè)提供多行業(yè)場景解決方案及企業(yè)專屬優(yōu)惠,助力企業(yè)實現(xiàn)數(shù)字化轉(zhuǎn)型升級,大家趕緊去選購吧??!

wKgZO2dwGo-AURnbAAiZKqAl9wg120.png

wKgZPGdwGo-AAQDDAAU6TUWxJbI845.png

————————————————

版權(quán)聲明:本文為博主原創(chuàng)文章,遵循 CC 4.0 BY-SA 版權(quán)協(xié)議,轉(zhuǎn)載請附上原文出處鏈接和本聲明。

原文鏈接:https://blog.csdn.net/csdndddsd/article/details/141969901

審核編輯 黃宇

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • 服務(wù)器
    +關(guān)注

    關(guān)注

    14

    文章

    10251

    瀏覽量

    91480
  • 華為云
    +關(guān)注

    關(guān)注

    3

    文章

    2832

    瀏覽量

    19247
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關(guān)推薦
    熱點推薦

    KubePi:開源Kubernetes可視化管理面板,讓集群管理如此簡單

    環(huán)境示例) 有開發(fā)者分享了在華為Flexus服務(wù)器X實例
    發(fā)表于 02-11 12:53

    硬件通脹下的生存戰(zhàn)!華為Flexus X服務(wù)器,讓中小企業(yè)不做“接盤俠”

    通知”成了企業(yè)IT采購的常態(tài)。 DRAM合同價同比暴漲171.8%,NAND Flash價格累計飆升246%,服務(wù)器整機(jī)采購成本上升15%-20%。硬件市場的瘋狂漲價,正讓無數(shù)中小企業(yè)面臨“買得起用不起、想買卻沒貨”的絕境。而_
    的頭像 發(fā)表于 12-31 13:05 ?278次閱讀

    告別“硬件軍備競賽”!華為如何讓企業(yè)算力效率翻倍,成本減半?

    的技術(shù)迭代周期卻在縮短。在此背景下,繼續(xù)沿用傳統(tǒng)的重資產(chǎn)IT模式已不合時宜。 華為憑借Flexus X實例的柔性算力、彈性
    的頭像 發(fā)表于 12-31 13:02 ?155次閱讀

    DRAM 暴漲 171%! 171% 下的企業(yè)突圍:華為 Flexus X 服務(wù)器成 IT 成本管控利器

    Flexus X 服務(wù)器憑借獨有的柔性算力黑科技與智能調(diào)度能力,助力
    的頭像 發(fā)表于 12-31 13:00 ?251次閱讀

    什么是企業(yè)服務(wù)器-計算

    地擴(kuò)展和管理其IT基礎(chǔ)設(shè)施。華納企業(yè)服務(wù)器基于虛擬化技術(shù),在環(huán)境中運行多個虛擬
    的頭像 發(fā)表于 12-29 17:57 ?782次閱讀

    華納服務(wù)器Linux系統(tǒng)日志集中化管理平臺搭建

    計算時代,企業(yè)運維團(tuán)隊面臨服務(wù)器數(shù)量激增帶來的日志管理難題。本文詳細(xì)解析如何基于Linux系統(tǒng)構(gòu)建高效的
    的頭像 發(fā)表于 09-12 14:11 ?484次閱讀

    輕量服務(wù)器服務(wù)器區(qū)別:2025年終極選擇指南

    資源、穩(wěn)定計算性能及完整管理權(quán)限,支持垂直與水平擴(kuò)展,適合企業(yè)級應(yīng)用和高并發(fā)場景。選擇取決于業(yè)務(wù)需求:輕量服務(wù)器適用于成本敏感型場景,標(biāo)準(zhǔn)服務(wù)器
    的頭像 發(fā)表于 09-01 13:58 ?1247次閱讀
    輕量<b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b>和<b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b>區(qū)別:2025年終極選擇指南

    華納服務(wù)器Linux系統(tǒng)電源管理與節(jié)能優(yōu)化配置方法

    計算時代,Linux系統(tǒng)的電源管理優(yōu)化成為提升服務(wù)器能效的關(guān)鍵環(huán)節(jié)。本文將深入解析Linux內(nèi)核的電源
    的頭像 發(fā)表于 08-21 15:09 ?916次閱讀

    多臺IR615如何通過vpn進(jìn)行遠(yuǎn)程管理?

    現(xiàn)有多臺IR615路由,希望將其配置為vpn客戶端,連接服務(wù)器的vpn服務(wù)端 工程師遠(yuǎn)程連接服務(wù)器
    發(fā)表于 08-06 07:21

    恒訊科技分析:Ubuntu服務(wù)器數(shù)據(jù)共享高效方案

    ,幫助您根據(jù)實際需求選擇最適合的解決方案。 一、NFS(Network File System)共享方案 NFS是Linux系統(tǒng)中最常用的文件共享協(xié)議之一,適用于Linux服務(wù)器之間的數(shù)據(jù)共享。通過NFS,您可以將一臺Ubuntu服務(wù)器
    的頭像 發(fā)表于 07-09 21:40 ?1478次閱讀

    恒訊科技分析:儲存服務(wù)器搭建教程

    搭建存儲服務(wù)器是一個相對復(fù)雜但極具實用性的項目,以下是一個簡化的搭建教程,幫助你快速入門。 一、明確需求 在搭建
    的頭像 發(fā)表于 07-07 11:07 ?1302次閱讀

    HarmonyOS5服務(wù)技術(shù)分享--ArkTS開發(fā)Node環(huán)境

    氣的方式探索這個功能,結(jié)尾還有實用總結(jié)和鼓勵彩蛋哦~? ? 一、HarmonyOS函數(shù)開發(fā):核心能力與價值 HarmonyOS的函數(shù)(Serverless)為開發(fā)者提供了??無服務(wù)器架構(gòu)??的便捷
    發(fā)表于 05-22 17:21

    存儲服務(wù)器租用的好處有哪些?

    隨著企業(yè)數(shù)字化轉(zhuǎn)型加速,存儲服務(wù)器租用成為越來越多企業(yè)的首選方案。存儲服務(wù)器租用的好處在于彈
    的頭像 發(fā)表于 05-16 11:03 ?803次閱讀

    中軟國際打造企業(yè)服務(wù)解決方案

    近日,華為生態(tài)大會2025在蕪湖隆重舉行。中軟國際華為技術(shù)與解決方案集團(tuán)應(yīng)用與服務(wù)業(yè)務(wù)線總裁胡啟明受邀參加
    的頭像 發(fā)表于 04-16 11:34 ?1013次閱讀

    DeepSeek企業(yè)級部署服務(wù)器資源計算 以raksmart裸機(jī)服務(wù)器為例

    以RakSmart裸機(jī)服務(wù)器為例,針對DeepSeek企業(yè)級部署的服務(wù)器資源計算指南,涵蓋GPU/CPU/內(nèi)存/存儲/網(wǎng)絡(luò)等核心維度的詳細(xì)計算方法與配置推薦,主機(jī)推薦小編為您整理發(fā)布
    的頭像 發(fā)表于 03-21 10:17 ?1073次閱讀