User

이메일 중복 여부 확인

localhost:8080/users/emails/check?email=user1@gmail.com

select
        user0_.user_id as user_id1_9_,
        user0_.created_at as created_2_9_,
        user0_.last_modified_at as last_mod3_9_,
        user0_.email as email4_9_,
        user0_.is_email_verified as is_email5_9_,
        user0_.password as password6_9_,
        user0_.profile_image_url as profile_7_9_,
        user0_.refresh_token as refresh_8_9_,
        user0_.status as status9_9_,
        user0_.username as usernam10_9_ 
    from
        users user0_ 
    where
        user0_.email=?
id Duration / Fetch Time select_type table partitions type possible_keys key rows filtered Extra
1 0.012 sec / 0.000013 sec SIMPLE no matching row in const table

회원 가입 전 이메일 인증 요청

localhost:8080/users/email-verification-requests?email=user1@gmail.com

select
        user0_.user_id as user_id1_9_,
        user0_.created_at as created_2_9_,
        user0_.last_modified_at as last_mod3_9_,
        user0_.email as email4_9_,
        user0_.is_email_verified as is_email5_9_,
        user0_.password as password6_9_,
        user0_.profile_image_url as profile_7_9_,
        user0_.refresh_token as refresh_8_9_,
        user0_.status as status9_9_,
        user0_.username as usernam10_9_ 
    from
        users user0_ 
    where
        user0_.email=?
insert 
    into
        email_verification
        (email_verification_id, created_at, last_modified_at, email, expiry_time, is_expired, verification_code) 
    values
        (default, ?, ?, ?, ?, ?, ?)
id Duration / Fetch Time select_type table partitions type possible_keys key rows filtered Extra
1 SIMPLE no matching row in const table

닉네임 중복 여부 확인

localhost:8080/users/usernames/check?username=마리jjiang

select
        user0_.user_id as user_id1_9_,
        user0_.created_at as created_2_9_,
        user0_.last_modified_at as last_mod3_9_,
        user0_.email as email4_9_,
        user0_.is_email_verified as is_email5_9_,
        user0_.password as password6_9_,
        user0_.profile_image_url as profile_7_9_,
        user0_.refresh_token as refresh_8_9_,
        user0_.status as status9_9_,
        user0_.username as usernam10_9_ 
    from
        users user0_ 
    where
        user0_.username=?
id Duration / Fetch Time select_type table partitions type possible_keys key rows filtered Extra
1 0.013 sec / 0.000014 sec SIMPLE users

회원가입

localhost:8080/users

insert 
    into
        users
        (created_at, last_modified_at, email, password, username, user_id) 
    values
        (?, ?, ?, ?, ?, default)
insert 
    into
        user_roles
        (user_user_id, roles) 
    values
        (?, ?)
id Duration / Fetch Time select_type table partitions type possible_keys key rows filtered Extra
1 0.0087 sec / 0.000015 sec INSERT users ALL
2 0.0080 sec / 0.000011 sec INSERT user_roles ALL

로그인

localhost:8080/users

select
        user0_.user_id as user_id1_9_,
        user0_.created_at as created_2_9_,
        user0_.last_modified_at as last_mod3_9_,
        user0_.email as email4_9_,
        user0_.is_email_verified as is_email5_9_,
        user0_.password as password6_9_,
        user0_.profile_image_url as profile_7_9_,
        user0_.refresh_token as refresh_8_9_,
        user0_.status as status9_9_,
        user0_.username as usernam10_9_ 
    from
        users user0_ 
    where
        user0_.email=?
select
        roles0_.user_user_id as user_use1_8_0_,
        roles0_.roles as roles2_8_0_ 
    from
        user_roles roles0_ 
    where
        roles0_.user_user_id=?

회원 개인 정보 통합 조회(마이페이지)

localhost:8080/users/21

