Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 
 

54 рядки
1.9 KiB

  1. <?php
  2. namespace backend\modules\hotel\controllers;
  3. use yii\web\Controller;
  4. use common\components\zOfficeWechat;
  5. class BaseController extends Controller
  6. {
  7. CONST AGENT_ALI_HOTEL_ID = '1000005'; //阿里酒店直连通知
  8. CONST AGENT_COMMON_HOTEL_ID = '1000002'; //普通酒店直连通知&携程酒店直连通知
  9. public $layout = "@backend/modules/hotel/views/layouts/iframe_new";
  10. public $_messageList = 'gaoj|panlj|wuwh|jim|zhuym|huangjq|huyz|'; //客服
  11. public $_business = 'yangxt|panlj|xiaoq|sunh|chengss|wuwh|jiny|'; //运营
  12. public $_developerList = 'shifp|wanglg|'; //技术
  13. public $_financeList = 'huangq|'; // 财务
  14. public $_private = 'wanglg|';
  15. /**
  16. * Author:Steven
  17. * Desc:
  18. * @param $title //通知标题
  19. * @param $msg //内容
  20. * @param string $touser 空:通知技术;1:技术+客服;2:技术+运营;3:运营+客服;4:运营+客服+技术 其他:自定义(例如:shifp|wanglg)
  21. */
  22. public function sendAliMsgToRtx($title, $msg, $touser = '', $agentid = self::AGENT_ALI_HOTEL_ID)
  23. {
  24. if ($touser == '') {
  25. $touser = $this->_developerList;
  26. } elseif ($touser == 1) { // 技术+客服
  27. $touser = $this->_developerList . $this->_messageList;
  28. } elseif ($touser == 2) { //技术+运营
  29. $touser = $this->_developerList . $this->_business;
  30. } elseif ($touser == 3) { //运营+客服
  31. $touser = $this->_messageList . $this->_business;
  32. } elseif ($touser == 4) { //运营+客服+技术
  33. $touser = $this->_developerList . $this->_messageList . $this->_business;
  34. }elseif($touser == 5)
  35. {
  36. $touser = $this->_private;
  37. }
  38. //警报:RTX通知
  39. $arr = array(
  40. "agentid" => $agentid,
  41. "title" => $title,
  42. "msg" => $msg,
  43. "touser" => $touser,
  44. );
  45. zOfficeWechat::sendMsg($arr);
  46. }
  47. }