From 675b45becc2aa467b09921a482a8945d3ba0dd6c Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期二, 18 六月 2024 18:44:14 +0800 Subject: [PATCH] 1.提交【管理后台】 系统设置相关接口 --- 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