bug fixed
This commit is contained in:
parent
92eb996bbd
commit
2e051c3673
|
@ -34,76 +34,76 @@ impl Composition {
|
||||||
match sql_query(
|
match sql_query(
|
||||||
"
|
"
|
||||||
SELECT
|
SELECT
|
||||||
m.id as m_id,
|
m.id as m_id,
|
||||||
m.site_id as m_site_id,
|
m.site_id as m_site_id,
|
||||||
m.member_class_id as m_member_class_id,
|
m.member_class_id as m_member_class_id,
|
||||||
m.member_level_id as m_member_level_id,
|
m.member_level_id as m_member_level_id,
|
||||||
m.username as m_username,
|
m.username as m_username,
|
||||||
m.password as m_password,
|
m.password as m_password,
|
||||||
m.nickname as m_nickname,
|
m.nickname as m_nickname,
|
||||||
m.mobile_phone_number as m_mobile_phone_number,
|
m.mobile_phone_number as m_mobile_phone_number,
|
||||||
m.state as m_state,
|
m.state as m_state,
|
||||||
m.state_changed_at as m_state_changed_at,
|
m.state_changed_at as m_state_changed_at,
|
||||||
m.referrer_member_id as m_referrer_member_id,
|
m.referrer_member_id as m_referrer_member_id,
|
||||||
m.referred_count as m_referred_count,
|
m.referred_count as m_referred_count,
|
||||||
m.last_signined_ip as m_last_signined_ip,
|
m.last_signined_ip as m_last_signined_ip,
|
||||||
m.last_signined_at as m_last_signined_at,
|
m.last_signined_at as m_last_signined_at,
|
||||||
m.created_at as m_created_at,
|
m.created_at as m_created_at,
|
||||||
m.updated_at as m_updated_at,
|
m.updated_at as m_updated_at,
|
||||||
m.deleted_at as m_deleted_at,
|
m.deleted_at as m_deleted_at,
|
||||||
|
|
||||||
s.id as s_id,
|
s.id as s_id,
|
||||||
s.url as s_url,
|
s.url as s_url,
|
||||||
s.name as s_name,
|
s.name as s_name,
|
||||||
s.path as s_path,
|
s.path as s_path,
|
||||||
s.show as s_show,
|
s.show as s_show,
|
||||||
s.can_use as s_can_use,
|
s.can_use as s_can_use,
|
||||||
s.memo as s_memo,
|
s.memo as s_memo,
|
||||||
s.expires_at as s_expires_at,
|
s.expires_at as s_expires_at,
|
||||||
s.created_at as s_created_at,
|
s.created_at as s_created_at,
|
||||||
s.updated_at as s_updated_at,
|
s.updated_at as s_updated_at,
|
||||||
|
|
||||||
mc.id as mc_id,
|
mc.id as mc_id,
|
||||||
mc.parent_id as mc_parent_id,
|
mc.parent_id as mc_parent_id,
|
||||||
mc.name as mc_name,
|
mc.name as mc_name,
|
||||||
mc.created_at as mc_created_at,
|
mc.created_at as mc_created_at,
|
||||||
mc.updated_at as mc_updated_at,
|
mc.updated_at as mc_updated_at,
|
||||||
mc.deleted_at as mc_deleted_at,
|
mc.deleted_at as mc_deleted_at,
|
||||||
|
|
||||||
ml.id as ml_id,
|
ml.id as ml_id,
|
||||||
ml.name as ml_name,
|
ml.name as ml_name,
|
||||||
ml.sort_order as ml_sort_order,
|
ml.sort_order as ml_sort_order,
|
||||||
ml.created_at as ml_created_at,
|
ml.created_at as ml_created_at,
|
||||||
ml.updated_at as ml_updated_at,
|
ml.updated_at as ml_updated_at,
|
||||||
ml.deleted_at as ml_deleted_at,
|
ml.deleted_at as ml_deleted_at,
|
||||||
|
|
||||||
_m.id as _m_id,
|
_m.id as _m_id,
|
||||||
_m.site_id as _m_site_id,
|
_m.site_id as _m_site_id,
|
||||||
_m.member_class_id as _m_member_class_id,
|
_m.member_class_id as _m_member_class_id,
|
||||||
_m.member_level_id as _m_member_level_id,
|
_m.member_level_id as _m_member_level_id,
|
||||||
_m.username as _m_username,
|
_m.username as _m_username,
|
||||||
_m.password as _m_password,
|
_m.password as _m_password,
|
||||||
_m.nickname as _m_nickname,
|
_m.nickname as _m_nickname,
|
||||||
_m.mobile_phone_number as _m_mobile_phone_number,
|
_m.mobile_phone_number as _m_mobile_phone_number,
|
||||||
_m.state as _m_state,
|
_m.state as _m_state,
|
||||||
_m.state_changed_at as _m_state_changed_at,
|
_m.state_changed_at as _m_state_changed_at,
|
||||||
_m.referrer_member_id as _m_referrer_member_id,
|
_m.referrer_member_id as _m_referrer_member_id,
|
||||||
_m.referred_count as _m_referred_count,
|
_m.referred_count as _m_referred_count,
|
||||||
_m.last_signined_ip as _m_last_signined_ip,
|
_m.last_signined_ip as _m_last_signined_ip,
|
||||||
_m.last_signined_at as _m_last_signined_at,
|
_m.last_signined_at as _m_last_signined_at,
|
||||||
_m.created_at as _m_created_at,
|
_m.created_at as _m_created_at,
|
||||||
_m.updated_at as _m_updated_at,
|
_m.updated_at as _m_updated_at,
|
||||||
_m.deleted_at as _m_deleted_at
|
_m.deleted_at as _m_deleted_at
|
||||||
|
|
||||||
FROM members as m
|
FROM members as m
|
||||||
JOIN sites s
|
INNER JOIN sites s
|
||||||
ON s.id = m.site_id
|
ON s.id = m.site_id
|
||||||
JOIN member_classes mc
|
INNER JOIN member_classes mc
|
||||||
ON mc.id = m.member_class_id
|
ON mc.id = m.member_class_id
|
||||||
JOIN member_levels ml
|
INNER JOIN member_levels ml
|
||||||
ON ml.id = m.member_level_id
|
ON ml.id = m.member_level_id
|
||||||
JOIN members _m
|
LEFT OUTER JOIN members _m
|
||||||
ON _m.id = m.referrer_member_id
|
ON _m.id = m.referrer_member_id
|
||||||
WHERE
|
WHERE
|
||||||
m.id = $1
|
m.id = $1
|
||||||
",
|
",
|
||||||
|
@ -128,76 +128,76 @@ impl Composition {
|
||||||
match sql_query(
|
match sql_query(
|
||||||
"
|
"
|
||||||
SELECT
|
SELECT
|
||||||
m.id as m_id,
|
m.id as m_id,
|
||||||
m.site_id as m_site_id,
|
m.site_id as m_site_id,
|
||||||
m.member_class_id as m_member_class_id,
|
m.member_class_id as m_member_class_id,
|
||||||
m.member_level_id as m_member_level_id,
|
m.member_level_id as m_member_level_id,
|
||||||
m.username as m_username,
|
m.username as m_username,
|
||||||
m.password as m_password,
|
m.password as m_password,
|
||||||
m.nickname as m_nickname,
|
m.nickname as m_nickname,
|
||||||
m.mobile_phone_number as m_mobile_phone_number,
|
m.mobile_phone_number as m_mobile_phone_number,
|
||||||
m.state as m_state,
|
m.state as m_state,
|
||||||
m.state_changed_at as m_state_changed_at,
|
m.state_changed_at as m_state_changed_at,
|
||||||
m.referrer_member_id as m_referrer_member_id,
|
m.referrer_member_id as m_referrer_member_id,
|
||||||
m.referred_count as m_referred_count,
|
m.referred_count as m_referred_count,
|
||||||
m.last_signined_ip as m_last_signined_ip,
|
m.last_signined_ip as m_last_signined_ip,
|
||||||
m.last_signined_at as m_last_signined_at,
|
m.last_signined_at as m_last_signined_at,
|
||||||
m.created_at as m_created_at,
|
m.created_at as m_created_at,
|
||||||
m.updated_at as m_updated_at,
|
m.updated_at as m_updated_at,
|
||||||
m.deleted_at as m_deleted_at,
|
m.deleted_at as m_deleted_at,
|
||||||
|
|
||||||
s.id as s_id,
|
s.id as s_id,
|
||||||
s.url as s_url,
|
s.url as s_url,
|
||||||
s.name as s_name,
|
s.name as s_name,
|
||||||
s.path as s_path,
|
s.path as s_path,
|
||||||
s.show as s_show,
|
s.show as s_show,
|
||||||
s.can_use as s_can_use,
|
s.can_use as s_can_use,
|
||||||
s.memo as s_memo,
|
s.memo as s_memo,
|
||||||
s.expires_at as s_expires_at,
|
s.expires_at as s_expires_at,
|
||||||
s.created_at as s_created_at,
|
s.created_at as s_created_at,
|
||||||
s.updated_at as s_updated_at,
|
s.updated_at as s_updated_at,
|
||||||
|
|
||||||
mc.id as mc_id,
|
mc.id as mc_id,
|
||||||
mc.parent_id as mc_parent_id,
|
mc.parent_id as mc_parent_id,
|
||||||
mc.name as mc_name,
|
mc.name as mc_name,
|
||||||
mc.created_at as mc_created_at,
|
mc.created_at as mc_created_at,
|
||||||
mc.updated_at as mc_updated_at,
|
mc.updated_at as mc_updated_at,
|
||||||
mc.deleted_at as mc_deleted_at,
|
mc.deleted_at as mc_deleted_at,
|
||||||
|
|
||||||
ml.id as ml_id,
|
ml.id as ml_id,
|
||||||
ml.name as ml_name,
|
ml.name as ml_name,
|
||||||
ml.sort_order as ml_sort_order,
|
ml.sort_order as ml_sort_order,
|
||||||
ml.created_at as ml_created_at,
|
ml.created_at as ml_created_at,
|
||||||
ml.updated_at as ml_updated_at,
|
ml.updated_at as ml_updated_at,
|
||||||
ml.deleted_at as ml_deleted_at,
|
ml.deleted_at as ml_deleted_at,
|
||||||
|
|
||||||
_m.id as _m_id,
|
_m.id as _m_id,
|
||||||
_m.site_id as _m_site_id,
|
_m.site_id as _m_site_id,
|
||||||
_m.member_class_id as _m_member_class_id,
|
_m.member_class_id as _m_member_class_id,
|
||||||
_m.member_level_id as _m_member_level_id,
|
_m.member_level_id as _m_member_level_id,
|
||||||
_m.username as _m_username,
|
_m.username as _m_username,
|
||||||
_m.password as _m_password,
|
_m.password as _m_password,
|
||||||
_m.nickname as _m_nickname,
|
_m.nickname as _m_nickname,
|
||||||
_m.mobile_phone_number as _m_mobile_phone_number,
|
_m.mobile_phone_number as _m_mobile_phone_number,
|
||||||
_m.state as _m_state,
|
_m.state as _m_state,
|
||||||
_m.state_changed_at as _m_state_changed_at,
|
_m.state_changed_at as _m_state_changed_at,
|
||||||
_m.referrer_member_id as _m_referrer_member_id,
|
_m.referrer_member_id as _m_referrer_member_id,
|
||||||
_m.referred_count as _m_referred_count,
|
_m.referred_count as _m_referred_count,
|
||||||
_m.last_signined_ip as _m_last_signined_ip,
|
_m.last_signined_ip as _m_last_signined_ip,
|
||||||
_m.last_signined_at as _m_last_signined_at,
|
_m.last_signined_at as _m_last_signined_at,
|
||||||
_m.created_at as _m_created_at,
|
_m.created_at as _m_created_at,
|
||||||
_m.updated_at as _m_updated_at,
|
_m.updated_at as _m_updated_at,
|
||||||
_m.deleted_at as _m_deleted_at
|
_m.deleted_at as _m_deleted_at
|
||||||
|
|
||||||
FROM members as m
|
FROM members as m
|
||||||
JOIN sites s
|
INNER JOIN sites s
|
||||||
ON s.id = m.site_id
|
ON s.id = m.site_id
|
||||||
JOIN member_classes mc
|
INNER JOIN member_classes mc
|
||||||
ON mc.id = m.member_class_id
|
ON mc.id = m.member_class_id
|
||||||
JOIN member_levels ml
|
INNER JOIN member_levels ml
|
||||||
ON ml.id = m.member_level_id
|
ON ml.id = m.member_level_id
|
||||||
JOIN members _m
|
LEFT OUTER JOIN members _m
|
||||||
ON _m.id = m.referrer_member_id
|
ON _m.id = m.referrer_member_id
|
||||||
WHERE
|
WHERE
|
||||||
m.username = $1
|
m.username = $1
|
||||||
",
|
",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user