You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
434 B
33 lines
434 B
package com.demo.service;
|
|
|
|
import java.util.List;
|
|
|
|
public interface CrudService<T> {
|
|
|
|
/**
|
|
* 所有数据
|
|
* @return
|
|
*/
|
|
public List<T> list();
|
|
|
|
/**
|
|
* 保存数据
|
|
* @param entity
|
|
*/
|
|
public void save(T entity);
|
|
|
|
/**
|
|
* 删除数据
|
|
* @param id
|
|
*/
|
|
public void del(int id);
|
|
|
|
/**
|
|
* 获得单条数据
|
|
* @param id
|
|
* @return
|
|
*/
|
|
T get(int id);
|
|
|
|
}
|