chore: 入库生产基线(2026-10-26 与 shop.douba.top 一致)

- 11 个已跟踪文件的在途改动此前只存在于工作区,生产已在运行
- 补入两个从未入库的文件:InternalController.php(app_03/box_app 内部接口)、
  config/internal.php(内部通信 key,值从 .env 读取,不含硬编码密钥)
- 逐文件 md5 比对过生产,内容一致

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-26 17:08:55 +08:00
parent c7f85ffbda
commit fc353899a9
13 changed files with 331 additions and 37 deletions

View File

@@ -20,6 +20,7 @@ use crmeb\services\wechat\config\WorkConfig;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\facade\Log;
/**
* 客户管理
@@ -83,11 +84,29 @@ class Client extends AuthController
*/
public function synch()
{
if (!sys_config('wechat_work_corpid', '')) {
$corpId = sys_config('wechat_work_corpid', '');
if (!$corpId) {
return $this->fail('请先配置企微信息');
}
try {
$beforeCount = $this->services->count([]);
Log::info('work client synch start ' . json_encode([
'corp_id' => $corpId,
'before_count' => $beforeCount
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
} catch (\Throwable $e) {
Log::error('work client synch precheck error ' . json_encode([
'corp_id' => $corpId,
'message' => $e->getMessage(),
'file' => $e->getFile(),
'line' => $e->getLine(),
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
}
$this->services->delete([["id", "<>", 0]]);
$this->services->authGetExternalcontact();
Log::info('work client synch dispatched ' . json_encode([
'corp_id' => $corpId
], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
return $this->success('已加入消息队列,请稍后查看');
}