sharp-database中继承BaseServiceImpl

@Service
@Validated
public class ProjectService extends BaseServiceImpl<ProjectDAO, Project> {

    public ProjectService(ProjectDAO projectDAO) {
        super(projectDAO);
    }
}

方法介绍

保存或更新

public E saveOrUpdate(E e)

保存

public E save(E e)

更新

public E update(E e)

根据id删除

public int deleteById(Long id)

根据id查询

public Optional<E> findById(Long id)

查询所有数据

public List<E> findAll()