model is modified
This commit is contained in:
parent
b142831820
commit
654d98aa13
|
@ -36,7 +36,7 @@ tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
|
|||
tokio-cron-scheduler = { version = "0" }
|
||||
uuid = { version = "0", features = ["serde", "v4", "v5"] }
|
||||
|
||||
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.79-snapshot" }
|
||||
beteran-protobuf-rust = { git = "https://gitlab.loafle.net/bet/beteran-protobuf-rust.git", tag = "v0.1.94-snapshot" }
|
||||
beteran-common-rust = { git = "https://gitlab.loafle.net/bet/beteran-common-rust.git", tag = "v0.1.80-snapshot" }
|
||||
|
||||
[build-dependencies]
|
||||
|
|
|
@ -9,6 +9,8 @@ SELECT
|
|||
FROM api_kgon_betting_history as akbh
|
||||
INNER JOIN members m
|
||||
ON m.username = akbh.site_username
|
||||
LEFT OUTER JOIN member_settlement_settings m_mss
|
||||
ON m_mss.member_id = m.id
|
||||
";
|
||||
|
||||
static BETTING_HISTORY_QUERY: &str = "
|
||||
|
@ -24,14 +26,15 @@ SELECT
|
|||
akbh.cash as akbh_cash ,
|
||||
akbh.before_cash as akbh_before_cash ,
|
||||
akbh.after_cash as akbh_after_cash ,
|
||||
akbh.key as akbh_key ,
|
||||
akbh.ref_id as akbh_ref_id ,
|
||||
akbh.o_ref_id as akbh_o_ref_id ,
|
||||
akbh.group_key as akbh_group_key ,
|
||||
akbh.detail as akbh_detail ,
|
||||
akbh.is_bonus as akbh_is_bonus ,
|
||||
akbh.is_promo as akbh_is_promo ,
|
||||
akbh.is_jackpot as akbh_is_jackpot ,
|
||||
akbh.site_username as akbh_site_username ,
|
||||
akbh.key as akbh_key ,
|
||||
akbh.ref_id as akbh_ref_id ,
|
||||
akbh.o_ref_id as akbh_o_ref_id ,
|
||||
akbh.betting_type as akbh_betting_type ,
|
||||
akbh.category as akbh_category ,
|
||||
akbh.created_at as akbh_created_at ,
|
||||
|
@ -53,12 +56,40 @@ SELECT
|
|||
m.last_signined_at as m_last_signined_at,
|
||||
m.created_at as m_created_at,
|
||||
m.updated_at as m_updated_at,
|
||||
m.deleted_at as m_deleted_at
|
||||
m.deleted_at as m_deleted_at,
|
||||
|
||||
m_mss.id as m_mss_id,
|
||||
m_mss.member_id as m_mss_member_id,
|
||||
m_mss.can_exchange as m_mss_can_exchange,
|
||||
m_mss.can_first_charge_comp as m_mss_can_first_charge_comp,
|
||||
m_mss.can_per_charge_comp as m_mss_can_per_charge_comp,
|
||||
m_mss.manual_payment_type_for_partner as m_mss_manual_payment_type_for_partner,
|
||||
m_mss.settlement_type as m_mss_settlement_type,
|
||||
m_mss.rate_casino as m_mss_rate_casino,
|
||||
m_mss.rate_casino_loosing as m_mss_rate_casino_loosing,
|
||||
m_mss.rate_casino_bacara as m_mss_rate_casino_bacara,
|
||||
m_mss.rate_casino_roulette as m_mss_rate_casino_roulette,
|
||||
m_mss.rate_casino_dragon_tiger as m_mss_rate_casino_dragon_tiger,
|
||||
m_mss.rate_slot as m_mss_rate_slot,
|
||||
m_mss.rate_slot_loosing as m_mss_rate_slot_loosing,
|
||||
m_mss.rate_powerball_single as m_mss_rate_powerball_single,
|
||||
m_mss.rate_powerball_combo as m_mss_rate_powerball_combo,
|
||||
m_mss.rate_powerladder_single as m_mss_rate_powerladder_single,
|
||||
m_mss.rate_powerladder_combo as m_mss_rate_powerladder_combo,
|
||||
m_mss.rate_eos_single as m_mss_rate_eos_single,
|
||||
m_mss.rate_eos_combo as m_mss_rate_eos_combo,
|
||||
m_mss.rate_bogglepowerball_single as m_mss_rate_bogglepowerball_single,
|
||||
m_mss.rate_bogglepowerball_combo as m_mss_rate_bogglepowerball_combo,
|
||||
m_mss.created_at as m_mss_created_at,
|
||||
m_mss.updated_at as m_mss_updated_at
|
||||
|
||||
|
||||
|
||||
FROM api_kgon_betting_history as akbh
|
||||
INNER JOIN members m
|
||||
ON m.username = akbh.site_username
|
||||
LEFT OUTER JOIN member_settlement_settings m_mss
|
||||
ON m_mss.member_id = m.id
|
||||
|
||||
";
|
||||
|
||||
|
|
|
@ -27,14 +27,10 @@ pub struct BettingHistoryModel {
|
|||
///
|
||||
pub after_cash: f64,
|
||||
///
|
||||
pub key: String,
|
||||
///
|
||||
pub ref_id: String,
|
||||
///
|
||||
pub o_ref_id: String,
|
||||
///
|
||||
pub group_key: Option<String>,
|
||||
///
|
||||
pub detail: Option<String>,
|
||||
///
|
||||
pub is_bonus: bool,
|
||||
///
|
||||
pub is_promo: bool,
|
||||
|
@ -43,6 +39,12 @@ pub struct BettingHistoryModel {
|
|||
///
|
||||
pub site_username: String,
|
||||
///
|
||||
pub key: String,
|
||||
///
|
||||
pub ref_id: String,
|
||||
///
|
||||
pub o_ref_id: String,
|
||||
///
|
||||
pub betting_type: String,
|
||||
///
|
||||
pub category: String,
|
||||
|
@ -66,14 +68,15 @@ impl QueryableByName<diesel::pg::Pg> for BettingHistoryModel {
|
|||
cash: row.get("akbh_cash")?,
|
||||
before_cash: row.get("akbh_before_cash")?,
|
||||
after_cash: row.get("akbh_after_cash")?,
|
||||
key: row.get("akbh_key")?,
|
||||
ref_id: row.get("akbh_ref_id")?,
|
||||
o_ref_id: row.get("akbh_o_ref_id")?,
|
||||
group_key: row.get("akbh_group_key")?,
|
||||
detail: row.get("akbh_detail")?,
|
||||
is_bonus: row.get("akbh_is_bonus")?,
|
||||
is_promo: row.get("akbh_is_promo")?,
|
||||
is_jackpot: row.get("akbh_is_jackpot")?,
|
||||
site_username: row.get("akbh_site_username")?,
|
||||
key: row.get("akbh_key")?,
|
||||
ref_id: row.get("akbh_ref_id")?,
|
||||
o_ref_id: row.get("akbh_o_ref_id")?,
|
||||
betting_type: row.get("akbh_betting_type")?,
|
||||
category: row.get("akbh_category")?,
|
||||
created_at: row.get("akbh_created_at")?,
|
||||
|
|
|
@ -17,14 +17,15 @@ impl From<&compositions::betting::models::BettingHistoryModel>
|
|||
cash: d.cash,
|
||||
before_cash: d.before_cash,
|
||||
after_cash: d.after_cash,
|
||||
key: d.key.clone(),
|
||||
ref_id: d.ref_id.clone(),
|
||||
o_ref_id: d.o_ref_id.clone(),
|
||||
group_key: d.group_key.clone(),
|
||||
detail: d.detail.clone(),
|
||||
is_bonus: d.is_bonus,
|
||||
is_promo: d.is_promo,
|
||||
is_jackpot: d.is_jackpot,
|
||||
site_username: d.site_username.clone(),
|
||||
key: d.key.clone(),
|
||||
ref_id: d.ref_id.clone(),
|
||||
o_ref_id: d.o_ref_id.clone(),
|
||||
betting_type: d.betting_type.clone(),
|
||||
category: d.category.clone(),
|
||||
created_at: d.created_at as u64,
|
||||
|
|
Loading…
Reference in New Issue
Block a user