Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
operation-control-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
王锦盛
operation-control-platform
Commits
b6d82795
Commit
b6d82795
authored
Mar 30, 2022
by
郭凡凡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
7feab2ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
13 deletions
+35
-13
src/main/java/com/pms/ocp/service/impl/TenantBasicManagementServiceImpl.java
...ms/ocp/service/impl/TenantBasicManagementServiceImpl.java
+35
-13
No files found.
src/main/java/com/pms/ocp/service/impl/TenantBasicManagementServiceImpl.java
View file @
b6d82795
...
@@ -406,28 +406,50 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
...
@@ -406,28 +406,50 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
*/
*/
@Override
@Override
public
ResponseVO
saveAndUpdateTenant
(
OcpBaseTiocnDto
ocpBaseTiocnDto
)
{
public
ResponseVO
saveAndUpdateTenant
(
OcpBaseTiocnDto
ocpBaseTiocnDto
)
{
String
objId
=
ocpBaseTiocnDto
.
getObjId
();
String
tenantCode
=
ocpBaseTiocnDto
.
getTenantCode
();
String
tenantCode
=
ocpBaseTiocnDto
.
getTenantCode
();
LambdaQueryWrapper
<
OcpTenantBase
>
lambdaQueryWrapper2
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper2
.
eq
(
OcpTenantBase:
:
getTenantCode
,
tenantCode
);
OcpTenantBase
one
=
this
.
getOne
(
lambdaQueryWrapper2
);
OcpTenantBase
ocpTenantBase
=
new
OcpTenantBase
();
OcpTenantBase
ocpTenantBase
=
new
OcpTenantBase
();
BeanUtils
.
copyProperties
(
ocpBaseTiocnDto
,
ocpTenantBase
);
BeanUtils
.
copyProperties
(
ocpBaseTiocnDto
,
ocpTenantBase
);
ocpTenantBase
.
setIsDelete
((
short
)
0
);
ocpTenantBase
.
setIsDelete
((
short
)
0
);
if
(
StringUtils
.
isEmpty
(
objId
)){
if
(
one
!=
null
){
return
ResponseVO
.
error
(
"应用编码不能重复"
);
}
else
{
ocpTenantBase
.
setTenantCtime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
ocpTenantBase
.
setTenantMtime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
this
.
save
(
ocpTenantBase
);
}
}
else
{
ocpTenantBase
.
setTenantMtime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
LambdaQueryWrapper
<
OcpTenantBase
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
OcpTenantBase:
:
getObjId
,
ocpTenantBase
.
getObjId
());
this
.
update
(
ocpTenantBase
,
lambdaQueryWrapper
);
}
LambdaQueryWrapper
<
OcpTenantBase
>
lambdaQueryWrapper2
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper2
.
eq
(
OcpTenantBase:
:
getTenantCode
,
tenantCode
);
// boolean flag = this.update(ocpTenantBase, lambdaQueryWrapper2);
// boolean flag = this.update(ocpTenantBase, lambdaQueryWrapper2);
// if (flag) {
// if (flag) {
// log.info("应用基础表修改成功");
// log.info("应用基础表修改成功");
// System.out.println("应用基础表修改成功");
// System.out.println("应用基础表修改成功");
// }
// }
int
delete
=
tenantBasicManagementMapper
.
delete
(
lambdaQueryWrapper2
);
// int delete = tenantBasicManagementMapper.delete(lambdaQueryWrapper2);
if
(
delete
==
0
)
{
// if (delete == 0) {
log
.
info
(
"增加"
);
// log.info("增加");
ocpTenantBase
.
setTenantCtime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
// ocpTenantBase.setTenantCtime(new Timestamp(System.currentTimeMillis()));
ocpTenantBase
.
setTenantMtime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
// ocpTenantBase.setTenantMtime(new Timestamp(System.currentTimeMillis()));
}
else
{
// } else {
log
.
info
(
"编辑"
);
// log.info("编辑");
ocpTenantBase
.
setTenantMtime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
// ocpTenantBase.setTenantMtime(new Timestamp(System.currentTimeMillis()));
}
// }
boolean
save1
=
this
.
save
(
ocpTenantBase
);
// boolean save1 = this.save(ocpTenantBase);
OcpTenantExtent
ocpTenantExtent
=
new
OcpTenantExtent
();
OcpTenantExtent
ocpTenantExtent
=
new
OcpTenantExtent
();
ocpTenantExtent
.
setTenantCode
(
tenantCode
);
ocpTenantExtent
.
setTenantCode
(
tenantCode
);
ocpTenantExtent
.
setTenantState
((
short
)
0
);
ocpTenantExtent
.
setTenantState
((
short
)
0
);
...
@@ -457,7 +479,7 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
...
@@ -457,7 +479,7 @@ public class TenantBasicManagementServiceImpl extends ServiceImpl<TenantBasicMan
ocpTenantIocn
.
setIocn
(
ocpBaseTiocnDto
.
getIocn
());
ocpTenantIocn
.
setIocn
(
ocpBaseTiocnDto
.
getIocn
());
ocpTenantIocn
.
setCompanyCode
(
ownerCompanyCode
);
ocpTenantIocn
.
setCompanyCode
(
ownerCompanyCode
);
boolean
save
=
ocpTenantIocnService
.
save
(
ocpTenantIocn
);
boolean
save
=
ocpTenantIocnService
.
save
(
ocpTenantIocn
);
if
(
save1
&&
save
)
{
if
(
save
)
{
return
ResponseVO
.
ok
(
"添加成功"
);
return
ResponseVO
.
ok
(
"添加成功"
);
}
}
return
ResponseVO
.
error
(
"未知错误"
);
return
ResponseVO
.
error
(
"未知错误"
);
...
...
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