wolfboys commented on code in PR #3310:
URL: 
https://github.com/apache/incubator-streampark/pull/3310#discussion_r1382494071


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationLogServiceImpl.java:
##########
@@ -50,14 +50,13 @@ public IPage<ApplicationLog> getPage(ApplicationLog 
applicationLog, RestRequest
   }
 
   @Override
-  public void removeApp(Long appId) {
+  public void removeByAppId(Long appId) {
     LambdaQueryWrapper<ApplicationLog> queryWrapper =
         new LambdaQueryWrapper<ApplicationLog>().eq(ApplicationLog::getAppId, 
appId);
     this.remove(queryWrapper);
   }
 
-  @Override
-  public Boolean delete(ApplicationLog applicationLog) {
+  public boolean remove(ApplicationLog applicationLog) {

Review Comment:
   We don't need this method.



##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/ApplicationLogService.java:
##########
@@ -27,7 +27,7 @@ public interface ApplicationLogService extends 
IService<ApplicationLog> {
 
   IPage<ApplicationLog> getPage(ApplicationLog applicationLog, RestRequest 
request);
 
-  void removeApp(Long appId);
+  void removeByAppId(Long appId);
 
-  Boolean delete(ApplicationLog applicationLog);
+  boolean remove(ApplicationLog applicationLog);

Review Comment:
   We don't need this method.



##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/controller/ApplicationController.java:
##########
@@ -335,7 +335,7 @@ public RestResponse optionlog(ApplicationLog 
applicationLog, RestRequest request
   @PostMapping("deleteOperationLog")
   @RequiresPermissions("app:delete")
   public RestResponse deleteOperationLog(ApplicationLog applicationLog) {
-    Boolean deleted = applicationLogService.delete(applicationLog);
+    Boolean deleted = applicationLogService.removeById(applicationLog);
     return RestResponse.success(deleted);
   }

Review Comment:
   We can improve this method :
   ```
   public RestResponse deleteOperationLog(Long id) {
       Boolean deleted = applicationLogService.removeById(id);
       return RestResponse.success(deleted);
     }
   ```



-- 
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