修复构建redis结果读取的异常 + 增加exist方法
This commit is contained in:
17
client.go
17
client.go
@ -74,13 +74,14 @@ func (o *OwnClient) Exec(ctx context.Context, instanceFlag string, command strin
|
||||
cmdParamList = append(cmdParamList, itemArg)
|
||||
}
|
||||
res := &define.RedisResult{
|
||||
StartTime: time.Now().UnixMilli(),
|
||||
FinishTime: 0,
|
||||
UsedTime: 0,
|
||||
Result: "",
|
||||
Command: command,
|
||||
ArgList: argStrList,
|
||||
Err: nil,
|
||||
StartTime: time.Now().UnixMilli(),
|
||||
FinishTime: 0,
|
||||
UsedTime: 0,
|
||||
Result: "",
|
||||
Command: command,
|
||||
ArgList: argStrList,
|
||||
Err: nil,
|
||||
InstanceFlag: instanceFlag,
|
||||
}
|
||||
defer func() {
|
||||
res.FinishTime = time.Now().UnixMilli()
|
||||
@ -110,7 +111,7 @@ func (o *OwnClient) Exec(ctx context.Context, instanceFlag string, command strin
|
||||
if res.Err = cmdRes.Err(); nil != res.Err {
|
||||
return res
|
||||
}
|
||||
res.Result = cmdRes.String()
|
||||
res.Result = wrapperOperate.AnyDataType(cmdRes.Val()).ToString().Value()
|
||||
return res
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user