feat: 实现客服工作台功能 (Issue #54)
- 添加 CustomerServiceController 后端 API - 实现前端客服工作台界面 - 支持水费查询(户号/手机号) - 集成 TTS 语音查询功能 - 添加数据库表结构和示例数据 - 更新路由配置 Resolves: #54
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package com.water.revenue.controller;
|
||||
|
||||
import com.water.common.core.result.R;
|
||||
import com.water.revenue.service.CustomerServiceCenter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 客服工作台接口
|
||||
*/
|
||||
@Tag(name = "客服中心")
|
||||
@RestController
|
||||
@RequestMapping("/service")
|
||||
@RequiredArgsConstructor
|
||||
public class CustomerServiceController {
|
||||
|
||||
private final CustomerServiceCenter customerServiceCenter;
|
||||
|
||||
/**
|
||||
* 水费查询(户号或手机号)
|
||||
*/
|
||||
@Operation(summary = "水费查询")
|
||||
@GetMapping("/query-bills")
|
||||
public R<List<Map<String, Object>>> queryBills(
|
||||
@RequestParam String phoneOrCustomerNo) {
|
||||
List<Map<String, Object>> result = customerServiceCenter.queryBills(phoneOrCustomerNo);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 知识库搜索
|
||||
*/
|
||||
@Operation(summary = "知识库搜索")
|
||||
@GetMapping("/search-knowledge")
|
||||
public R<List<Map<String, Object>>> searchKnowledge(
|
||||
@RequestParam String keyword) {
|
||||
List<Map<String, Object>> result = customerServiceCenter.searchKnowledge(keyword);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公告板
|
||||
*/
|
||||
@Operation(summary = "获取公告信息")
|
||||
@GetMapping("/notices/{type}")
|
||||
public R<List<Map<String, Object>>> getNotices(@PathVariable String type) {
|
||||
List<Map<String, Object>> result = customerServiceCenter.getNotices(type);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客服KPI指标
|
||||
*/
|
||||
@Operation(summary = "客服KPI")
|
||||
@GetMapping("/kpi")
|
||||
public R<Map<String, Object>> getKpi() {
|
||||
Map<String, Object> result = customerServiceCenter.getKpi();
|
||||
return R.ok(result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user