43b1a0a955
- 单设备登录:登录成功即 last-login-wins 绑定 users.machine;非超管旧 token 在下一次受保护请求抛 4011 下线,超管豁免;仅认 token 内签名 deviceId,不用请求头。 前端两端接入踢下线跳转(?kicked=1 提示),V118 清空历史 machine - 站内通知:新增 notification 模块(任务失败扫描 / 密钥欠费 / 下游服务探测三类来源), 前后台铃铛组件 + 轮询;后台列表按主管数据范围(UserDataScopeSupport)过滤;V116 建表 均已于 2026-09-13 部署上线,此次补提交源码(此前仅存在于已部署 JAR/构建产物中)
46 lines
1.6 KiB
Java
46 lines
1.6 KiB
Java
package com.nanri.aiimage.config;
|
||
|
||
import lombok.Data;
|
||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||
|
||
/**
|
||
* 用户 API 密钥(外观专利密钥 / 货源查询密钥)服务端化配置。
|
||
*/
|
||
@Data
|
||
@ConfigurationProperties(prefix = "aiimage.user-secret")
|
||
public class UserSecretProperties {
|
||
|
||
/** 每日定时连通性巡检开关(应急可关,无需重新打包)。 */
|
||
private boolean checkEnabled = true;
|
||
|
||
/** 巡检 cron(默认每天 04:30,Asia/Shanghai)。 */
|
||
private String checkCron = "0 30 4 * * *";
|
||
|
||
/** 单轮巡检最多检测条数,超出顺延下一轮。 */
|
||
private int checkMaxRows = 500;
|
||
|
||
/** 单轮巡检时间预算(分钟),超时中断本轮。 */
|
||
private int checkBudgetMinutes = 20;
|
||
|
||
/**
|
||
* 检测出口代理提取链接(选配):配置后检测请求优先经该代理 IP 发出,
|
||
* 代理不可用时自动回退直连;留空则全部直连。
|
||
*/
|
||
private String checkProxyExtractUrl = "";
|
||
|
||
/** jikip 余量查询接口(客户端设置弹窗展示套餐 IP 余量 / 账户余额)。 */
|
||
private String jikipBalanceUrl = "https://api.jikip.com/find-balance";
|
||
|
||
/** jikip 套餐 id(余量查询参数)。 */
|
||
private String jikipPlanId = "";
|
||
|
||
/** jikip 用户 ID(余量查询参数)。 */
|
||
private String jikipUserId = "";
|
||
|
||
/**
|
||
* 巡检发现欠费/密钥失效时是否推送站内通知(桌面端用户 + 后台管理员);
|
||
* 关闭后巡检只更新检测状态、不发通知(应急降噪开关)。
|
||
*/
|
||
private boolean notifyEnabled = true;
|
||
}
|