diff --git a/frontend/src/views/ops/db/component/table/DbTableDataOp.vue b/frontend/src/views/ops/db/component/table/DbTableDataOp.vue index 3befd024..46fbeae9 100644 --- a/frontend/src/views/ops/db/component/table/DbTableDataOp.vue +++ b/frontend/src/views/ops/db/component/table/DbTableDataOp.vue @@ -70,7 +70,7 @@ @clear="selectData" size="small" clearable - class="!w-full" + class="w-full" highlight-first-item value-key="columnName" ref="condInputRef" @@ -490,7 +490,7 @@ const handlerColumnSelect = (column: any) => { let value = column.columnName + ' = '; // 不是数字类型默认拼接上'' if (!DbInst.isNumber(column.dataType)) { - value = `${value} ''`; + value = `${value}''`; } if (lastSpaceIndex != -1) { diff --git a/server/go.mod b/server/go.mod index 53807e65..11a9467f 100644 --- a/server/go.mod +++ b/server/go.mod @@ -36,8 +36,8 @@ require ( github.com/tidwall/gjson v1.18.0 github.com/veops/go-ansiterm v0.0.5 go.mongodb.org/mongo-driver/v2 v2.3.0 // mongo - golang.org/x/crypto v0.47.0 // ssh - golang.org/x/oauth2 v0.34.0 + golang.org/x/crypto v0.48.0 + golang.org/x/oauth2 v0.35.0 golang.org/x/sync v0.19.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/yaml.v3 v3.0.1 @@ -133,11 +133,11 @@ require ( golang.org/x/arch v0.21.0 // indirect golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 // indirect golang.org/x/image v0.31.0 // indirect - golang.org/x/mod v0.31.0 // indirect - golang.org/x/net v0.48.0 // indirect - golang.org/x/sys v0.40.0 // indirect - golang.org/x/text v0.33.0 // indirect - golang.org/x/tools v0.40.0 // indirect + golang.org/x/mod v0.32.0 // indirect + golang.org/x/net v0.49.0 // indirect + golang.org/x/sys v0.41.0 // indirect + golang.org/x/text v0.34.0 // indirect + golang.org/x/tools v0.41.0 // indirect google.golang.org/protobuf v1.36.10 // indirect modernc.org/libc v1.66.10 // indirect modernc.org/mathutil v1.7.1 // indirect diff --git a/server/internal/db/dbm/dbi/meta.go b/server/internal/db/dbm/dbi/meta.go index 79bc0ffe..610f6112 100644 --- a/server/internal/db/dbm/dbi/meta.go +++ b/server/internal/db/dbm/dbi/meta.go @@ -21,7 +21,7 @@ type Meta interface { GetDialect(*DbConn) Dialect // GetMetadata 获取元数据信息接口 - // @param *DbConn 数据库连接 + // - *DbConn 数据库连接 GetMetadata(*DbConn) Metadata // GetDbDataTypes 获取所有数据库对应的数据类型 diff --git a/server/internal/db/dbm/sqlparser/sqlparser.go b/server/internal/db/dbm/sqlparser/sqlparser.go index bcc1fd42..0eb2a8f7 100644 --- a/server/internal/db/dbm/sqlparser/sqlparser.go +++ b/server/internal/db/dbm/sqlparser/sqlparser.go @@ -11,7 +11,7 @@ type DbDialect string type SqlParser interface { // sql解析 - // @param stmt sql语句 + // - stmt sql语句 Parse(stmt string) ([]sqlstmt.Stmt, error) } diff --git a/server/internal/db/dbm/sqlparser/sqlstmt/quote_char.go b/server/internal/db/dbm/sqlparser/sqlstmt/quote_char.go index 994f6c08..f81d380b 100644 --- a/server/internal/db/dbm/sqlparser/sqlstmt/quote_char.go +++ b/server/internal/db/dbm/sqlparser/sqlstmt/quote_char.go @@ -10,7 +10,7 @@ type QuoteChar struct { /** * Wrap value with quote character. * - * @param value value to be wrapped + * - value value to be wrapped * @return wrapped value */ func (qc *QuoteChar) Wrap(value string) string { @@ -20,7 +20,7 @@ func (qc *QuoteChar) Wrap(value string) string { /** * Unwrap value with quote character. * - * @param value value to be unwrapped + * - value value to be unwrapped * @return unwrapped value */ func (qc *QuoteChar) Unwrap(value string) string { @@ -33,7 +33,7 @@ func (qc *QuoteChar) Unwrap(value string) string { /** * Is wrapped by quote character. * - * @param value value to be judged + * - value value to be judged * @return is wrapped or not */ func (qc *QuoteChar) IsWrapped(value string) bool { diff --git a/server/internal/flow/domain/entity/procdef.go b/server/internal/flow/domain/entity/procdef.go index ae987729..0d48a9a1 100644 --- a/server/internal/flow/domain/entity/procdef.go +++ b/server/internal/flow/domain/entity/procdef.go @@ -29,8 +29,8 @@ func (p *Procdef) TableName() string { } // MatchCondition 是否匹配审批条件,匹配则需要启用该流程 -// @param bizType 业务类型 -// @param param 业务参数 +// - bizType 业务类型 +// - param 业务参数 // Condition返回值为1,则表面该操作需要启用流程 func (p *Procdef) MatchCondition(bizType string, param map[string]any) bool { if p.Condition == nil || *p.Condition == "" { diff --git a/server/internal/machine/application/machine_cronjob.go b/server/internal/machine/application/machine_cronjob.go index 4cd2e58a..700cc49f 100644 --- a/server/internal/machine/application/machine_cronjob.go +++ b/server/internal/machine/application/machine_cronjob.go @@ -36,7 +36,7 @@ type MachineCronJob interface { InitCronJob() // 执行cron job - // @param key cron job key + // - key cron job key RunCronJob(key string) } diff --git a/server/internal/machine/mcm/client.go b/server/internal/machine/mcm/client.go index 4fd2a55c..e5f42ea4 100644 --- a/server/internal/machine/mcm/client.go +++ b/server/internal/machine/mcm/client.go @@ -79,7 +79,7 @@ func (c *Cli) GetSession() (*ssh.Session, error) { } // Run 执行shell -// @param shell shell脚本命令 +// - shell shell脚本命令 // @return 返回执行成功或错误的消息 func (c *Cli) Run(shell string) (string, error) { session, err := c.GetSession() diff --git a/server/internal/machine/mcm/client_cache.go b/server/internal/machine/mcm/client_cache.go index 84b29731..0f228987 100644 --- a/server/internal/machine/mcm/client_cache.go +++ b/server/internal/machine/mcm/client_cache.go @@ -11,7 +11,7 @@ var ( ) // 从缓存中获取客户端信息,不存在则回调获取机器信息函数,并新建。 -// @param 机器的授权凭证名 +// - 机器的授权凭证名 func GetMachineCli(ctx context.Context, authCertName string, getMachine func(string) (*MachineInfo, error)) (*Cli, error) { pool, err := poolGroup.GetCachePool(authCertName, func() (*Cli, error) { mi, err := getMachine(authCertName) diff --git a/server/internal/mongo/application/mongo.go b/server/internal/mongo/application/mongo.go index f2afc3fe..c95481f9 100644 --- a/server/internal/mongo/application/mongo.go +++ b/server/internal/mongo/application/mongo.go @@ -30,7 +30,7 @@ type Mongo interface { Delete(ctx context.Context, id uint64) error // 获取mongo连接实例 - // @param id mongo id + // - id mongo id GetMongoConn(ctx context.Context, id uint64) (*mgm.MongoConn, error) } diff --git a/server/internal/pkg/utils/ctypto.go b/server/internal/pkg/utils/ctypto.go index 141e0d3c..25461d80 100644 --- a/server/internal/pkg/utils/ctypto.go +++ b/server/internal/pkg/utils/ctypto.go @@ -20,7 +20,7 @@ const ( ) // 使用系统默认的私钥解密 -// @param base64 字符串是否使用base64编码 +// - base64 字符串是否使用base64编码 func DefaultRsaDecrypt(data string, useBase64 bool) (string, error) { // 空字符串不解密 if data == "" { diff --git a/server/internal/tag/application/tag_tree.go b/server/internal/tag/application/tag_tree.go index c16cd09d..62ce1112 100644 --- a/server/internal/tag/application/tag_tree.go +++ b/server/internal/tag/application/tag_tree.go @@ -49,8 +49,8 @@ type TagTree interface { Delete(ctx context.Context, id uint64) error // GetAccountTags 获取指定账号有权限操作的标签列表 - // @param accountId 账号id - // @param query 查询条件 + // - accountId 账号id + // - query 查询条件 GetAccountTags(accountId uint64, query *entity.TagTreeQuery) dto.SimpleTagTrees // 根据标签类型和标签code获取对应的标签路径列表 diff --git a/server/pkg/base/app.go b/server/pkg/base/app.go index 2c9f6b49..563ab1a7 100644 --- a/server/pkg/base/app.go +++ b/server/pkg/base/app.go @@ -22,15 +22,15 @@ type App[T model.ModelI] interface { UpdateById(ctx context.Context, e T) error // UpdateByCond 更新满足条件的数据 - // @param values 需为模型结构体指针或map(更新零值等) - // @param cond 可为*model.QueryCond也可以为普通查询model + // - values 需为模型结构体指针或map(更新零值等) + // - cond 可为*model.QueryCond也可以为普通查询model UpdateByCond(ctx context.Context, values any, cond any) error // DeleteById 根据实体主键删除实体 DeleteById(ctx context.Context, id ...uint64) error // DeleteByCond 根据条件进行删除 - // @param cond 可为*model.QueryCond也可以为普通查询model + // - cond 可为*model.QueryCond也可以为普通查询model DeleteByCond(ctx context.Context, cond any) error // Save 保存实体,实体IsCreate返回true则新增,否则更新 @@ -43,23 +43,23 @@ type App[T model.ModelI] interface { GetByIds(ids []uint64, cols ...string) ([]T, error) // GetByCond 根据实体条件查询实体信息(获取单个实体) - // @param cond 可为*model.QueryCond也可以为普通查询model + // - cond 可为*model.QueryCond也可以为普通查询model GetByCond(cond any) error // ListByCondToAny 根据条件查询数据映射至res - // @param cond 可为*model.QueryCond也可以为普通查询model + // - cond 可为*model.QueryCond也可以为普通查询model ListByCondToAny(cond any, res any) error // ListByCond 根据条件查询 - // @param cond 可为*model.QueryCond也可以为普通查询model + // - cond 可为*model.QueryCond也可以为普通查询model ListByCond(cond any, cols ...string) ([]T, error) // PageByCond 根据指定条件分页查询 - // @param cond 可为*model.QueryCond也可以为普通查询model + // - cond 可为*model.QueryCond也可以为普通查询model PageByCond(cond any, pageParam model.PageParam, cols ...string) (*model.PageResult[T], error) // CountByCond 根据指定条件统计model表的数量 - // @param cond 可为*model.QueryCond也可以为普通查询model + // - cond 可为*model.QueryCond也可以为普通查询model CountByCond(cond any) int64 // CursorByCond 根据指定条件遍历model表数据 @@ -97,8 +97,8 @@ func (ai *AppImpl[T, R]) UpdateById(ctx context.Context, e T) error { } // UpdateByCond 更新满足条件的数据 -// @param values 需为模型结构体指针或map(更新零值等) -// @param cond 可为*model.QueryCond也可以为普通查询model +// - values 需为模型结构体指针或map(更新零值等) +// - cond 可为*model.QueryCond也可以为普通查询model func (ai *AppImpl[T, R]) UpdateByCond(ctx context.Context, values any, cond any) error { return ai.GetRepo().UpdateByCond(ctx, values, cond) } diff --git a/server/pkg/base/repo.go b/server/pkg/base/repo.go index 69a1f296..9543c5dd 100644 --- a/server/pkg/base/repo.go +++ b/server/pkg/base/repo.go @@ -34,12 +34,12 @@ type Repo[T model.ModelI] interface { UpdateByIdWithDb(ctx context.Context, db *gorm.DB, e T, columns ...string) error // UpdateByCond 更新满足条件的数据 - // @param values 需要模型结构体或map - // @param cond 条件 + // - values 需要模型结构体或map + // - cond 条件 UpdateByCond(ctx context.Context, values any, cond any) error // UpdateByCondWithDb 更新满足条件的数据 - // @param values 需要模型结构体或map + // - values 需要模型结构体或map UpdateByCondWithDb(ctx context.Context, db *gorm.DB, values any, cond any) error // Save 保存实体,实体IsCreate返回true则新增,否则更新 @@ -71,7 +71,7 @@ type Repo[T model.ModelI] interface { GetByIds(ids []uint64, cols ...string) ([]T, error) // GetByCond 根据实体条件查询实体信息(单个结果集) - // @param cond 支持普通结构体或*model.QueryCond。如果cond为model.QueryCond,则需要使用Dest方法绑定值的指针 + // - cond 支持普通结构体或*model.QueryCond。如果cond为model.QueryCond,则需要使用Dest方法绑定值的指针 GetByCond(cond any) error // SelectByCondToAny 根据条件查询数据映射至res diff --git a/server/pkg/biz/assert.go b/server/pkg/biz/assert.go index 6575eb08..e51af0f6 100644 --- a/server/pkg/biz/assert.go +++ b/server/pkg/biz/assert.go @@ -10,7 +10,7 @@ import ( ) // 断言错误为ni -// @param msgAndParams 消息与参数占位符,第一位为错误消息可包含%s等格式化标识。其余为Sprintf格式化值内容 +// - msgAndParams 消息与参数占位符,第一位为错误消息可包含%s等格式化标识。其余为Sprintf格式化值内容 // // ErrIsNil(err) // ErrIsNil(err, "xxxx") @@ -26,7 +26,7 @@ func ErrIsNil(err error, msgAndParams ...any) { } // 断言错误为ni -// @param msgId i18n消息id +// - msgId i18n消息id // // ErrIsNil(err) // ErrIsNil(err, "xxxx") diff --git a/server/pkg/gormx/gormx.go b/server/pkg/gormx/gormx.go index 32d92f16..536bc527 100644 --- a/server/pkg/gormx/gormx.go +++ b/server/pkg/gormx/gormx.go @@ -17,7 +17,7 @@ func UndeleteScope(db *gorm.DB) *gorm.DB { // 根据id获取实体对象。model需为指针类型(需要将查询出来的值赋值给model) // // 若error不为nil则为不存在该记录 -// @param dbModel 数据库映射实体模型 +// - dbModel 数据库映射实体模型 func GetById(dbModel model.ModelI, id uint64, cols ...string) error { return NewQuery(dbModel, model.NewCond().Columns(cols...).Eq(model.IdColumn, id)).GenGdb().First(dbModel).Error } @@ -25,7 +25,7 @@ func GetById(dbModel model.ModelI, id uint64, cols ...string) error { // 根据model获取单个实体对象 // // 若 error不为nil,则为不存在该记录 -// @param cond 查询条件 +// - cond 查询条件 func GetByCond(dbModel model.ModelI, cond *model.QueryCond) error { return NewQuery(dbModel, cond).GenGdb().First(cond.GetDest()).Error } @@ -88,7 +88,7 @@ func ExecSql(sql string, params ...any) error { } // 插入model -// @param model 数据库映射实体模型 +// - model 数据库映射实体模型 func Insert(model model.ModelI) error { return InsertWithDb(global.Db, model) } @@ -109,7 +109,7 @@ func BatchInsertWithDb[T model.ModelI](db *gorm.DB, models []T) error { } // 根据id更新model,更新字段为model中不为空的值,即int类型不为0,ptr类型不为nil这类字段值 -// @param model 数据库映射实体模型 +// - model 数据库映射实体模型 func UpdateById(model model.ModelI, columns ...string) error { return UpdateByIdWithDb(global.Db, model, columns...) } @@ -132,7 +132,7 @@ func UpdateByCondWithDb(db *gorm.DB, dbModel model.ModelI, values any, cond *mod } // 根据id删除model -// @param model 数据库映射实体模型 +// - model 数据库映射实体模型 func DeleteById(model_ model.ModelI, id ...uint64) error { return DeleteByIdWithDb(global.Db, model_, id...) } @@ -144,16 +144,16 @@ func DeleteByIdWithDb(db *gorm.DB, model_ model.ModelI, id ...uint64) error { // 根据cond条件删除指定model表数据 // -// @param dbModel 数据库映射实体模型 -// @param cond 条件 +// - dbModel 数据库映射实体模型 +// - cond 条件 func DeleteByCond(dbModel model.ModelI, cond *model.QueryCond) error { return DeleteByCondWithDb(global.Db, dbModel, cond) } // 根据cond条件删除指定model表数据 // -// @param dbModel 数据库映射实体模型 -// @param cond 条件 +// - dbModel 数据库映射实体模型 +// - cond 条件 func DeleteByCondWithDb(db *gorm.DB, dbModel model.ModelI, cond *model.QueryCond) error { gdb := setGdbWhere(db.Model(dbModel), cond) if !dbModel.LogicDelete() { diff --git a/server/pkg/model/result.go b/server/pkg/model/result.go index 2b094b54..bf1d5e40 100644 --- a/server/pkg/model/result.go +++ b/server/pkg/model/result.go @@ -33,13 +33,13 @@ func (r *Result) IsSuccess() bool { } // 返回成功状态的Result -// @param data 成功附带的数据消息 +// - data 成功附带的数据消息 func Success(data any) *Result { return &Result{Code: SuccessCode, Msg: SuccessMsg, Data: data} } // 返回成功状态的Result -// @param data 成功不附带数据 +// - data 成功不附带数据 func SuccessNoData() *Result { return &Result{Code: SuccessCode, Msg: SuccessMsg} } diff --git a/server/pkg/utils/runtimex/runtimex.go b/server/pkg/utils/runtimex/runtimex.go index e7774b54..85bf2f11 100644 --- a/server/pkg/utils/runtimex/runtimex.go +++ b/server/pkg/utils/runtimex/runtimex.go @@ -9,8 +9,8 @@ import ( // StackStr 获取指定堆栈描述信息 // -// @param skip: 跳过堆栈个数 -// @param nFrames: 需要描述的堆栈个数 +// - skip: 跳过堆栈个数 +// - nFrames: 需要描述的堆栈个数 func StackStr(skip, nFrames int) string { pcs := make([]uintptr, nFrames+1) n := runtime.Callers(skip+1, pcs) diff --git a/server/pkg/utils/stringx/template.go b/server/pkg/utils/stringx/template.go index b21fdb35..af34c4ee 100644 --- a/server/pkg/utils/stringx/template.go +++ b/server/pkg/utils/stringx/template.go @@ -16,8 +16,8 @@ func parse(t *template.Template, vars any) (string, error) { } // 模板字符串解析 -// @param str 模板字符串 -// @param vars 参数变量 +// - str 模板字符串 +// - vars 参数变量 func TemplateParse(str string, vars any) (string, error) { tmpl, err := template.New("tmpl").Parse(str) diff --git a/server/pkg/validatorx/validatorx.go b/server/pkg/validatorx/validatorx.go index 7f80f4b4..c4824331 100644 --- a/server/pkg/validatorx/validatorx.go +++ b/server/pkg/validatorx/validatorx.go @@ -96,8 +96,8 @@ func Translate2Str(data any, err error) string { // 获取自定义的错误提示消息 // -// @param validTag 校验标签,如required等 -// @param customMsg 自定义错误消息 +// - validTag 校验标签,如required等 +// - customMsg 自定义错误消息 func getCustomErrMsg(validTag, customMsg string) string { // 解析 msg:"required=用户名不能为空,min=用户名长度不能小于8位" msgs := strings.Split(customMsg, ",") diff --git a/server/pkg/ws/client.go b/server/pkg/ws/client.go index 7a46ac1a..6e9ae3a9 100644 --- a/server/pkg/ws/client.go +++ b/server/pkg/ws/client.go @@ -13,7 +13,7 @@ import ( type UserId uint64 // 客户端读取消息处理函数 -// @param msg +// - msg type ReadMsgHandlerFunc func([]byte) type Client struct {