Commit 22775c20 authored by 赵啸非's avatar 赵啸非

异常日志前端展示添加

parent 3d39f7e5
package com.mortals.xhx.module.access.dao.ibatis; package com.mortals.xhx.module.access.dao.ibatis;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.mortals.xhx.module.biz.model.BizLogEntity;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.access.dao.AccessLogDao; import com.mortals.xhx.module.access.dao.AccessLogDao;
import com.mortals.xhx.module.access.model.AccessLogEntity; import com.mortals.xhx.module.access.model.AccessLogEntity;
...@@ -46,6 +49,13 @@ public class AccessLogDaoImpl extends SubmeterDaoImpl<AccessLogEntity,Long> impl ...@@ -46,6 +49,13 @@ public class AccessLogDaoImpl extends SubmeterDaoImpl<AccessLogEntity,Long> impl
return tableParam; return tableParam;
} }
@Override
public AccessLogEntity get(Long id) {
AccessLogEntity accessLogEntity = new AccessLogEntity();
Snowflake snowflake = IdUtil.getSnowflake(0, 1);
long generateDateTime = snowflake.getGenerateDateTime(id);
accessLogEntity.setCreateTime(new Date(generateDateTime));
return this.get(id,accessLogEntity);
}
} }
...@@ -21,15 +21,6 @@ import java.util.Date; ...@@ -21,15 +21,6 @@ import java.util.Date;
*/ */
@Service("accessLogService") @Service("accessLogService")
public class AccessLogServiceImpl extends AbstractCRUDServiceImpl<AccessLogDao, AccessLogEntity, Long> implements AccessLogService { public class AccessLogServiceImpl extends AbstractCRUDServiceImpl<AccessLogDao, AccessLogEntity, Long> implements AccessLogService {
@Override
public AccessLogEntity get(Long key, Context context) throws AppException {
AccessLogEntity accessLogEntity = new AccessLogEntity();
Snowflake snowflake = IdUtil.getSnowflake(0, 1);
long generateDateTime = snowflake.getGenerateDateTime(key);
accessLogEntity.setCreateTime(new Date(generateDateTime));
return this.getDao().get(key,accessLogEntity);
}
public static void main(String[] args) { public static void main(String[] args) {
Snowflake snowflake = IdUtil.getSnowflake(0, 1); Snowflake snowflake = IdUtil.getSnowflake(0, 1);
......
package com.mortals.xhx.module.biz.dao.ibatis; package com.mortals.xhx.module.biz.dao.ibatis;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.mortals.xhx.module.error.model.ErrorLogEntity;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.biz.dao.BizLogDao; import com.mortals.xhx.module.biz.dao.BizLogDao;
import com.mortals.xhx.module.biz.model.BizLogEntity; import com.mortals.xhx.module.biz.model.BizLogEntity;
...@@ -47,5 +50,14 @@ public class BizLogDaoImpl extends SubmeterDaoImpl<BizLogEntity,Long> implements ...@@ -47,5 +50,14 @@ public class BizLogDaoImpl extends SubmeterDaoImpl<BizLogEntity,Long> implements
} }
@Override
public BizLogEntity get(Long id) {
BizLogEntity bizLogEntity = new BizLogEntity();
Snowflake snowflake = IdUtil.getSnowflake(0, 1);
long generateDateTime = snowflake.getGenerateDateTime(id);
bizLogEntity.setCreateTime(new Date(generateDateTime));
return this.get(id,bizLogEntity);
}
} }
package com.mortals.xhx.module.operate.dao.ibatis; package com.mortals.xhx.module.operate.dao.ibatis;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.mortals.xhx.module.error.model.ErrorLogEntity;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.operate.dao.OperateLogDao; import com.mortals.xhx.module.operate.dao.OperateLogDao;
import com.mortals.xhx.module.operate.model.OperateLogEntity; import com.mortals.xhx.module.operate.model.OperateLogEntity;
import java.util.Date; import java.util.Date;
import com.mortals.framework.model.TableParam; import com.mortals.framework.model.TableParam;
import com.mortals.framework.model.TableStrategy; import com.mortals.framework.model.TableStrategy;
import com.mortals.framework.util.DateUtils; import com.mortals.framework.util.DateUtils;
...@@ -12,15 +17,17 @@ import com.mortals.framework.util.StringUtils; ...@@ -12,15 +17,17 @@ import com.mortals.framework.util.StringUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import com.mortals.framework.dao.ibatis.SubmeterDaoImpl; import com.mortals.framework.dao.ibatis.SubmeterDaoImpl;
import com.mortals.xhx.module.operate.model.OperateLogQuery; import com.mortals.xhx.module.operate.model.OperateLogQuery;
import java.util.List; import java.util.List;
/** /**
* 平台用户操作日志业务DaoImpl DAO接口 * 平台用户操作日志业务DaoImpl DAO接口
* *
* @author zxfei * @author zxfei
* @date 2022-08-17 * @date 2022-08-17
*/ */
@Repository("operateLogDao") @Repository("operateLogDao")
public class OperateLogDaoImpl extends SubmeterDaoImpl<OperateLogEntity,Long> implements OperateLogDao { public class OperateLogDaoImpl extends SubmeterDaoImpl<OperateLogEntity, Long> implements OperateLogDao {
@Override @Override
protected TableStrategy getTableStrategy() { protected TableStrategy getTableStrategy() {
...@@ -46,6 +53,14 @@ public class OperateLogDaoImpl extends SubmeterDaoImpl<OperateLogEntity,Long> im ...@@ -46,6 +53,14 @@ public class OperateLogDaoImpl extends SubmeterDaoImpl<OperateLogEntity,Long> im
return tableParam; return tableParam;
} }
@Override
public OperateLogEntity get(Long id) {
OperateLogEntity operateLogEntity = new OperateLogEntity();
Snowflake snowflake = IdUtil.getSnowflake(0, 1);
long generateDateTime = snowflake.getGenerateDateTime(id);
operateLogEntity.setCreateTime(new Date(generateDateTime));
return this.get(id, operateLogEntity);
}
} }
...@@ -22,12 +22,4 @@ import java.util.Date; ...@@ -22,12 +22,4 @@ import java.util.Date;
@Service("operateLogService") @Service("operateLogService")
public class OperateLogServiceImpl extends AbstractCRUDServiceImpl<OperateLogDao, OperateLogEntity, Long> implements OperateLogService { public class OperateLogServiceImpl extends AbstractCRUDServiceImpl<OperateLogDao, OperateLogEntity, Long> implements OperateLogService {
@Override
public OperateLogEntity get(Long key, Context context) throws AppException {
OperateLogEntity operateLogEntity = new OperateLogEntity();
Snowflake snowflake = IdUtil.getSnowflake(0, 1);
long generateDateTime = snowflake.getGenerateDateTime(key);
operateLogEntity.setCreateTime(new Date(generateDateTime));
return this.getDao().get(key,operateLogEntity);
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment