total_count is added
This commit is contained in:
parent
ee98a22899
commit
d7ddfe5c46
|
@ -36,7 +36,7 @@ tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
|
||||||
tokio-cron-scheduler = { version = "0" }
|
tokio-cron-scheduler = { version = "0" }
|
||||||
uuid = { version = "0", features = ["serde", "v4", "v5"] }
|
uuid = { version = "0", features = ["serde", "v4", "v5"] }
|
||||||
|
|
||||||
beteran-protobuf-rust = { git = "https://gitlab.loafle.net/bet/beteran-protobuf-rust.git", tag = "v0.1.92-snapshot" }
|
beteran-protobuf-rust = { git = "https://gitlab.loafle.net/bet/beteran-protobuf-rust.git", tag = "v0.1.93-snapshot" }
|
||||||
beteran-common-rust = { git = "https://gitlab.loafle.net/bet/beteran-common-rust.git", tag = "v0.1.78-snapshot" }
|
beteran-common-rust = { git = "https://gitlab.loafle.net/bet/beteran-common-rust.git", tag = "v0.1.79-snapshot" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
@ -158,7 +158,7 @@ impl Service {
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
let count = self
|
let total_count = self
|
||||||
.betting_composition
|
.betting_composition
|
||||||
.select_all_count(&conn, &find_all)
|
.select_all_count(&conn, &find_all)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
|
@ -186,6 +186,7 @@ impl Service {
|
||||||
error: None,
|
error: None,
|
||||||
result: Some(
|
result: Some(
|
||||||
bpr::ss::api::betting::list_betting_history_response::Result {
|
bpr::ss::api::betting::list_betting_history_response::Result {
|
||||||
|
total_count: total_count as u64,
|
||||||
betting_history: list
|
betting_history: list
|
||||||
.iter()
|
.iter()
|
||||||
.map(bpr::models::api::betting::BettingHistory::from)
|
.map(bpr::models::api::betting::BettingHistory::from)
|
||||||
|
|
|
@ -136,7 +136,7 @@ impl Service {
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
let count = self
|
let total_count = self
|
||||||
.game_repository
|
.game_repository
|
||||||
.select_all_count(&conn, &find_all)
|
.select_all_count(&conn, &find_all)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
|
@ -163,6 +163,7 @@ impl Service {
|
||||||
bpr::ss::api::game::ListGamesResponse {
|
bpr::ss::api::game::ListGamesResponse {
|
||||||
error: None,
|
error: None,
|
||||||
result: Some(bpr::ss::api::game::list_games_response::Result {
|
result: Some(bpr::ss::api::game::list_games_response::Result {
|
||||||
|
total_count: total_count as u64,
|
||||||
games: list
|
games: list
|
||||||
.iter()
|
.iter()
|
||||||
.map(bpr::models::api::game::Game::from)
|
.map(bpr::models::api::game::Game::from)
|
||||||
|
|
3
src/services/vendor/service.rs
vendored
3
src/services/vendor/service.rs
vendored
|
@ -126,7 +126,7 @@ impl Service {
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
let count = self
|
let total_count = self
|
||||||
.vendor_repository
|
.vendor_repository
|
||||||
.select_all_count(&conn, &find_all)
|
.select_all_count(&conn, &find_all)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
|
@ -153,6 +153,7 @@ impl Service {
|
||||||
bpr::ss::api::vendor::ListVendorsResponse {
|
bpr::ss::api::vendor::ListVendorsResponse {
|
||||||
error: None,
|
error: None,
|
||||||
result: Some(bpr::ss::api::vendor::list_vendors_response::Result {
|
result: Some(bpr::ss::api::vendor::list_vendors_response::Result {
|
||||||
|
total_count: total_count as u64,
|
||||||
vendors: list
|
vendors: list
|
||||||
.iter()
|
.iter()
|
||||||
.map(bpr::models::api::vendor::Vendor::from)
|
.map(bpr::models::api::vendor::Vendor::from)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user