Files
bj_power/bj_power_workstation/internal/config/config.go
T
SunYF 4ec6784629 feat: 完成MES工位终端系统全量功能迭代
本次提交包含以下核心变更:
1. 新增按钮级权限控制框架与前端权限校验
2. 新增工位管理、工艺流程、巡检终端等核心业务模块
3. 完善用户体系,支持工位终端专属登录权限
4. 新增文件上传下载、报表查询等配套功能
5. 修复多系统兼容性与交互体验问题
6. 完成所有文档与配置项的规范化更新
2026-08-31 08:06:55 +08:00

54 lines
1.7 KiB
Go
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.
package config
import (
"github.com/zeromicro/go-zero/rest"
)
// AuthConfig JWT 登录鉴权配置
// go-zero conf 仅识别 json 标签(yaml/toml 统一转为 JSON 后按此映射)
type AuthConfig struct {
AccessSecret string `json:",default=Hardman_2026"`
AccessExpire int64 `json:",default=1800"` // 有效期(秒)
}
// MesConfig MES 服务地址(内部 API
type MesConfig struct {
BaseURL string `json:",default=http://127.0.0.1:8888"`
}
// InternalConfig 项目间内部 API 写死 token(请求头 X-API-TOKEN
type InternalConfig struct {
Token string `json:",default=Hardman_2026"`
}
// SimConfig 内置模拟拧紧枪数据源开关
type SimConfig struct {
Enable bool `json:",default=true"`
}
// SqliteConfig 本地 SQLite 缓存库
type SqliteConfig struct {
Path string `json:",default=workstation.db"`
}
// StationConfig 工位配置:可从配置文件指定固定工位号(1~12),留空则由终端自选
type StationConfig struct {
Code string `json:",optional"` // 固定工位号(如 "3");留空则由终端自选 1~12
ScrewCount int `json:",default=10"` // 本工位需拧紧的螺丝颗数(进度 9/10 用)
}
// PdfCacheConfig 工艺文件 PDF 本地预缓存目录
type PdfCacheConfig struct {
Dir string `json:",default=pdf_cache"` // 本地缓存目录;留空关闭缓存
}
type Config struct {
rest.RestConf
Auth AuthConfig `json:",optional"`
Mes MesConfig `json:",optional"`
Internal InternalConfig `json:",optional"`
Sim SimConfig `json:",optional"`
Sqlite SqliteConfig `json:",optional"`
Station StationConfig `json:",optional"`
PdfCache PdfCacheConfig `json:",optional"`
}