4 changed files with 145 additions and 4 deletions
@ -0,0 +1,20 @@ |
|||||
|
package com.yvan.workbench.controller; |
||||
|
|
||||
|
import com.yvan.workbench.model.entity.LccModelWorld; |
||||
|
import com.yvan.workbench.model.query.QLccModelWorld; |
||||
|
import org.clever.core.model.request.QueryByPage; |
||||
|
import org.clever.core.model.request.page.Page; |
||||
|
import org.clever.data.jdbc.DaoFactory; |
||||
|
import org.clever.data.jdbc.QueryDSL; |
||||
|
import org.clever.data.jdbc.querydsl.utils.QueryDslUtils; |
||||
|
|
||||
|
public class LccModelManager { |
||||
|
private static final QueryDSL QUERY_DSL = DaoFactory.getQueryDSL(); |
||||
|
|
||||
|
public static Page<LccModelWorld> projectList() { |
||||
|
return QueryDslUtils.queryByPage( |
||||
|
QUERY_DSL.selectFrom(QLccModelWorld.lccModelWorld), |
||||
|
QueryByPage.getCurrent() |
||||
|
); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
package com.yvan.workbench.model.entity; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* (lcc_model_world) |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LccModelWorld implements Serializable { |
||||
|
/** */ |
||||
|
private Long id; |
||||
|
/** 项目编号 */ |
||||
|
private String projectUuid; |
||||
|
/** 项目标题 */ |
||||
|
private String projectLabel; |
||||
|
/** 项目版本 */ |
||||
|
private Long projectVersion; |
||||
|
/** 所在服务器 */ |
||||
|
private String server; |
||||
|
/** 目录数据 */ |
||||
|
private String directoryData; |
||||
|
/** 其他数据 */ |
||||
|
private String otherData; |
||||
|
/** 创建时间,默认为当前时间 */ |
||||
|
private Date createAt; |
||||
|
/** 创建人 */ |
||||
|
private String createBy; |
||||
|
/** 最后更新时间,默认为当前时间,并在更新时自动更新 */ |
||||
|
private Date updateAt; |
||||
|
/** 更新人 */ |
||||
|
private String updateBy; |
||||
|
} |
||||
@ -0,0 +1,86 @@ |
|||||
|
package com.yvan.workbench.model.query; |
||||
|
|
||||
|
import com.querydsl.core.types.Path; |
||||
|
import com.querydsl.core.types.PathMetadata; |
||||
|
import com.querydsl.core.types.dsl.DateTimePath; |
||||
|
import com.querydsl.core.types.dsl.NumberPath; |
||||
|
import com.querydsl.core.types.dsl.StringPath; |
||||
|
import com.querydsl.sql.ColumnMetadata; |
||||
|
import com.querydsl.sql.RelationalPathBase; |
||||
|
import com.yvan.workbench.model.entity.LccModelWorld; |
||||
|
|
||||
|
import java.sql.Types; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
import static com.querydsl.core.types.PathMetadataFactory.forVariable; |
||||
|
|
||||
|
/** |
||||
|
* (lcc_model_world) |
||||
|
*/ |
||||
|
@SuppressWarnings("ALL") |
||||
|
public class QLccModelWorld extends RelationalPathBase<LccModelWorld> { |
||||
|
/** lcc_model_world表 */ |
||||
|
public static final QLccModelWorld lccModelWorld = new QLccModelWorld("lcc_model_world"); |
||||
|
|
||||
|
/** */ |
||||
|
public final NumberPath<Long> id = createNumber("id", Long.class); |
||||
|
/** 项目编号 */ |
||||
|
public final StringPath projectUuid = createString("projectUuid"); |
||||
|
/** 项目标题 */ |
||||
|
public final StringPath projectLabel = createString("projectLabel"); |
||||
|
/** 项目版本 */ |
||||
|
public final NumberPath<Long> projectVersion = createNumber("projectVersion", Long.class); |
||||
|
/** 所在服务器 */ |
||||
|
public final StringPath server = createString("server"); |
||||
|
/** 目录数据 */ |
||||
|
public final StringPath directoryData = createString("directoryData"); |
||||
|
/** 其他数据 */ |
||||
|
public final StringPath otherData = createString("otherData"); |
||||
|
/** 创建时间,默认为当前时间 */ |
||||
|
public final DateTimePath<Date> createAt = createDateTime("createAt", Date.class); |
||||
|
/** 创建人 */ |
||||
|
public final StringPath createBy = createString("createBy"); |
||||
|
/** 最后更新时间,默认为当前时间,并在更新时自动更新 */ |
||||
|
public final DateTimePath<Date> updateAt = createDateTime("updateAt", Date.class); |
||||
|
/** 更新人 */ |
||||
|
public final StringPath updateBy = createString("updateBy"); |
||||
|
|
||||
|
public QLccModelWorld(String variable) { |
||||
|
super(LccModelWorld.class, forVariable(variable), "test", "lcc_model_world"); |
||||
|
addMetadata(); |
||||
|
} |
||||
|
|
||||
|
public QLccModelWorld(String variable, String schema, String table) { |
||||
|
super(LccModelWorld.class, forVariable(variable), schema, table); |
||||
|
addMetadata(); |
||||
|
} |
||||
|
|
||||
|
public QLccModelWorld(String variable, String schema) { |
||||
|
super(LccModelWorld.class, forVariable(variable), schema, "lcc_model_world"); |
||||
|
addMetadata(); |
||||
|
} |
||||
|
|
||||
|
public QLccModelWorld(Path<? extends LccModelWorld> path) { |
||||
|
super(path.getType(), path.getMetadata(), "test", "lcc_model_world"); |
||||
|
addMetadata(); |
||||
|
} |
||||
|
|
||||
|
public QLccModelWorld(PathMetadata metadata) { |
||||
|
super(LccModelWorld.class, metadata, "test", "lcc_model_world"); |
||||
|
addMetadata(); |
||||
|
} |
||||
|
|
||||
|
private void addMetadata() { |
||||
|
addMetadata(id, ColumnMetadata.named("id").withIndex(1).ofType(Types.BIGINT).withSize(19)); |
||||
|
addMetadata(projectUuid, ColumnMetadata.named("project_uuid").withIndex(2).ofType(Types.VARCHAR).withSize(36)); |
||||
|
addMetadata(projectLabel, ColumnMetadata.named("project_label").withIndex(3).ofType(Types.VARCHAR).withSize(255)); |
||||
|
addMetadata(projectVersion, ColumnMetadata.named("project_version").withIndex(4).ofType(Types.BIGINT).withSize(19)); |
||||
|
addMetadata(server, ColumnMetadata.named("server").withIndex(5).ofType(Types.VARCHAR).withSize(255)); |
||||
|
addMetadata(directoryData, ColumnMetadata.named("directory_data").withIndex(6).ofType(Types.LONGVARCHAR).withSize(65535)); |
||||
|
addMetadata(otherData, ColumnMetadata.named("other_data").withIndex(7).ofType(Types.LONGVARCHAR).withSize(65535)); |
||||
|
addMetadata(createAt, ColumnMetadata.named("create_at").withIndex(8).ofType(Types.TIMESTAMP)); |
||||
|
addMetadata(createBy, ColumnMetadata.named("create_by").withIndex(9).ofType(Types.VARCHAR).withSize(255)); |
||||
|
addMetadata(updateAt, ColumnMetadata.named("update_at").withIndex(10).ofType(Types.TIMESTAMP)); |
||||
|
addMetadata(updateBy, ColumnMetadata.named("update_by").withIndex(11).ofType(Types.VARCHAR).withSize(255)); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue