feat(threshold): Implement customer loss threshold configuration and notification system
- Added `ThresholdRepository` for managing customer loss threshold configurations and notifications. - Introduced `threshold_service` to handle loss threshold alerts based on customer portfolio performance. - Enhanced `customer_prompts` to include new intent for querying product net values. - Updated `customer_service` to integrate new threshold alert functionality into existing workflows. - Implemented `sanitize_postprocess` for improved compliance handling in customer interactions. - Enhanced course documentation to reflect updates in advisor training modules and interactive elements. This update significantly improves the customer experience by providing proactive loss threshold notifications and enhancing the overall service framework.
This commit is contained in:
@@ -21,14 +21,14 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="callout callout-accent">
|
||||
<strong>实现位置:</strong> <code>app/service/platform/common.py</code> 的 <code>maybe_desensitize_row</code> → <code>prepare_row</code>。REST 与 Agent 适配层都应走这里,不要在路由里手写 mask。
|
||||
<strong>实现位置:</strong> 响应脱敏(<code>app/service/platform/common.py</code>)的 <code>maybe_desensitize_row</code> → <code>prepare_row</code>。REST 与 Agent 适配层都应走这里,不要在路由里手写 mask。
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="screen animate-in">
|
||||
<div class="translation-block">
|
||||
<div class="translation-code">
|
||||
<span class="translation-label">platform/common.py</span>
|
||||
<span class="translation-label">响应脱敏(platform/common.py)</span>
|
||||
<pre><code><span class="code-line"><span class="code-keyword">def</span> <span class="code-function">maybe_desensitize_row</span>(row: dict | None) -> dict | None:</span>
|
||||
<span class="code-line"> <span class="code-keyword">if</span> row <span class="code-keyword">is</span> None <span class="code-keyword">or not</span> settings.platform_response_desensitize:</span>
|
||||
<span class="code-line"> <span class="code-keyword">return</span> row</span>
|
||||
@@ -59,11 +59,11 @@
|
||||
<div class="quiz-question-block"
|
||||
data-correct="option-c"
|
||||
data-explanation-right="对。默认 false 是为了模拟库联调;上真库时在 .env 设 PLATFORM_RESPONSE_DESENSITIZE=true,脱敏在 Service 层自动生效。"
|
||||
data-explanation-wrong="不要在每个路由里 copy 打码逻辑;开关在 settings,行为在 platform/common.py。">
|
||||
data-explanation-wrong="不要在每个路由里 copy 打码逻辑;开关在 settings,行为在 响应脱敏(platform/common.py)。">
|
||||
<h3 class="quiz-question">准备接真 Core,要让出参打码手机号,最省事的做法是?</h3>
|
||||
<div class="quiz-options">
|
||||
<button class="quiz-option" data-value="option-a" onclick="selectOption(this)">
|
||||
<div class="quiz-option-radio"></div><span>在每个 customers.py 返回前手写 replace</span>
|
||||
<div class="quiz-option-radio"></div><span>在平台客户 REST 薄路由(customers.py)返回前手写 replace</span>
|
||||
</button>
|
||||
<button class="quiz-option" data-value="option-b" onclick="selectOption(this)">
|
||||
<div class="quiz-option-radio"></div><span>让前端自己 mask 手机号</span>
|
||||
|
||||
Reference in New Issue
Block a user