com.fastchar.systemtool.entity.FinalLogHttpEntity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastchar-systemtool Show documentation
Show all versions of fastchar-systemtool Show documentation
FastChar-SystemTool is a FastChar-ExtJs plugin.
package com.fastchar.systemtool.entity;
import com.fastchar.annotation.AFastClassFind;
import com.fastchar.core.FastChar;
import com.fastchar.extjs.FastExtHelper;
import com.fastchar.extjs.core.FastExtEntity;
import com.fastchar.database.FastPage;
import com.fastchar.database.info.FastSqlInfo;
import com.fastchar.utils.FastDateUtils;
import java.text.SimpleDateFormat;
import java.util.*;
import com.fastchar.utils.FastStringUtils;
import com.fastchar.utils.FastNumberUtils;
/**
* 系统HTTP日志数据库实体类
*
* @author Janesen
* @date 2021/08/23 10:38
*/
@AFastClassFind("com.fastchar.http.core.FastHttpRequest")
public class FinalLogHttpEntity extends FastExtEntity {
private static final long serialVersionUID = 1L;
public static FinalLogHttpEntity dao() {
return FastChar.getOverrides().singleInstance(FinalLogHttpEntity.class);
}
public static FinalLogHttpEntity newInstance() {
return FastChar.getOverrides().newInstance(FinalLogHttpEntity.class);
}
@Override
public String getTableName() {
return "final_log_http";
}
@Override
public String getTableDetails() {
return "系统HTTP日志";
}
@Override
public String getEntityCode() {
return this.getClass().getSimpleName();
}
@Override
public FastPage showList(int page, int pageSize) {
String sqlStr = "select t.*" +
" from final_log_http as t" +
" ";
FastSqlInfo sqlInfo = toSelectSql(sqlStr);
return selectBySql(page, pageSize, sqlInfo.getSql(), sqlInfo.toParams());
}
@Override
public void setDefaultValue() {
set("logDateTime", FastDateUtils.getDateString());
}
@Override
public void convertValue() {
super.convertValue();
}
/**
* 获得数据详情
*/
public FinalLogHttpEntity getDetails(int logId) {
String sqlStr = "select t.* from final_log_http as t" +
" " +
" where t.logId = ? ";
FinalLogHttpEntity entity = selectFirstBySql(sqlStr, logId);
if (entity != null) {
//to-do something
}
return entity;
}
/**
* 获得本实体列表集合
*
* @return 分页数据
*/
public FastPage getList(int page, int pageSize, Map where, Map sort) {
StringBuilder sqlStr = new StringBuilder("select t.* from final_log_http as t" +
" " +
" where 1=1 ");
List