refactor: 机器相关配置迁移至系统配置、pgsql数据操作完善、新增context-path

This commit is contained in:
meilin.huang
2023-11-12 20:14:44 +08:00
parent 27c53385f2
commit 76527d95bd
55 changed files with 793 additions and 404 deletions

View File

@@ -47,6 +47,18 @@ func (r *Redis) RedisTags(rc *req.Ctx) {
rc.ResData = r.TagApp.ListTagByAccountIdAndResource(rc.GetLoginAccount().Id, new(entity.Redis))
}
func (r *Redis) TestConn(rc *req.Ctx) {
form := &form.Redis{}
redis := ginx.BindJsonAndCopyTo[*entity.Redis](rc.GinCtx, form, new(entity.Redis))
// 密码解密,并使用解密后的赋值
originPwd, err := cryptox.DefaultRsaDecrypt(redis.Password, true)
biz.ErrIsNilAppendErr(err, "解密密码错误: %s")
redis.Password = originPwd
biz.ErrIsNil(r.RedisApp.TestConn(redis))
}
func (r *Redis) Save(rc *req.Ctx) {
form := &form.Redis{}
redis := ginx.BindJsonAndCopyTo[*entity.Redis](rc.GinCtx, form, new(entity.Redis))