package com.hollywood.manage.controller; import com.hollywood.manage.service.TCustomerServiceService; import com.hollywood.common.basic.ApiResult; import com.hollywood.common.model.TCustomerService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** *

* 客服配置表 前端控制器 *

* * @author xiaochen * @since 2024-02-29 */ @Api(tags = "客服配置") @RestController @RequestMapping("/tCustomerService") public class TCustomerServiceController { private final TCustomerServiceService customerServiceService; @Autowired public TCustomerServiceController(TCustomerServiceService customerServiceService) { this.customerServiceService = customerServiceService; } /** * 查询客服配置 */ @ApiOperation(value = "查询客服配置") @GetMapping("/getCustomerServiceList") public ApiResult> getCustomerServiceList() { return ApiResult.success(customerServiceService.list()); } /** * 添加客服配置 */ @ApiOperation(value = "添加客服配置") @PostMapping("/addCustomerService") public ApiResult addCustomerService(@RequestBody TCustomerService customerService) { return ApiResult.success(customerServiceService.save(customerService)); } /** * 删除客服配置 */ @ApiOperation(value = "删除客服配置") @DeleteMapping("/deleteCustomerService") public ApiResult deleteCustomerService(@RequestParam Long serviceId) { return ApiResult.success(customerServiceService.removeById(serviceId)); } }