forked from free-lancers/electricity_bill_calc_service
fix(meter):修正数据库字段映射。
This commit is contained in:
@@ -135,14 +135,14 @@ func (mr _MeterRepository) MetersIn(pid string, page uint, keyword *string) ([]*
|
||||
).
|
||||
Where(
|
||||
goqu.I("m.park_id").Eq(pid),
|
||||
goqu.I("m.detachedAt").IsNull(),
|
||||
goqu.I("m.detached_at").IsNull(),
|
||||
)
|
||||
countQuery := mr.ds.
|
||||
From(goqu.T("meter_04kv").As("m")).
|
||||
Select(goqu.COUNT("*")).
|
||||
Where(
|
||||
goqu.I("m.park_id").Eq(pid),
|
||||
goqu.I("m.detachedAt").IsNull(),
|
||||
goqu.I("m.detached_at").IsNull(),
|
||||
)
|
||||
|
||||
if keyword != nil && len(*keyword) > 0 {
|
||||
@@ -498,12 +498,12 @@ func (mr _MeterRepository) ListPooledMeterRelations(pid, code string) ([]*model.
|
||||
|
||||
var relations []*model.MeterRelation
|
||||
relationsSql, relationsArgs, _ := mr.ds.
|
||||
From(goqu.T("meter_relations")).
|
||||
Select("*").
|
||||
From(goqu.T("meter_relations").As("r")).
|
||||
Select("r.*").
|
||||
Where(
|
||||
goqu.I("r.park_id").Eq(pid),
|
||||
goqu.I("r.master_meter_id").Eq(code),
|
||||
goqu.I("r.revoke_at").IsNull(),
|
||||
goqu.I("r.revoked_at").IsNull(),
|
||||
).
|
||||
Prepared(true).ToSQL()
|
||||
|
||||
|
Reference in New Issue
Block a user