Keine Beschreibung

PpatentDao.java 1.9KB

    package com.ekexiu.console.system.dao; import com.ekexiu.console.system.po.Ppatent; import org.jfw.apt.annotation.Nullable; import org.jfw.apt.orm.annotation.dao.Column; import org.jfw.apt.orm.annotation.dao.DAO; 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.operator.PageQuery; import org.jfw.apt.orm.annotation.dao.method.operator.QueryVal; import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne; import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith; import org.jfw.apt.orm.annotation.dao.param.*; import org.jfw.apt.orm.core.defaultImpl.StringHandler; import org.jfw.util.PageQueryResult; import java.sql.Connection; import java.sql.SQLException; /** * Created by TT on 2017/7/26. */ @DAO public interface PpatentDao { @Nullable @SelectOne Ppatent query(Connection con, String id) throws SQLException; @Nullable @QueryVal @Column(handlerClass = StringHandler.class, value = "name") @From(Ppatent.class) String queryById(Connection con, String id) throws SQLException; @PageQuery @OrderBy(" ORDER BY create_time DESC NULLS LAST") PageQueryResult<Ppatent> queryByTime(Connection con, @Nullable @Like String name, @Nullable @Like String authors, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException; @PageQuery @OrderBy(" ORDER BY page_views DESC NULLS LAST") PageQueryResult<Ppatent> queryByPV(Connection con, @Nullable @Like String name,@Nullable @Like String authors, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException; @UpdateWith @From(Ppatent.class) int updateSortNum(Connection con, String id, @Set long sortNum) throws SQLException; }