NotificTestController.php 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. namespace app\common\controller;
  3. use app\api\logic\PerformanceLogic;
  4. use app\api\logic\ServiceOrderLogic;
  5. use app\common\enum\PayEnum;
  6. use app\common\enum\worker\WorkerAccountLogEnum;
  7. use app\common\logic\ExternalPlatformLogic;
  8. use app\common\logic\PayNotifyLogic;
  9. use app\common\logic\WorkerAccountLogLogic;
  10. use app\common\model\external\ExternalPlatform;
  11. use app\common\model\recharge\RechargeOrder;
  12. use app\common\model\works\ServiceWork;
  13. use app\common\model\works\ServiceWorkLog;
  14. use app\common\service\OnlineCustomerService;
  15. use think\facade\Cache;
  16. use think\facade\Config;
  17. use think\facade\Log;
  18. class NotificTestController extends BaseLikeAdminController
  19. {
  20. public array $notNeedLogin = ['addOnlineCustomerService','subOnlineCustomerService','getBusinessAllocationValue',
  21. 'customerSendMessage','assignBusinessToCustomer','customerClsMessage','getNotificList','getAllNotificList','externalPlatformLogicTest'];
  22. public function externalPlatformLogicTest(){
  23. $prams = $this->request->param();
  24. try {
  25. dd(ExternalPlatformLogic::handleByScene($prams));
  26. }catch(\Exception $e){
  27. dd($e->getMessage());
  28. }
  29. }
  30. public function addOnlineCustomerService(){
  31. $prams = $this->request->param();
  32. return $this->success('', OnlineCustomerService::addOnlineCustomerService($prams['admin_id']), 1, 1);
  33. }
  34. public function subOnlineCustomerService(){
  35. $prams = $this->request->param();
  36. return $this->success('', OnlineCustomerService::subOnlineCustomerService($prams['admin_id']), 1, 1);
  37. }
  38. // 新来业务分配给哪个客服编号
  39. /*public function getBusinessAllocationValue(){
  40. $prams = $this->request->param();
  41. return $this->success('', [OnlineCustomerService::getBusinessAllocationValue($prams['business_type'],$prams['business_id'])], 1, 1);
  42. }
  43. // 向客服发送消息提醒 $business_type = 地区编码+业务类型 consultation_notific service_work_notific
  44. public function customerSendMessage(){
  45. $prams = $this->request->param();
  46. return $this->success('', [OnlineCustomerService::customerSendMessage($prams['admin_id'],$prams['business_type'],$prams['business_id'])], 1, 1);
  47. }*/
  48. public function assignBusinessToCustomer(){
  49. $prams = $this->request->param();
  50. return $this->success('', [OnlineCustomerService::assignBusinessToCustomer($prams['business_type'],$prams['business_id'])], 1, 1);
  51. }
  52. public function customerClsMessage(){
  53. $prams = $this->request->param();
  54. return $this->success('', [OnlineCustomerService::customerClsMessage($prams['business_type'],$prams['business_id'])], 1, 1);
  55. }
  56. public function getNotificList(){
  57. $prams = $this->request->param();
  58. return $this->success('', OnlineCustomerService::getNotificList($prams['admin_id'],$prams['business_type']), 1, 1);
  59. }
  60. public function getAllNotificList(){
  61. $prams = $this->request->param();
  62. return $this->success('', OnlineCustomerService::getAllNotificList($prams['admin_id'],['consultation','servicework'],$prams['prefix']??'',$prams['is_test']??0), 1, 1);
  63. }
  64. }