public interface DepartmentDao {
@Insert("insert into department(name,description) value(#{name},#{description})")
@Options(useGeneratedKeys=true,keyProperty="id",keyColumn="id")
public int createDep(Department dep);
@Select("select id,name,description from department where id=#{id}")
public DepartmentDao readDepById(int id);
@Select("select id,name,description from department where name like #{name}")
public List<Department> readDepByName(String name);
@Update("update department set name=#{name} where id=#{id}")
public int updateDepNameById(Department dep);
@Delete("delete from department where id=#{id}")
public int deleteDepById(int id);