Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
log-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
log-platform
Commits
22775c20
Commit
22775c20
authored
Aug 30, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常日志前端展示添加
parent
3d39f7e5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
24 deletions
+44
-24
log-manager/src/main/java/com/mortals/xhx/module/access/dao/ibatis/AccessLogDaoImpl.java
...ortals/xhx/module/access/dao/ibatis/AccessLogDaoImpl.java
+11
-1
log-manager/src/main/java/com/mortals/xhx/module/access/service/impl/AccessLogServiceImpl.java
.../xhx/module/access/service/impl/AccessLogServiceImpl.java
+0
-9
log-manager/src/main/java/com/mortals/xhx/module/biz/dao/ibatis/BizLogDaoImpl.java
.../com/mortals/xhx/module/biz/dao/ibatis/BizLogDaoImpl.java
+12
-0
log-manager/src/main/java/com/mortals/xhx/module/operate/dao/ibatis/OperateLogDaoImpl.java
...tals/xhx/module/operate/dao/ibatis/OperateLogDaoImpl.java
+21
-6
log-manager/src/main/java/com/mortals/xhx/module/operate/service/impl/OperateLogServiceImpl.java
...hx/module/operate/service/impl/OperateLogServiceImpl.java
+0
-8
No files found.
log-manager/src/main/java/com/mortals/xhx/module/access/dao/ibatis/AccessLogDaoImpl.java
View file @
22775c20
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
com.mortals.xhx.module.access.dao.AccessLogDao
;
import
com.mortals.xhx.module.access.model.AccessLogEntity
;
...
...
@@ -46,6 +49,13 @@ public class AccessLogDaoImpl extends SubmeterDaoImpl<AccessLogEntity,Long> impl
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
);
}
}
log-manager/src/main/java/com/mortals/xhx/module/access/service/impl/AccessLogServiceImpl.java
View file @
22775c20
...
...
@@ -21,15 +21,6 @@ import java.util.Date;
*/
@Service
(
"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
)
{
Snowflake
snowflake
=
IdUtil
.
getSnowflake
(
0
,
1
);
...
...
log-manager/src/main/java/com/mortals/xhx/module/biz/dao/ibatis/BizLogDaoImpl.java
View file @
22775c20
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
com.mortals.xhx.module.biz.dao.BizLogDao
;
import
com.mortals.xhx.module.biz.model.BizLogEntity
;
...
...
@@ -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
);
}
}
log-manager/src/main/java/com/mortals/xhx/module/operate/dao/ibatis/OperateLogDaoImpl.java
View file @
22775c20
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
com.mortals.xhx.module.operate.dao.OperateLogDao
;
import
com.mortals.xhx.module.operate.model.OperateLogEntity
;
import
java.util.Date
;
import
com.mortals.framework.model.TableParam
;
import
com.mortals.framework.model.TableStrategy
;
import
com.mortals.framework.util.DateUtils
;
...
...
@@ -12,15 +17,17 @@ import com.mortals.framework.util.StringUtils;
import
org.springframework.util.ObjectUtils
;
import
com.mortals.framework.dao.ibatis.SubmeterDaoImpl
;
import
com.mortals.xhx.module.operate.model.OperateLogQuery
;
import
java.util.List
;
/**
* 平台用户操作日志业务DaoImpl DAO接口
*
* @author zxfei
* @date 2022-08-17
*/
* 平台用户操作日志业务DaoImpl DAO接口
*
* @author zxfei
* @date 2022-08-17
*/
@Repository
(
"operateLogDao"
)
public
class
OperateLogDaoImpl
extends
SubmeterDaoImpl
<
OperateLogEntity
,
Long
>
implements
OperateLogDao
{
public
class
OperateLogDaoImpl
extends
SubmeterDaoImpl
<
OperateLogEntity
,
Long
>
implements
OperateLogDao
{
@Override
protected
TableStrategy
getTableStrategy
()
{
...
...
@@ -46,6 +53,14 @@ public class OperateLogDaoImpl extends SubmeterDaoImpl<OperateLogEntity,Long> im
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
);
}
}
log-manager/src/main/java/com/mortals/xhx/module/operate/service/impl/OperateLogServiceImpl.java
View file @
22775c20
...
...
@@ -22,12 +22,4 @@ import java.util.Date;
@Service
(
"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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment