CaiWuXiTong/config/services.php
limeng 4c2c422c78 feat(普通商品资料): 聚水潭成本价记录改为镜像快照比对
- 副本库 rpt.jst_sku 一商品一行、无历史;开放平台操作日志接口暂无授权
- 新增 JushuitanCostPriceSnapshotDiffer:ops_jst_sku 当前成本价与快照比对,
  变化写入 jushuitan_cost_price_history_rows(变更前/后/差额,时间取聚水潭 modified)
- 新表 jushuitan_cost_price_snapshots(迁移 + 运行时幂等建表)
- business-mirror:sync-jushuitan-cost-price-history 默认走 snapshot,
  JUSHUITAN_COST_PRICE_HISTORY_SOURCE=open_api 可切回接口
- 生产 cron 由每日 00:00 改为每 10 分钟
- 页面“聚水潭成本价记录”列显示最近一次变价(前→后 · 时间)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0192A1X1EDtdzpaAVMhBj2nh
2026-10-08 11:04:26 +08:00

78 lines
3.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'sendgrid' => [
'api_key' => env('SENDGRID_API_KEY'),
],
'esign' => [
// Credentials are deliberately read from the private runtime/.env only.
// Keep the endpoint aligned with the selected environment when the
// explicit ESIGN_BASE_URL override is omitted.
'environment' => env('ESIGN_ENVIRONMENT', 'sandbox'),
'base_url' => env(
'ESIGN_BASE_URL',
env('ESIGN_ENVIRONMENT', 'sandbox') === 'production'
? 'https://openapi.esign.cn'
: 'https://smlopenapi.esign.cn',
),
'app_id' => env('ESIGN_APP_ID'),
'app_secret' => env('ESIGN_APP_SECRET'),
'notify_url' => env('ESIGN_NOTIFY_URL'),
'callback_tolerance_seconds' => (int) env('ESIGN_CALLBACK_TOLERANCE_SECONDS', 900),
'timeout' => (int) env('ESIGN_TIMEOUT', 20),
// Callback-free deployments opt in to bounded status polling. Keep it
// disabled until the private production credentials are verified.
'polling_enabled' => filter_var(env('ESIGN_POLLING_ENABLED', false), FILTER_VALIDATE_BOOL),
'poll_batch_size' => (int) env('ESIGN_POLL_BATCH_SIZE', 25),
'poll_min_age_seconds' => (int) env('ESIGN_POLL_MIN_AGE_SECONDS', 120),
],
'jushuitan' => [
// 聚水潭开放平台凭据只从私有 runtime/.env 读取,不进入代码仓库。
'base_url' => env('JUSHUITAN_OPEN_API_URL', 'https://openapi.jushuitan.com'),
'app_key' => env('JUSHUITAN_APP_KEY'),
'app_secret' => env('JUSHUITAN_APP_SECRET'),
'access_token' => env('JUSHUITAN_ACCESS_TOKEN'),
'timeout' => (int) env('JUSHUITAN_OPEN_API_TIMEOUT', 20),
'product_operation_history_path' => '/open/webapi/itemapi/itemsku/queryitemskuopshistory',
// snapshot = 普通商品镜像成本价快照比对(默认);open_api = 聚水潭开放平台操作日志接口
'cost_price_history_source' => env('JUSHUITAN_COST_PRICE_HISTORY_SOURCE', 'snapshot'),
'cost_price_history_start' => env('JUSHUITAN_COST_PRICE_HISTORY_START', '2000-01-01 00:00:00'),
'cost_price_history_window_days' => (int) env('JUSHUITAN_COST_PRICE_HISTORY_WINDOW_DAYS', 30),
'cost_price_history_overlap_hours' => (int) env('JUSHUITAN_COST_PRICE_HISTORY_OVERLAP_HOURS', 48),
'cost_price_history_page_size' => (int) env('JUSHUITAN_COST_PRICE_HISTORY_PAGE_SIZE', 2000),
'cost_price_history_max_pages' => (int) env('JUSHUITAN_COST_PRICE_HISTORY_MAX_PAGES', 30),
],
];