|
4 | 4 | <mapper namespace="com.example.moviezip.dao.mybatis.mapper.UserMapper"> |
5 | 5 |
|
6 | 6 | <!-- 사용자를 가져옴 --> |
7 | | - <select id="getUserById" resultType="User"> |
| 7 | + <select id="getUserById" resultType="com.example.moviezip.domain.User"> |
8 | 8 | SELECT * FROM USER_TABLE WHERE ID = #{id} |
9 | 9 | </select> |
10 | 10 |
|
|
16 | 16 | UPDATE USER_TABLE SET PASSWORD = #{newPassword} WHERE ID = #{id} |
17 | 17 | </update> |
18 | 18 |
|
19 | | - <select id="findUser" resultType="User"> |
| 19 | + <select id="findUser" resultType="com.example.moviezip.domain.User"> |
20 | 20 | SELECT * FROM USER_TABLE WHERE HINT = #{hint} AND NICKNAME = #{nickname} |
21 | 21 | </select> |
22 | 22 | <update id="updateUserNickname"> |
23 | 23 | UPDATE USER_TABLE SET NICKNAME = #{newNickname} WHERE ID = #{id} |
24 | 24 | </update> |
25 | | - <select id="existingUserNickname" resultType="User"> |
| 25 | + <select id="existingUserNickname" resultType="com.example.moviezip.domain.User"> |
26 | 26 | SELECT * FROM USER_TABLE WHERE NICKNAME = #{nickname} |
27 | 27 | </select> |
28 | 28 | <delete id="deleteUser"> |
29 | 29 | DELETE FROM USER_TABLE WHERE ID = #{id} |
30 | 30 | </delete> |
31 | | - <select id="findAllUser" resultType="User"> |
| 31 | + <select id="findAllUser" resultType="com.example.moviezip.domain.User"> |
32 | 32 | SELECT * FROM USER_TABLE |
33 | 33 | </select> |
34 | 34 |
|
|
49 | 49 | <update id="updateInterest"> |
50 | 50 | UPDATE INTEREST SET GENRE = #{genre} WHERE ID = #{id} |
51 | 51 | </update> |
52 | | - <insert id="addUser" parameterType="User"> |
| 52 | + <insert id="addUser" parameterType="com.example.moviezip.domain.User"> |
53 | 53 | <selectKey keyProperty="id" resultType="java.lang.Long" order="BEFORE"> |
54 | 54 | SELECT SEQUENCE_USERID.NEXTVAL FROM DUAL |
55 | 55 | </selectKey> |
|
59 | 59 | (#{id}, #{userId, jdbcType=VARCHAR}, #{password, jdbcType=VARCHAR}, #{nickname, jdbcType=VARCHAR}, #{hint, jdbcType=VARCHAR}) |
60 | 60 | </insert> |
61 | 61 |
|
62 | | - <select id="findAllUserInterest" resultType="User"> |
| 62 | + <select id="findAllUserInterest" resultType="com.example.moviezip.domain.User"> |
63 | 63 | -- SELECT USER_TABLE.ID AS id, USER_TABLE.USER_ID AS user_id, USER_TABLE.PASSWORD AS password, USER_TABLE.NICKNAME AS nickname, USER_TABLE.HINT AS hint, INTEREST.GENRE AS interest |
64 | 64 | SELECT USER_TABLE.ID AS id, USER_TABLE.UserId AS UserId, USER_TABLE.PASSWORD AS password, USER_TABLE.NICKNAME AS nickname, USER_TABLE.HINT AS hint, GENRE AS "interest.genre" |
65 | 65 | FROM USER_TABLE |
|
73 | 73 | WHERE MOVIE_TITLE LIKE '%' || #{keyword} || '%' |
74 | 74 | </select> |
75 | 75 |
|
76 | | - <select id="findByUserId" resultType="User"> |
| 76 | + <select id="findByUserId" resultType="com.example.moviezip.domain.User"> |
77 | 77 | SELECT * |
78 | 78 | FROM USER_TABLE |
79 | 79 | WHERE USERID = #{userId, jdbcType=VARCHAR} |
80 | 80 | </select> |
81 | 81 |
|
82 | | - <select id="getUserById2" resultType="User"> |
| 82 | + <select id="getUserById2" resultType="com.example.moviezip.domain.User"> |
83 | 83 | SELECT * FROM USER_TABLE WHERE ID = #{id} |
84 | 84 | </select> |
85 | 85 |
|
|
0 commit comments