XMTT 7 years ago
parent
commit
b973f48156

+ 3 - 1
src/main/java/com/ekexiu/console/system/dao/UserInfoDao.java

2
2
3
import com.ekexiu.console.system.po.UserInfo;
3
import com.ekexiu.console.system.po.UserInfo;
4
import org.jfw.apt.annotation.Nullable;
4
import org.jfw.apt.annotation.Nullable;
5
import org.jfw.apt.orm.annotation.dao.Column;
5
import org.jfw.apt.orm.annotation.dao.DAO;
6
import org.jfw.apt.orm.annotation.dao.DAO;
6
import org.jfw.apt.orm.annotation.dao.method.From;
7
import org.jfw.apt.orm.annotation.dao.method.From;
7
import org.jfw.apt.orm.annotation.dao.method.Or;
8
import org.jfw.apt.orm.annotation.dao.method.Or;
12
import org.jfw.apt.orm.annotation.dao.param.GtEq;
13
import org.jfw.apt.orm.annotation.dao.param.GtEq;
13
import org.jfw.apt.orm.annotation.dao.param.Like;
14
import org.jfw.apt.orm.annotation.dao.param.Like;
14
import org.jfw.apt.orm.annotation.dao.param.LtEq;
15
import org.jfw.apt.orm.annotation.dao.param.LtEq;
16
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
15
import org.jfw.util.PageQueryResult;
17
import org.jfw.util.PageQueryResult;
16
18
17
import java.sql.Connection;
19
import java.sql.Connection;
44
    @PageQuery
46
    @PageQuery
45
    @OrderBy(" ORDER BY create_time DESC")
47
    @OrderBy(" ORDER BY create_time DESC")
46
    @Where("state<>'1'")
48
    @Where("state<>'1'")
47
    PageQueryResult<UserInfo> queryAll(Connection con, @Nullable @Like String creatorName,@Nullable @Like Stringname, @Nullable @Like String orgName, @Nullable String state, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
49
    PageQueryResult<UserInfo> queryAll(Connection con, @Nullable @Like String creatorName,@Nullable @Like String name, @Nullable @Like String orgName, @Nullable String state, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, int pageSize, int pageNo) throws SQLException;
48
50
49
    @Or
51
    @Or
50
    @Nullable
52
    @Nullable

+ 1 - 1
src/main/java/com/ekexiu/console/system/service/UserInfoService.java

170
170
171
    @Path("/pqAll")
171
    @Path("/pqAll")
172
    @Get
172
    @Get
173
    PageQueryResult<UserInfo> pageQueryAll(@JdbcConn Connection con, @Nullable String creatorName, @Nullable Stringname, @Nullable String orgName, @Nullable String state, @Nullable String bt, @Nullable String et, @DefaultValue("1") int pageNo, @DefaultValue("10") int pageSize) throws SQLException {
173
    PageQueryResult<UserInfo> pageQueryAll(@JdbcConn Connection con, @Nullable String creatorName, @Nullable String name, @Nullable String orgName, @Nullable String state, @Nullable String bt, @Nullable String et, @DefaultValue("1") int pageNo, @DefaultValue("10") int pageSize) throws SQLException {
174
        return this.userInfoDao.queryAll(con, creatorName == null ? null : "%" + creatorName + "%",name == null ? null : "%" + name + "%", orgName == null ? null : "%" + orgName + "%", state, bt == null ? null : bt + "000000", et == null ? null : et + "235959", pageSize, pageNo);
174
        return this.userInfoDao.queryAll(con, creatorName == null ? null : "%" + creatorName + "%",name == null ? null : "%" + name + "%", orgName == null ? null : "%" + orgName + "%", state, bt == null ? null : bt + "000000", et == null ? null : et + "235959", pageSize, pageNo);
175
    }
175
    }
176
176