fuweng11 commented on code in PR #8463:
URL: https://github.com/apache/inlong/pull/8463#discussion_r1255382292


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/user/TenantRoleServiceImpl.java:
##########
@@ -116,4 +116,16 @@ public TenantRoleInfo getByUsernameAndTenant(String name, 
String tenant) {
         return CommonBeanUtils.copyProperties(entity, TenantRoleInfo::new);
     }
 
+    @Override
+    public boolean delete(Integer id) {
+        int rowCount = tenantUserRoleEntityMapper.deleteById(id);
+        if (rowCount != InlongConstants.AFFECTED_ONE_ROW) {

Review Comment:
   `Preconditions.expectTrue(success == 1, "delete failed");`



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/tenant/InlongTenantServiceImpl.java:
##########
@@ -107,4 +107,11 @@ public Boolean update(InlongTenantRequest request) {
         }
         return true;
     }
+
+    @Override
+    public Boolean delete(String name, String operator) {
+        InlongTenantEntity inlongTenantEntity = 
inlongTenantEntityMapper.selectByName(name);
+        return inlongTenantEntityMapper.deleteById(inlongTenantEntity.getId()) 
> 0;

Review Comment:
   Preconditions.expectTrue(success == 1, "delete failed");



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to