fix bug
This commit is contained in:
parent
fe13b65016
commit
e02bca8ad2
@ -16,7 +16,7 @@ spec:
|
||||
image: <Image>
|
||||
resources:
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
memory: "64Mi"
|
||||
cpu: "100m"
|
||||
envFrom:
|
||||
- secretRef:
|
||||
|
@ -83,9 +83,12 @@ impl Controller {
|
||||
|
||||
let query = match chat.is_group() || chat.is_supergroup() {
|
||||
true => {
|
||||
Stats::find()
|
||||
Stats::find().select_only()
|
||||
.column(StatsColumn::Name)
|
||||
.column_as(StatsColumn::Counts.sum(), "counts")
|
||||
.filter(StatsColumn::GroupId.eq(chat.id.0))
|
||||
.order_by_desc(StatsColumn::Counts)
|
||||
.group_by(StatsColumn::Name)
|
||||
.order_by_desc(StatsColumn::Counts.sum())
|
||||
.limit(LIMIT).into_model()
|
||||
.all(&transcation)
|
||||
.await
|
||||
|
Loading…
Reference in New Issue
Block a user