Commit 2fbee294 authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update

parent 91fb857d
......@@ -23,6 +23,10 @@ func (d *Dao) GetRecord(address string, page, pageSize int) (records []*dbmodel.
return
}
if total == 0 {
return
}
err = d.db.Model(&dbmodel.Record{}).
Where("address = ?", address).
Order("`id` desc").
......@@ -41,6 +45,13 @@ func (d *Dao) GetClaimedAmount(address string) (amt *decimal.Decimal, err error)
Where("address = ?", address).
Select("sum(claimed_amount) as claimed_amount").
Scan(amt).Error
if err != nil {
if strings.Contains(err.Error(), "record not found") {
err = nil
}
return
}
return
}
......
......@@ -16,7 +16,7 @@ services:
MYSQL_DATABASE: "agi"
sync:
image: claim-monitor:latest
image: docker.aigic.ai/caduceus/claim-monitor:v0.0.1
depends_on:
- db
command:
......@@ -27,7 +27,7 @@ services:
unless-stopped
api:
image: claim-monitor:latest
image: docker.aigic.ai/caduceus/claim-monitor:v0.0.1
ports:
- "28080:8080"
depends_on:
......
# claim-monitor
### build
```
make docker
docker tag claim-monitor:latest caduceus/claim-monitor:v0.0.1
docker push caduceus/claim-monitor:v0.0.1
```
### run
```
docker compose up -d db
docker compose up -d sync api
\ No newline at end of file
docker compose up -d sync api
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment