Skip to content

Instantly share code, notes, and snippets.

@greenyleaf
Last active June 19, 2020 12:30
Show Gist options
  • Save greenyleaf/2bf339bc5e5cb7da0707fdc20e96bc34 to your computer and use it in GitHub Desktop.
Save greenyleaf/2bf339bc5e5cb7da0707fdc20e96bc34 to your computer and use it in GitHub Desktop.
a MyBatis DAO interface, CRUD
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