Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
0e12b330
Commit
0e12b330
authored
Apr 02, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改模板删除为物理删除
parent
86211194
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
14 deletions
+23
-14
TemplateServiceImpl.java
...va/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
+23
-14
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
View file @
0e12b330
...
...
@@ -260,23 +260,26 @@ public class TemplateServiceImpl extends AbstractService {
String
path
=
""
;
if
(
templateDb
!=
null
)
{
TemplateExample
example
=
new
TemplateExample
();
example
.
createCriteria
().
andCodeEqualTo
(
templateDb
.
getCode
()).
andIdEqualTo
(
templateDb
.
getId
()).
andIsActiveAssociationEqualTo
(
false
);
long
count
=
templateMapper
.
countByExample
(
example
);
if
(
count
>
0
)
{
path
=
templateDb
.
getPath
();
//物理删除
deleteIsAtiveAssociation
(
templateDb
);
}
else
{
if
(
param
.
isDeletePermanent
()
&&
!
templateDb
.
getIsSystemType
())
{
// TemplateExample example = new TemplateExample();
// example.createCriteria().andCodeEqualTo(templateDb.getCode()).andIdEqualTo(templateDb.getId()).andIsActiveAssociationEqualTo(false);
path
=
templateDb
.
getPath
();
//物理删除
deleteIsAtiveAssociation
(
templateDb
);
}
else
{
//逻辑删除
logicDeleteIsActiveAssociation
(
templateDb
);
}
}
// long count = templateMapper.countByExample(example);
// if (count > 0) {
// path = templateDb.getPath();
// //物理删除
// deleteIsAtiveAssociation(templateDb);
// } else {
// if (param.isDeletePermanent() && !templateDb.getIsSystemType()) {
// path = templateDb.getPath();
// //物理删除
// deleteIsAtiveAssociation(templateDb);
// } else {
// //逻辑删除
// logicDeleteIsActiveAssociation(templateDb);
// }
// }
}
result
.
setResult
(
true
);
...
...
@@ -406,10 +409,16 @@ public class TemplateServiceImpl extends AbstractService {
}
private
void
deleteIsAtiveAssociation
(
Template
templateDb
)
{
if
(
templateDb
.
getId
()
==
null
){
return
;
}
cellTemplateConfigMapper
.
deleteCellTemplateConfigByCellTemplate
(
templateDb
.
getId
());
keyValueReferenceMapper
.
deleteKeyValueReferenceByCellTemplate
(
templateDb
.
getId
());
CellTemplateExample
example
=
new
CellTemplateExample
();
example
.
createCriteria
().
andReportTemplateIdEqualTo
(
templateDb
.
getId
());
cellTemplateMapper
.
deleteByExample
(
example
);
TemplateExample
templateExample
=
new
TemplateExample
();
templateExample
.
createCriteria
().
andIdEqualTo
(
templateDb
.
getId
());
templateMapper
.
deleteByExample
(
templateExample
);
}
}
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