Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
customer-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
customer-service
Commits
20e8a407
Commit
20e8a407
authored
Apr 21, 2020
by
杨钧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加操作记录状态
parent
8e39fa7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
OperateLogAspect.java
...ain/java/cn/quantgroup/customer/aop/OperateLogAspect.java
+7
-0
OperateLogModel.java
...n/java/cn/quantgroup/customer/entity/OperateLogModel.java
+3
-0
OperateLogRepo.java
...main/java/cn/quantgroup/customer/repo/OperateLogRepo.java
+1
-1
No files found.
src/main/java/cn/quantgroup/customer/aop/OperateLogAspect.java
View file @
20e8a407
package
cn
.
quantgroup
.
customer
.
aop
;
import
cn.quantgroup.customer.config.container.UserThreadLocal
;
import
cn.quantgroup.customer.constant.Constant
;
import
cn.quantgroup.customer.entity.OpUser
;
import
cn.quantgroup.customer.entity.OperateLogModel
;
import
cn.quantgroup.customer.service.IOperateLogService
;
...
...
@@ -115,6 +116,11 @@ public class OperateLogAspect {
}
log
.
info
(
"{} 处理结果:{}"
,
logPre
,
String
.
valueOf
(
result
));
JSONObject
resultJson
=
JSONObject
.
parseObject
(
result
.
toString
());
int
status
=
0
;
if
(
resultJson
.
containsKey
(
"code"
)
&&
Constant
.
SUCCESS_CODE
.
equals
(
resultJson
.
getString
(
"code"
))){
status
=
1
;
}
OpUser
opUser
=
UserThreadLocal
.
get
();
OperateLogModel
model
=
OperateLogModel
.
builder
()
...
...
@@ -128,6 +134,7 @@ public class OperateLogAspect {
.
loanId
(
loanId
)
.
applyNo
(
applyNo
)
.
remark
(
remark
)
.
status
(
status
)
.
build
();
operateLogService
.
saveOperateLog
(
model
);
...
...
src/main/java/cn/quantgroup/customer/entity/OperateLogModel.java
View file @
20e8a407
...
...
@@ -55,6 +55,9 @@ public class OperateLogModel {
@Column
(
name
=
"remark"
)
private
String
remark
;
@Column
(
name
=
"status"
)
private
Integer
status
;
public
OperateLogModel
()
{
}
...
...
src/main/java/cn/quantgroup/customer/repo/OperateLogRepo.java
View file @
20e8a407
...
...
@@ -8,7 +8,7 @@ import java.util.List;
public
interface
OperateLogRepo
extends
JpaRepository
<
OperateLogModel
,
Long
>
{
@Query
(
value
=
"select * from operate_log where loan_id =?1 ORDER BY id DESC"
,
nativeQuery
=
true
)
@Query
(
value
=
"select * from operate_log where loan_id =?1
and status = 1
ORDER BY id DESC"
,
nativeQuery
=
true
)
List
<
OperateLogModel
>
findLogsByLoanId
(
Long
loanId
);
@Query
(
value
=
"select count(1) from operate_log where loan_id =?1"
,
nativeQuery
=
true
)
...
...
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