mo_data: +write_cash_log 函数

cash_log表已存在,新增写入函数便于截图/交易变更时记录现金流水。
用于process_trade.py、手动改cash时调用,保证现金变更可追溯。

知识萃取-盘后 cron 已暂停(莫荷接手知识库报告)
This commit is contained in:
知微
2026-07-02 01:43:33 +08:00
parent 29d0eb96cc
commit 04b8a6d4bc
4 changed files with 76 additions and 15 deletions
+1 -15
View File
@@ -77,21 +77,7 @@ class SendHandler(BaseHTTPRequestHandler):
text = data.get('body', '')
msg_type = data.get('type', 'chat')
if text:
if msg_type == 'groupchat':
from xml.sax.saxutils import escape
import subprocess as sp
safe = escape(text)
stanza = (
f"<message to='{target}' type='groupchat' xml:lang='en'>"
f"<body>{safe}</body></message>"
)
sp.run([
"docker", "exec", "ejabberd", "ejabberdctl",
"send_stanza_c2s", AGENT_NICK, "yoin.fun",
_xmpp_resource, stanza
], capture_output=True, timeout=10)
else:
_outbound_queue.append((target, text, msg_type))
_outbound_queue.append((target, text, msg_type))
self.send_response(200)
self.end_headers()
self.wfile.write(b'{"ok":true}')