File tree Expand file tree Collapse file tree 1 file changed +23
-14
lines changed
spring-mybatis/src/main/java/com/hmkcode/spring/mybatis/mapper Expand file tree Collapse file tree 1 file changed +23
-14
lines changed Original file line number Diff line number Diff line change @@ -19,21 +19,30 @@ public interface Mapper {
1919 public List <Person > selectAllPerson ();
2020
2121
22- /**
23- * Retrieves a person
24- * @param person id
25- * @return person
26- */
27-
28- //SQL query using annotation
29- @ Select ("SELECT * FROM person" )
30- public List <Person > selectAllPerson2 ();
22+ /**
23+ * Retrieves a person
24+ * @param person id
25+ * @return person
26+ */
27+ //SQL query using annotation
28+ @ Select ("SELECT * FROM person" )
29+ public List <Person > selectAllPerson2 ();
3130
32- //SQL query using annotation
33- @ Select ("SELECT * FROM person WHERE id = #{id}" )
34- public Person selectPerson (@ Param ("id" ) int id );
31+ /******************************************
32+ * Retrieves a person
33+ * @param person id
34+ * @return person
35+ */
36+ //SQL query using annotation
37+ @ Select ("SELECT * FROM person WHERE id = #{id}" )
38+ public Person selectPerson (@ Param ("id" ) int id );
3539
36- @ Insert ("INSERT INTO person (id,name) VALUES(#{id},#{name})" )
37- public void insertPerson (Person person );
40+ /******************************************
41+ * Insert a person
42+ * @param person
43+ * @return int
44+ */
45+ @ Insert ("INSERT INTO person (name) VALUES (#{name})" )
46+ public int insertPerson (Person person );
3847}
3948
You can’t perform that action at this time.
0 commit comments