Last active
June 19, 2020 12:30
-
-
Save greenyleaf/2bf339bc5e5cb7da0707fdc20e96bc34 to your computer and use it in GitHub Desktop.
a MyBatis DAO interface, CRUD
This file contains hidden or 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
package top.sdrkyj.custom.dao; | |
import top.sdrkyj.custom.entity.Invoice; | |
import org.apache.ibatis.annotations.Mapper; | |
import org.apache.ibatis.annotations.Param; | |
import org.springframework.stereotype.Repository; | |
import java.util.List; | |
@Repository | |
@Mapper | |
public interface InvoiceDao { | |
Invoice findById(Long id); | |
boolean create(@Param("invoice") Invoice invoice); | |
boolean update(@Param("invoice") Invoice invoice); | |
List<Invoice> findByFilter(@Param("invoice") Invoice invoice, long offset, long limit); | |
long countByFilter(@Param("invoice") Invoice invoice); | |
boolean removeById(Long id); | |
int removeByIds(@Param("nos") Long[] ids); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment