feat: 会话令牌与守卫、看板组件及工位终端功能完善
- 用户表扩展:MES/WMS user 实体新增字段,新增 active_token 迁移 SQL(2026-11-11) - 会话机制:MES 新增 session_guard,重构 token/auth/jwt/perm 与路由;WMS/工作站同步令牌续签与鉴权 - 看板(board):调整 MES 看板产线/生产/侧栏/仓库组件及样式;WMS 看板展示页同步调整 - 工位终端后端:完善报警流、绑定、PLC 对账、拧紧、proxy、上报、站点告警/操作等 handler,补充 mes client/store - 工位终端前端:登录/主界面/各操作面板调整,新增滚动分页与多语言 yaml 文案,刷新构建产物 - MES 业务:新增流程链 logic,调整待审核/产能支撑/产品工艺/设置页、PLC 监控与帮助文档,刷新构建产物 - 更新问题记录文档
This commit is contained in:
@@ -197,6 +197,26 @@ func (_u *UserUpdate) ClearLastLoginAt() *UserUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetActiveToken sets the "active_token" field.
|
||||
func (_u *UserUpdate) SetActiveToken(v string) *UserUpdate {
|
||||
_u.mutation.SetActiveToken(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableActiveToken sets the "active_token" field if the given value is not nil.
|
||||
func (_u *UserUpdate) SetNillableActiveToken(v *string) *UserUpdate {
|
||||
if v != nil {
|
||||
_u.SetActiveToken(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// ClearActiveToken clears the value of the "active_token" field.
|
||||
func (_u *UserUpdate) ClearActiveToken() *UserUpdate {
|
||||
_u.mutation.ClearActiveToken()
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_u *UserUpdate) SetCreatedAt(v int64) *UserUpdate {
|
||||
_u.mutation.ResetCreatedAt()
|
||||
@@ -328,6 +348,12 @@ func (_u *UserUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if _u.mutation.LastLoginAtCleared() {
|
||||
_spec.ClearField(user.FieldLastLoginAt, field.TypeInt64)
|
||||
}
|
||||
if value, ok := _u.mutation.ActiveToken(); ok {
|
||||
_spec.SetField(user.FieldActiveToken, field.TypeString, value)
|
||||
}
|
||||
if _u.mutation.ActiveTokenCleared() {
|
||||
_spec.ClearField(user.FieldActiveToken, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(user.FieldCreatedAt, field.TypeInt64, value)
|
||||
}
|
||||
@@ -530,6 +556,26 @@ func (_u *UserUpdateOne) ClearLastLoginAt() *UserUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetActiveToken sets the "active_token" field.
|
||||
func (_u *UserUpdateOne) SetActiveToken(v string) *UserUpdateOne {
|
||||
_u.mutation.SetActiveToken(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableActiveToken sets the "active_token" field if the given value is not nil.
|
||||
func (_u *UserUpdateOne) SetNillableActiveToken(v *string) *UserUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetActiveToken(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// ClearActiveToken clears the value of the "active_token" field.
|
||||
func (_u *UserUpdateOne) ClearActiveToken() *UserUpdateOne {
|
||||
_u.mutation.ClearActiveToken()
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_u *UserUpdateOne) SetCreatedAt(v int64) *UserUpdateOne {
|
||||
_u.mutation.ResetCreatedAt()
|
||||
@@ -691,6 +737,12 @@ func (_u *UserUpdateOne) sqlSave(ctx context.Context) (_node *User, err error) {
|
||||
if _u.mutation.LastLoginAtCleared() {
|
||||
_spec.ClearField(user.FieldLastLoginAt, field.TypeInt64)
|
||||
}
|
||||
if value, ok := _u.mutation.ActiveToken(); ok {
|
||||
_spec.SetField(user.FieldActiveToken, field.TypeString, value)
|
||||
}
|
||||
if _u.mutation.ActiveTokenCleared() {
|
||||
_spec.ClearField(user.FieldActiveToken, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(user.FieldCreatedAt, field.TypeInt64, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user