select
        user0_.user_id as user_id1_9_0_,
        user0_.created_at as created_2_9_0_,
        user0_.last_modified_at as last_mod3_9_0_,
        user0_.email as email4_9_0_,
        user0_.is_email_verified as is_email5_9_0_,
        user0_.password as password6_9_0_,
        user0_.profile_image_url as profile_7_9_0_,
        user0_.refresh_token as refresh_8_9_0_,
        user0_.status as status9_9_0_,
        user0_.username as usernam10_9_0_,
        roles1_.user_user_id as user_use1_8_1_,
        roles1_.roles as roles2_8_1_ 
    from
        users user0_ 
    left outer join
        user_roles roles1_ 
            on user0_.user_id=roles1_.user_user_id 
    where
        user0_.user_id=?
select
        challenge0_.challenge_id as challeng1_3_,
        challenge0_.created_at as created_2_3_,
        challenge0_.last_modified_at as last_mod3_3_,
        challenge0_.habit_id as habit_id6_3_,
        challenge0_.last_auth_at as last_aut4_3_,
        challenge0_.status as status5_3_,
        challenge0_.user_id as user_id7_3_ 
    from
        challenge challenge0_ 
    left outer join
        users user1_ 
            on challenge0_.user_id=user1_.user_id 
    where
        user1_.user_id=? 
        and challenge0_.status=? 
        or user1_.user_id=? 
        and challenge0_.status=?
select
        challenge0_.challenge_id as challeng1_3_,
        challenge0_.created_at as created_2_3_,
        challenge0_.last_modified_at as last_mod3_3_,
        challenge0_.habit_id as habit_id6_3_,
        challenge0_.last_auth_at as last_aut4_3_,
        challenge0_.status as status5_3_,
        challenge0_.user_id as user_id7_3_ 
    from
        challenge challenge0_ 
    left outer join
        users user1_ 
            on challenge0_.user_id=user1_.user_id 
    where
        user1_.user_id=? 
        and challenge0_.status=? 
    order by
        challenge0_.challenge_id asc
select
        habit0_.habit_id as habit_id1_5_0_,
        habit0_.created_at as created_2_5_0_,
        habit0_.last_modified_at as last_mod3_5_0_,
        habit0_.auth_end_time as auth_end4_5_0_,
        habit0_.auth_start_time as auth_sta5_5_0_,
        habit0_.auth_type as auth_typ6_5_0_,
        habit0_.avg_score as avg_scor7_5_0_,
        habit0_.body as body8_5_0_,
        habit0_.category_id as categor15_5_0_,
        habit0_.challengers as challeng9_5_0_,
        habit0_.fail_img_url as fail_im10_5_0_,
        habit0_.user_id as user_id16_5_0_,
        habit0_.sub_title as sub_tit11_5_0_,
        habit0_.succ_img_url as succ_im12_5_0_,
        habit0_.thumb_img_url as thumb_i13_5_0_,
        habit0_.title as title14_5_0_ 
    from
        habit habit0_ 
    where
        habit0_.habit_id=?
select
        category0_.category_id as category1_2_0_,
        category0_.created_at as created_2_2_0_,
        category0_.last_modified_at as last_mod3_2_0_,
        category0_.type as type4_2_0_ 
    from
        category category0_ 
    where
        category0_.category_id=?

회원 정보 수정

localhost:8080/users/21

select
        user0_.user_id as user_id1_9_0_,
        user0_.created_at as created_2_9_0_,
        user0_.last_modified_at as last_mod3_9_0_,
        user0_.email as email4_9_0_,
        user0_.is_email_verified as is_email5_9_0_,
        user0_.password as password6_9_0_,
        user0_.profile_image_url as profile_7_9_0_,
        user0_.refresh_token as refresh_8_9_0_,
        user0_.status as status9_9_0_,
        user0_.username as usernam10_9_0_,
        roles1_.user_user_id as user_use1_8_1_,
        roles1_.roles as roles2_8_1_ 
    from
        users user0_ 
    left outer join
        user_roles roles1_ 
            on user0_.user_id=roles1_.user_user_id 
    where
        user0_.user_id=?
update
        users 
    set
        last_modified_at=?,
        is_email_verified=?,
        password=?,
        profile_image_url=?,
        refresh_token=?,
        status=?,
        username=? 
    where
        user_id=?