feat(base): 重置数据库序列并优化查询语句
- 在 base 模块初始化时添加重置所有序列的函数
- 修改多个模块中的查询语句,使用 Where(key, value) 替代 Where("key = ?", value)
- 优化部分代码结构,提高可读性和维护性
This commit is contained in:
@@ -15,8 +15,8 @@ type BaseSysMenu struct {
|
||||
Icon *string `gorm:"column:icon;type:varchar(255)" json:"icon"` // 图标
|
||||
OrderNum int32 `gorm:"column:orderNum;type:int;not null;default:0" json:"orderNum"` // 排序
|
||||
ViewPath *string `gorm:"column:viewPath;type:varchar(255)" json:"viewPath"` // 视图地址
|
||||
KeepAlive *int32 `gorm:"column:keepAlive;not null;default:1" json:"keepAlive"` // 路由缓存
|
||||
IsShow *int32 `gorm:"column:isShow;not null;default:1" json:"isShow"` // 是否显示
|
||||
KeepAlive bool `gorm:"column:keepAlive;not null;default:1" json:"keepAlive"` // 路由缓存
|
||||
IsShow bool `gorm:"column:isShow;not null;default:1" json:"isShow"` // 是否显示
|
||||
}
|
||||
|
||||
// TableName BaseSysMenu's table name
|
||||
|
||||
Reference in New Issue
Block a user