From 7a0f7e715ffacab8851de10abcf6b857ca84a263 Mon Sep 17 00:00:00 2001
From: rentaiming <806181062@qq.com>
Date: 星期二, 09 七月 2024 17:54:13 +0800
Subject: [PATCH] 修改bug
---
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomConfigController.java | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomConfigController.java
index 68a8797..ba8ec76 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomConfigController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/CustomConfigController.java
@@ -10,6 +10,8 @@
import com.ruoyi.system.domain.vo.CustomConfigVO;
import com.ruoyi.system.service.ICustomConfigService;
import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@@ -112,4 +114,43 @@
public R<MgtAfterSaleSettingDTO> getAfterSaleSetting() {
return R.ok(iCustomConfigService.getAfterSaleSetting());
}
+
+ /**
+ * 获取客服电话
+ *
+ * @return 客服电话
+ */
+ @ApiOperation("获取客服电话")
+ @GetMapping("/service-phone")
+ public R<String> servicePhone() {
+ return R.ok(iCustomConfigService.getServicePhone());
+ }
+
+ /**
+ * 保存客服电话
+ *
+ * @param phone 客服电话
+ */
+ @ApiOperation("保存客服电话")
+ @PostMapping("/save-service-phone")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "phone", value = "客服电话", example = "18888888888", required = true)})
+ public R<?> servicePhone(@RequestParam(value = "phone", required = true) String phone) {
+ iCustomConfigService.updateServicePhone(phone);
+ return R.ok();
+ }
+
+ /**
+ * 删除客户电话
+ *
+ * @param phone 客服电话
+ */
+ @ApiOperation("删除客服电话")
+ @PostMapping("/delete-service-phone")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "phone", value = "客服电话", example = "18888888888", required = true)})
+ public R<?> deleteServicePhone(@RequestParam(value = "phone", required = true) String phone) {
+ iCustomConfigService.deleteServicePhone(phone);
+ return R.ok();
+ }
}
--
Gitblit v1.7.1