fix:#6 解决表号为空时候的sql错误
This commit is contained in:
parent
2bab62512a
commit
a3d4dbfca5
|
@ -18,8 +18,8 @@ func SetupRedisConnection() error {
|
|||
a := fmt.Sprintf("%s:%d", config.RedisSettings.Host, config.RedisSettings.Port)
|
||||
fmt.Println(a)
|
||||
Rd, err = rueidis.NewClient(rueidis.ClientOption{
|
||||
InitAddress: []string{"192.168.88.129:6379"},
|
||||
Password: "123456",
|
||||
InitAddress: []string{"127.0.0.1:6379"},
|
||||
Password: "",
|
||||
SelectDB: config.RedisSettings.DB,
|
||||
DisableCache: true,
|
||||
})
|
||||
|
|
|
@ -524,6 +524,9 @@ func (mr _MeterRepository) ListPooledMeterRelationsByCodes(pid string, codes []s
|
|||
defer cancel()
|
||||
|
||||
var relations []*model.MeterRelation
|
||||
if len(codes) <= 0 {
|
||||
return relations, nil
|
||||
}
|
||||
relationsSql, relationsArgs, _ := mr.ds.
|
||||
From(goqu.T("meter_relations").As("r")).
|
||||
Select("r.*").
|
||||
|
|
|
@ -12,9 +12,9 @@ Server:
|
|||
ReadTimeout: 60
|
||||
WriteTimeout: 60
|
||||
Redis:
|
||||
Host: 192.168.88.129
|
||||
Host: 127.0.0.1
|
||||
Port: 6379
|
||||
Password: 123456
|
||||
Password:
|
||||
DB: 1
|
||||
Service:
|
||||
MaxSessionLife: 2h
|
||||
|
|
Loading…
Reference in New Issue
Block a user