forked from xuwujing/springBoot-study
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
136 additions
and
404 deletions.
There are no files selected for viewing
16 changes: 0 additions & 16 deletions
16
springboot-transactional/src/main/java/com/pancm/dao/StudentDao.java
This file was deleted.
Oops, something went wrong.
74 changes: 35 additions & 39 deletions
74
springboot-transactional/src/main/java/com/pancm/dao/UserDao.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,35 @@ | ||
package com.pancm.dao; | ||
|
||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.Insert; | ||
import org.apache.ibatis.annotations.Mapper; | ||
import org.apache.ibatis.annotations.Select; | ||
import org.apache.ibatis.annotations.Update; | ||
|
||
import com.pancm.pojo.User; | ||
|
||
/** | ||
* | ||
* @Title: UserDao | ||
* @Description: | ||
* 用户数据接口 | ||
* @Version:1.0.0 | ||
* @author pancm | ||
* @date 2018年1月9日 | ||
*/ | ||
@Mapper | ||
public interface UserDao{ | ||
|
||
|
||
@Insert("insert into t_user(id,name,age) values (#{id},#{name},#{age})") | ||
void insert(User user); | ||
|
||
|
||
@Update("update t_user set name=#{name}, age=#{age} where id=#{id}") | ||
void update(User user); | ||
|
||
|
||
@Delete("delete from t_user where id=#{id}") | ||
void delete(long id); | ||
|
||
@Select("SELECT * FROM t_user where id=#{id}") | ||
User findById(long id); | ||
|
||
|
||
} | ||
package com.pancm.dao; | ||
|
||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.Insert; | ||
import org.apache.ibatis.annotations.Mapper; | ||
import org.apache.ibatis.annotations.Select; | ||
import org.apache.ibatis.annotations.Update; | ||
|
||
import com.pancm.pojo.User; | ||
|
||
import java.sql.SQLException; | ||
|
||
/** | ||
* | ||
* @Title: UserDao | ||
* @Description: | ||
* 用户数据接口 | ||
* @Version:1.0.0 | ||
* @author pancm | ||
* @date 2018年1月9日 | ||
*/ | ||
@Mapper | ||
public interface UserDao{ | ||
|
||
|
||
@Insert("insert into t_user(id,name,age) values (#{id},#{name},#{age})") | ||
void insert(User user) throws SQLException; | ||
|
||
@Update("update t_user set name=#{name}, age=#{age} where id=#{id}") | ||
void update(User user) throws SQLException; | ||
|
||
@Select("SELECT * FROM t_user where id=#{id}") | ||
User findById(long id); | ||
|
||
} |
65 changes: 0 additions & 65 deletions
65
springboot-transactional/src/main/java/com/pancm/pojo/Student.java
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
springboot-transactional/src/main/java/com/pancm/service/StudentService.java
This file was deleted.
Oops, something went wrong.
54 changes: 26 additions & 28 deletions
54
springboot-transactional/src/main/java/com/pancm/service/UserService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
package com.pancm.service; | ||
|
||
import com.pancm.pojo.User; | ||
|
||
/** | ||
* | ||
* @Title: UserService | ||
* @Description: | ||
* 用户接口 | ||
* @Version:1.0.0 | ||
* @author pancm | ||
* @date 2018年3月19日 | ||
*/ | ||
public interface UserService { | ||
|
||
boolean test1(User user) throws Exception ; | ||
|
||
boolean test2(User user); | ||
|
||
boolean test3(User user); | ||
|
||
boolean test4(User user); | ||
|
||
boolean test5(User user); | ||
|
||
|
||
|
||
} | ||
package com.pancm.service; | ||
|
||
import com.pancm.pojo.User; | ||
|
||
/** | ||
* | ||
* @Title: UserService | ||
* @Description: | ||
* 用户接口 | ||
* @Version:1.0.0 | ||
* @author pancm | ||
* @date 2018年3月19日 | ||
*/ | ||
public interface UserService { | ||
|
||
boolean test1(User user) throws Exception ; | ||
|
||
boolean test2(User user); | ||
|
||
boolean test3(User user); | ||
|
||
boolean test4(User user); | ||
|
||
|
||
|
||
} |
23 changes: 0 additions & 23 deletions
23
springboot-transactional/src/main/java/com/pancm/service/impl/StudentServiceImpl.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.