From 5d7b65670282a4fad015e37d567cfa171b162052 Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期二, 20 五月 2025 12:25:19 +0800 Subject: [PATCH] 基础代码 --- pt-admin/src/main/java/com/ruoyi/web/controller/errand/PhoneController.java | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/pt-admin/src/main/java/com/ruoyi/web/controller/errand/PhoneController.java b/pt-admin/src/main/java/com/ruoyi/web/controller/errand/PhoneController.java new file mode 100644 index 0000000..44eacf8 --- /dev/null +++ b/pt-admin/src/main/java/com/ruoyi/web/controller/errand/PhoneController.java @@ -0,0 +1,42 @@ +package com.ruoyi.web.controller.errand; + +import com.ruoyi.common.core.domain.R; +import com.ruoyi.errand.object.vo.app.ConfirmOrderVO; +import com.ruoyi.errand.service.PhoneService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +@Validated +@RestController +@RequestMapping(value = "/app/phone") +@Api(value = "客服电话", tags = "客服电话操作控制器") +@Slf4j +public class PhoneController { + @Autowired + private PhoneService phoneService; + + /** + * 联系客服 + */ + @GetMapping("/getServletPhone") + @ApiOperation(value = "获取客服电话",tags = "app用户端-联系客服") + public R<String> getServletPhone() { + return R.ok(phoneService.getServletPhone()); + } + + /** + * 保存客服电话 + */ + @PutMapping("/saveServicePhone") + @PreAuthorize("@ss.hasPermi('system:feedback:list')") + @ApiOperation(value = "反馈管理-保存客服电话", tags = {"管理后台-系统管理"}) + public R<Void> saveServicePhone(@RequestParam("phone")String phone) { + phoneService.saveServicePhone(phone); + return R.ok(); + } +} \ No newline at end of file -- Gitblit v1.7.1