forked from westxixia/ssmssm
-
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
39 changed files
with
631 additions
and
120 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
package com.ssmssm.core.dao; | ||
|
||
import java.util.List; | ||
|
||
import org.apache.ibatis.annotations.Param; | ||
|
||
import com.ssmssm.core.entity.BaseCriteria; | ||
import com.ssmssm.core.entity.BaseEntity; | ||
|
||
public interface BaseDao { | ||
|
||
/** | ||
* 根据条件检索数据件数 | ||
* @param example | ||
* @return | ||
*/ | ||
int countByExample(BaseCriteria example); | ||
|
||
/** | ||
* 根据主键检索数据 | ||
* @param key | ||
* @return | ||
*/ | ||
BaseEntity selectByPrimaryKey(BaseEntity key); | ||
|
||
/** | ||
* 根据条件检索数据 | ||
* @param example | ||
* @return | ||
*/ | ||
List<BaseEntity> selectByExample(BaseCriteria example); | ||
|
||
/** | ||
* 新增数据 | ||
* @param record | ||
* @return | ||
*/ | ||
int insert(BaseEntity record); | ||
|
||
/** | ||
* 根据条件新增数据(null不处理) | ||
* @param record | ||
* @return | ||
*/ | ||
int insertSelective(BaseEntity record); | ||
|
||
/** | ||
* 根据主键更新数据 | ||
* @param record | ||
* @return | ||
*/ | ||
int updateByPrimaryKey(BaseEntity record); | ||
|
||
/** | ||
* 根据主键更新数据(null不处理) | ||
* @param record | ||
* @return | ||
*/ | ||
int updateByPrimaryKeySelective(BaseEntity record); | ||
|
||
/** | ||
* 根据条件更新数据 | ||
* @param record | ||
* @param example | ||
* @return | ||
*/ | ||
int updateByExample(@Param("record") BaseEntity record, @Param("example") BaseCriteria example); | ||
|
||
/** | ||
* 根据条件更新数据(null不处理) | ||
* @param record | ||
* @param example | ||
* @return | ||
*/ | ||
int updateByExampleSelective(@Param("record") BaseEntity record, @Param("example") BaseCriteria example); | ||
|
||
/** | ||
* 根据主键删除数据 | ||
* @param key | ||
* @return | ||
*/ | ||
int deleteByPrimaryKey(BaseEntity key); | ||
|
||
/** | ||
* 根据条件删除数据 | ||
* @param example | ||
* @return | ||
*/ | ||
int deleteByExample(BaseCriteria example); | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.ssmssm.core.entity; | ||
|
||
|
||
|
||
public abstract class BaseCriteria { | ||
/** | ||
* This field was generated by MyBatis Generator. This field corresponds to the database table t_auth_user | ||
* @mbggenerated | ||
*/ | ||
protected Page page; | ||
|
||
/** | ||
* This method was generated by MyBatis Generator. This method corresponds to the database table t_auth_user | ||
* @mbggenerated | ||
*/ | ||
public void setPage(Page page) { | ||
this.page = page; | ||
} | ||
|
||
/** | ||
* This method was generated by MyBatis Generator. This method corresponds to the database table t_auth_user | ||
* @mbggenerated | ||
*/ | ||
public Page getPage() { | ||
return page; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...in/java/com/ssmssm/entity/BaseEntity.java → ...va/com/ssmssm/core/entity/BaseEntity.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,4 +1,4 @@ | ||
package com.ssmssm.entity; | ||
package com.ssmssm.core.entity; | ||
|
||
import java.io.Serializable; | ||
import java.util.Date; | ||
|
2 changes: 1 addition & 1 deletion
2
src/main/java/com/ssmssm/entity/Page.java → ...ain/java/com/ssmssm/core/entity/Page.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,4 +1,4 @@ | ||
package com.ssmssm.entity; | ||
package com.ssmssm.core.entity; | ||
|
||
import java.math.BigDecimal; | ||
|
||
|
Oops, something went wrong.