医疗信息共享平台后台管理系统

DepartmentDao.java 1.8KB

    package com.ekexiu.project.msconsole.department; import org.jfw.apt.annotation.Nullable; import org.jfw.apt.orm.annotation.dao.DAO; import org.jfw.apt.orm.annotation.dao.method.Exclude; import org.jfw.apt.orm.annotation.dao.method.From; import org.jfw.apt.orm.annotation.dao.method.OrderBy; import org.jfw.apt.orm.annotation.dao.method.SetSentence; import org.jfw.apt.orm.annotation.dao.method.Where; import org.jfw.apt.orm.annotation.dao.method.operator.Insert; import org.jfw.apt.orm.annotation.dao.method.operator.PageSelect; import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne; import org.jfw.apt.orm.annotation.dao.method.operator.Update; import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith; import org.jfw.apt.orm.annotation.dao.param.Like; import org.jfw.apt.orm.annotation.dao.param.Set; import org.jfw.util.PageQueryResult; import java.sql.Connection; import java.sql.SQLException; /** * Created by TT on 2019/5/30. */ @DAO public interface DepartmentDao { @Insert int insert(Connection con, Department department) throws SQLException; @Update @Exclude({"active"}) int update(Connection con, Department department) throws SQLException; @UpdateWith @From(Department.class) @Where("ACTIVE ='1'") @SetSentence("ACTIVE ='0'") int ban(Connection con, String id, @Set String modifier) throws SQLException; @Nullable @SelectOne Department query(Connection con, String id) throws SQLException; @PageSelect @OrderBy("ORDER BY CREATE_TIME DESC") PageQueryResult<Department> pageQuery(Connection con,String hospital, @Nullable Boolean active, @Nullable @Like String name, int pageSize, int pageNo) throws SQLException; @Nullable @SelectOne Department queryByName(Connection con,String hospital, String name) throws SQLException; }