yuan
2026-06-06 bfe2eb20746ba63fe7fc86b1b2ad5dc3095cc9b3
src/main/java/com/ruoyi/ai/controller/SalesAiController.java
@@ -8,6 +8,8 @@
import com.ruoyi.ai.store.MongoChatMemoryStore;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.security.LoginUser;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
@@ -56,6 +58,7 @@
    }
    @Operation(summary = "销售助手对话")
    @Log(title = "销售智能体对话", businessType = BusinessType.OTHER)
    @PostMapping(value = "/chat", produces = "text/stream;charset=utf-8")
    public Flux<String> chat(@RequestBody ChatForm chatForm) {
        if (!StringUtils.hasText(chatForm.getMemoryId())) {
@@ -110,6 +113,7 @@
    }
    @Operation(summary = "删除销售助手会话")
    @Log(title = "删除销售智能体会话", businessType = BusinessType.DELETE)
    @DeleteMapping("/history/{memoryId}")
    public AjaxResult deleteSession(@PathVariable String memoryId) {
        aiSessionUserContext.remove(memoryId);
@@ -122,7 +126,7 @@
        }
        String text = message.trim();
        return containsAny(text,
                "查询", "查看", "统计", "分析", "建议", "客户档案", "私海", "公海",
                "查询", "查看", "统计", "分析", "建议", "客户档案", "销售档案", "公海",
                "销售报价", "销售台账", "销售退货", "客户往来", "发货台账", "回款", "报价", "风险");
    }