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
af356211
Commit
af356211
authored
Nov 13, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口访问异步消息保存
parent
9a1ba74b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
log-manager/src/main/java/com/mortals/xhx/module/access/web/AccessLogController.java
...om/mortals/xhx/module/access/web/AccessLogController.java
+1
-0
log-manager/src/main/java/com/mortals/xhx/module/biz/web/BizLogController.java
...java/com/mortals/xhx/module/biz/web/BizLogController.java
+17
-1
log-manager/src/main/java/com/mortals/xhx/module/operate/web/OperateLogController.java
.../mortals/xhx/module/operate/web/OperateLogController.java
+16
-1
No files found.
log-manager/src/main/java/com/mortals/xhx/module/access/web/AccessLogController.java
View file @
af356211
...
@@ -76,6 +76,7 @@ public class AccessLogController extends BaseCRUDJsonBodyMappingController<Acces
...
@@ -76,6 +76,7 @@ public class AccessLogController extends BaseCRUDJsonBodyMappingController<Acces
AccessLogPdu
accessLogPdu
=
new
AccessLogPdu
();
AccessLogPdu
accessLogPdu
=
new
AccessLogPdu
();
accessLogPdu
.
initAttrValue
();
accessLogPdu
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
accessLogPdu
,
BeanUtil
.
getNullPropertyNames
(
entity
));
BeanUtils
.
copyProperties
(
entity
,
accessLogPdu
,
BeanUtil
.
getNullPropertyNames
(
entity
));
messageProducer
.
syncAccessSend
(
accessLogPdu
);
JSONObject
ret
=
new
JSONObject
();
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
"code"
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
"code"
,
VALUE_RESULT_SUCCESS
);
return
ret
.
toJSONString
();
return
ret
.
toJSONString
();
...
...
log-manager/src/main/java/com/mortals/xhx/module/biz/web/BizLogController.java
View file @
af356211
...
@@ -3,9 +3,14 @@ import cn.hutool.core.codec.Base64;
...
@@ -3,9 +3,14 @@ import cn.hutool.core.codec.Base64;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.IdUtil
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.AccessLogPdu
;
import
com.mortals.framework.model.BizLogPdu
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.system.MessageProducer
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -38,6 +43,9 @@ public class BizLogController extends BaseCRUDJsonBodyMappingController<BizLogSe
...
@@ -38,6 +43,9 @@ public class BizLogController extends BaseCRUDJsonBodyMappingController<BizLogSe
@Autowired
@Autowired
private
ParamService
paramService
;
private
ParamService
paramService
;
@Autowired
private
MessageProducer
messageProducer
;
public
BizLogController
(){
public
BizLogController
(){
super
.
setModuleDesc
(
"业务日志"
);
super
.
setModuleDesc
(
"业务日志"
);
}
}
...
@@ -66,7 +74,15 @@ public class BizLogController extends BaseCRUDJsonBodyMappingController<BizLogSe
...
@@ -66,7 +74,15 @@ public class BizLogController extends BaseCRUDJsonBodyMappingController<BizLogSe
@Override
@Override
@UnAuth
@UnAuth
public
String
save
(
@RequestBody
BizLogEntity
entity
)
{
public
String
save
(
@RequestBody
BizLogEntity
entity
)
{
return
super
.
save
(
entity
);
BizLogPdu
bizLogPdu
=
new
BizLogPdu
();
bizLogPdu
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
bizLogPdu
,
BeanUtil
.
getNullPropertyNames
(
entity
));
messageProducer
.
syncBizSend
(
bizLogPdu
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
"code"
,
VALUE_RESULT_SUCCESS
);
return
ret
.
toJSONString
();
// return super.save(entity);
}
}
...
...
log-manager/src/main/java/com/mortals/xhx/module/operate/web/OperateLogController.java
View file @
af356211
...
@@ -4,10 +4,14 @@ import com.fasterxml.jackson.core.JsonProcessingException;
...
@@ -4,10 +4,14 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.BizLogPdu
;
import
com.mortals.framework.model.OperateLogPdu
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.OperTypeEnum
;
import
com.mortals.xhx.common.code.OperTypeEnum
;
import
com.mortals.xhx.common.utils.BeanUtil
;
import
com.mortals.xhx.system.MessageProducer
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -47,6 +51,9 @@ public class OperateLogController extends BaseCRUDJsonBodyMappingController<Oper
...
@@ -47,6 +51,9 @@ public class OperateLogController extends BaseCRUDJsonBodyMappingController<Oper
@Autowired
@Autowired
private
ParamService
paramService
;
private
ParamService
paramService
;
@Autowired
private
MessageProducer
messageProducer
;
public
OperateLogController
()
{
public
OperateLogController
()
{
super
.
setModuleDesc
(
"平台用户操作日志业务"
);
super
.
setModuleDesc
(
"平台用户操作日志业务"
);
}
}
...
@@ -70,7 +77,15 @@ public class OperateLogController extends BaseCRUDJsonBodyMappingController<Oper
...
@@ -70,7 +77,15 @@ public class OperateLogController extends BaseCRUDJsonBodyMappingController<Oper
@Override
@Override
@UnAuth
@UnAuth
public
String
save
(
@RequestBody
OperateLogEntity
entity
)
{
public
String
save
(
@RequestBody
OperateLogEntity
entity
)
{
return
super
.
save
(
entity
);
OperateLogPdu
operateLogPdu
=
new
OperateLogPdu
();
operateLogPdu
.
initAttrValue
();
BeanUtils
.
copyProperties
(
entity
,
operateLogPdu
,
BeanUtil
.
getNullPropertyNames
(
entity
));
messageProducer
.
syncOperSend
(
operateLogPdu
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
"code"
,
VALUE_RESULT_SUCCESS
);
return
ret
.
toJSONString
();
//return super.save(entity);
}
}
public
static
void
main
(
String
[]
args
)
throws
JsonProcessingException
{
public
static
void
main
(
String
[]
args
)
throws
JsonProcessingException
{
...
...
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