feat: 删除冗余接口
This commit is contained in:
@@ -63,95 +63,5 @@ public class WmsSalesScriptGeneratorController extends BaseController {
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试AI连接
|
||||
*/
|
||||
@GetMapping("/testConnection")
|
||||
public R<Map<String, Object>> testConnection() {
|
||||
Map<String, Object> result = iWmsSalesScriptGeneratorService.testAiConnection();
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生成配置
|
||||
*/
|
||||
@GetMapping("/config")
|
||||
public R<Map<String, Object>> getConfig() {
|
||||
Map<String, Object> config = iWmsSalesScriptGeneratorService.getGenerationConfig();
|
||||
return R.ok(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新生成配置
|
||||
*/
|
||||
@Log(title = "更新话术生成配置", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/config")
|
||||
public R<Void> updateConfig(@RequestBody Map<String, Object> config) {
|
||||
iWmsSalesScriptGeneratorService.updateGenerationConfig(config);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可用的产品列表
|
||||
*/
|
||||
@GetMapping("/availableProducts")
|
||||
public R<List<Map<String, Object>>> getAvailableProducts() {
|
||||
List<Map<String, Object>> products = iWmsSalesScriptGeneratorService.getAvailableProducts();
|
||||
return R.ok(products);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生成历史
|
||||
*/
|
||||
@GetMapping("/history")
|
||||
public TableDataInfo<Map<String, Object>> getGenerationHistory(PageQuery pageQuery) {
|
||||
return iWmsSalesScriptGeneratorService.getGenerationHistory(pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新生成指定话术
|
||||
*/
|
||||
@Log(title = "重新生成话术", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/regenerate/{scriptId}")
|
||||
public R<WmsProductSalesScriptVo> regenerateScript(@NotNull(message = "话术ID不能为空")
|
||||
@PathVariable Long scriptId) {
|
||||
WmsProductSalesScriptVo script = iWmsSalesScriptGeneratorService.regenerateScript(scriptId);
|
||||
return R.ok(script);
|
||||
}
|
||||
|
||||
/**
|
||||
* 预览话术生成(不保存到数据库)
|
||||
*/
|
||||
@PostMapping("/preview")
|
||||
public R<List<Map<String, Object>>> previewScripts(@RequestBody WmsSalesScriptGeneratorBo bo) {
|
||||
List<Map<String, Object>> previews = iWmsSalesScriptGeneratorService.previewScripts(bo);
|
||||
return R.ok(previews);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户类型列表
|
||||
*/
|
||||
@GetMapping("/customerTypes")
|
||||
public R<List<Map<String, Object>>> getCustomerTypes() {
|
||||
List<Map<String, Object>> customerTypes = iWmsSalesScriptGeneratorService.getCustomerTypes();
|
||||
return R.ok(customerTypes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产品特性关键词
|
||||
*/
|
||||
@GetMapping("/featureKeywords")
|
||||
public R<List<String>> getFeatureKeywords() {
|
||||
List<String> keywords = iWmsSalesScriptGeneratorService.getFeatureKeywords();
|
||||
return R.ok(keywords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分析产品信息并生成话术建议
|
||||
*/
|
||||
@PostMapping("/analyzeProduct")
|
||||
public R<Map<String, Object>> analyzeProduct(@RequestBody WmsSalesScriptGeneratorBo bo) {
|
||||
Map<String, Object> analysis = iWmsSalesScriptGeneratorService.analyzeProduct(bo);
|
||||
return R.ok(analysis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user