上传db代码修复

This commit is contained in:
liwei1dao 2022-10-18 15:10:55 +08:00
parent 9a78cbbacf
commit d2c5c4d3b7

View File

@ -701,8 +701,7 @@ func (this *DBModel) GetListFields(uid string, id string, data interface{}, fiel
func (this *DBModel) GetListObj(uid string, id string, data interface{}) (err error) {
//defer log.Debug("DBModel GetListObj", log.Field{Key: "TableName", Value: this.TableName}, log.Field{Key: "uid", Value: uid}, log.Field{Key: "id", Value: id}, log.Field{Key: "data", Value: data})
var (
keys map[string]string
tempdata map[string]string
keys map[string]string
)
keys = make(map[string]string)
if err = this.Redis.HGetAll(this.ukeylist(uid, id), data); err != nil && err != lgredis.RedisNil {
@ -714,7 +713,7 @@ func (this *DBModel) GetListObj(uid string, id string, data interface{}) (err er
} else {
pipe := this.Redis.RedisPipe(context.TODO())
key := this.ukeylist(uid, id)
pipe.HMSetForMap(key, tempdata)
pipe.HMSet(key, data)
keys[id] = key
pipe.HMSetForMap(this.ukey(uid), keys)
if _, err = pipe.Exec(); err != nil {