| | |
| | | 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; |
| | |
| | | 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(); |
| | | } |
| | | } |