Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
certificate-print
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
廖旭伟
certificate-print
Commits
bc186c88
Commit
bc186c88
authored
Nov 07, 2022
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试bug修改
parent
28b7a1fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
3 deletions
+44
-3
certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/ApplyLogServiceImpl.java
...s/xhx/module/record/service/impl/ApplyLogServiceImpl.java
+44
-3
No files found.
certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/ApplyLogServiceImpl.java
View file @
bc186c88
...
@@ -139,9 +139,50 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
...
@@ -139,9 +139,50 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
}
}
@Override
@Override
protected
void
saveBefore
(
ApplyLogEntity
entity
,
Context
context
)
throws
AppException
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
entity
.
setGenerateStatus
(
GenerateStatus
.
NOT
.
getValue
());
public
ApplyLogEntity
save
(
ApplyLogEntity
applyLogEntity
,
Context
context
)
throws
AppException
{
entity
.
setOperType
(
OperTypeEnum
.
SAVE
.
getValue
());
validData
(
applyLogEntity
,
context
);
Long
oldId
=
null
;
boolean
is_record
=
false
;
CertificateCatalogEntity
catalog
=
certificateCatalogService
.
get
(
applyLogEntity
.
getCatalogId
());
applyLogEntity
.
setCatalogCode
(
catalog
.
getCatalogCode
());
applyLogEntity
.
setCatalogName
(
catalog
.
getCatalogName
());
applyLogEntity
.
setCreateTime
(
new
Date
());
applyLogEntity
.
setRecordStatus
(
YesNoEnum
.
NO
.
getValue
());
if
(
context
!=
null
&&
context
.
getUser
()!=
null
)
{
applyLogEntity
.
setCreateUserId
(
context
.
getUser
().
getId
());
}
applyLogEntity
.
setGenerateStatus
(
GenerateStatus
.
NOT
.
getValue
());
if
(
applyLogEntity
.
getId
()!=
null
&&
applyLogEntity
.
getRecordId
()!=
null
){
applyLogEntity
.
setOperType
(
OperTypeEnum
.
UPDATE
.
getValue
());
oldId
=
applyLogEntity
.
getId
();
is_record
=
true
;
RecordEntity
recordEntity
=
new
RecordEntity
();
recordEntity
.
setId
(
applyLogEntity
.
getRecordId
());
recordEntity
.
setUpdateUserId
(
applyLogEntity
.
getCreateUserId
());
recordEntity
.
setUpdateTime
(
applyLogEntity
.
getCreateTime
());
recordDao
.
update
(
recordEntity
);
}
else
{
applyLogEntity
.
setOperType
(
OperTypeEnum
.
SAVE
.
getValue
());
RecordEntity
recordEntity
=
new
RecordEntity
();
recordEntity
.
setCatalogId
(
catalog
.
getId
());
recordEntity
.
setCatalogCode
(
catalog
.
getCatalogCode
());
recordEntity
.
setCatalogName
(
catalog
.
getCatalogName
());
recordEntity
.
setRecordStatus
(
YesNoEnum
.
YES
.
getValue
());
recordEntity
.
setCreateUserId
(
applyLogEntity
.
getCreateUserId
());
recordEntity
.
setCreateTime
(
applyLogEntity
.
getCreateTime
());
recordDao
.
insert
(
recordEntity
);
applyLogEntity
.
setRecordId
(
recordEntity
.
getId
());
}
dao
.
insert
(
applyLogEntity
);
if
(
is_record
){
ApplyLogEntity
updata
=
new
ApplyLogEntity
();
updata
.
setId
(
oldId
);
updata
.
setRecordStatus
(
YesNoEnum
.
YES
.
getValue
());
updata
.
setUpdateTime
(
new
Date
());
dao
.
update
(
updata
);
}
return
applyLogEntity
;
}
}
@Override
@Override
...
...
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