WechatReplyService.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\service\admin\wechat;
  12. use app\model\wechat\WechatReply;
  13. use app\service\core\wechat\CoreWechatReplyService;
  14. use core\base\BaseAdminService;
  15. /**
  16. * 微信回复
  17. * Class WechatConfigService
  18. * @package app\service\core\wechat
  19. */
  20. class WechatReplyService extends BaseAdminService
  21. {
  22. protected CoreWechatReplyService $core_wechat_reply_service;
  23. public function __construct()
  24. {
  25. parent::__construct();
  26. $this->core_wechat_reply_service = new CoreWechatReplyService();
  27. }
  28. /**
  29. *关键字回复列表
  30. * @return array
  31. */
  32. public function getKeywordPage(array $data = []){
  33. return $this->core_wechat_reply_service->getKeywordPage($this->site_id, $data);
  34. }
  35. /**
  36. * 获取关键词回复信息
  37. * @param int $id
  38. * @return array
  39. */
  40. public function getKeywordInfo(int $id){
  41. return $this->core_wechat_reply_service->getKeywordInfo($this->site_id, $id);
  42. }
  43. /**
  44. * 新增关键词回复
  45. * @param array $data
  46. * @return true
  47. */
  48. public function addKeyword(array $data){
  49. return $this->core_wechat_reply_service->addKeyword($this->site_id, $data);
  50. }
  51. /**
  52. * 更新关键词回复
  53. * @param int $id
  54. * @param array $data
  55. * @return WechatReply
  56. */
  57. public function editKeyword(int $id, array $data){
  58. return $this->core_wechat_reply_service->editKeyword($this->site_id, $id, $data);
  59. }
  60. /**
  61. * 删除关键词回复
  62. * @return void|null
  63. */
  64. public function delKeyword(int $id){
  65. return $this->core_wechat_reply_service->delKeyword($this->site_id, $id);
  66. }
  67. /**
  68. * 获取默认回复
  69. * @return void|null
  70. */
  71. public function getDefault(){
  72. return $this->core_wechat_reply_service->getDefault($this->site_id);
  73. }
  74. /**
  75. * 更新默认回复
  76. * @param array $data
  77. * @return void|null
  78. */
  79. public function editDefault(array $data){
  80. return $this->core_wechat_reply_service->editDefault($this->site_id, $data);
  81. }
  82. /**
  83. * 获取关注回复
  84. * @return array
  85. */
  86. public function getSubscribe(){
  87. return $this->core_wechat_reply_service->getSubscribe($this->site_id);
  88. }
  89. /**
  90. * 更新关注回复
  91. * @param array $data
  92. * @return void|null
  93. */
  94. public function editSubscribe(array $data){
  95. return $this->core_wechat_reply_service->editSubscribe($this->site_id, $data);
  96. }
  97. }